我正在尝试通过电子邮件测试Google Now卡的触发情况,然后使用modifiedTime属性更新时间。这是我用于触发最初Google Now卡的初始电子邮件的标记(它正在运行):
<html>
<body>
<script type="application/ld+json">
{
"@context": "http://schema.org",
"@type": "EventReservation",
"reservationNumber": "E123456789",
"reservationStatus": "http://schema.org/Confirmed",
"underName": {
"@type": "Person",
"name": "Test Person"
},
"reservationFor": {
"@type": "Event",
"name": "Test Event",
"startDate": "2015-05-19T16:00:00-05:00",
"location": {
"@type": "Place",
"name": "Your Home",
"address": {
"@type": "PostalAddress",
"streetAddress": "111 Main Street",
"addressLocality": "Columbus",
"addressRegion": "OH",
"postalCode": "43215",
"addressCountry": "US"
}
}
},
"modifyReservationUrl": "http://www.test.com/testing"
}
</script>
<div>Test Appointment</div>
</body>
</html>
以下是我用来尝试更新Google Now卡以反映时间变化的后续电子邮件(无效):
<html>
<body>
<script type="application/ld+json">
{
"@context": "http://schema.org",
"@type": "EventReservation",
"reservationNumber": "E123456789",
"reservationStatus": "http://schema.org/Confirmed",
"underName": {
"@type": "Person",
"name": "Test Person"
},
"reservationFor": {
"@type": "Event",
"name": "Test Event",
"startDate": "2015-05-19T16:00:00-05:00",
"location": {
"@type": "Place",
"name": "Your Home",
"address": {
"@type": "PostalAddress",
"streetAddress": "111 Main Street",
"addressLocality": "Columbus",
"addressRegion": "OH",
"postalCode": "43215",
"addressCountry": "US"
}
}
},
"modifyReservationUrl": "http://www.test.com/testing",
"modifiedTime": "2015-05-19T18:00:00-05:00"
}
</script>
<div>Test Appointment Changed</div>
</body>
</html>
根据此处的文档:https://developers.google.com/gmail/markup/reference/event-reservation#update_a_event我正在阅读“您可以通过发送更新的事件预订并将modifiedTime设置为更新时间来更新事件预留。”,2封电子邮件之间的唯一区别是电子邮件的正文,以及我在第二部分中包含modifiedTime的事实。
一些额外的背景信息: 1.我在发送之前验证了我的标记:https://www.google.com/webmasters/markup-tester 2.我正在使用Gmail操作示例应用发送测试电子邮件:http://gmail-actions.appspot.com/
答案 0 :(得分:3)
在查看第一封电子邮件和后续电子邮件中的标记后,您的 startDate 属性看起来相同(2015-05-19T16:00:00-05:00)。您的跟进电子邮件应在 startDate 属性中具有更新时间(2015-05-19T18:00:00-05:00)。
如果您查看documentaiton上的说明,则 modifiedTime 属性是您在上次修改预订时输入的位置,而不是实际更新时间。