0

我正在尝试测试从电子邮件中触发 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 设置为时间来更新事件预订的更新。”,两封电子邮件之间的唯一区别是电子邮件的正文以及我在第二封邮件中包含 modifiedTime 的事实。

一些额外的背景信息: 1. 我在发送之前在这里验证了我的标记:https: //www.google.com/webmasters/markup-tester 2. 我正在使用 Gmail 操作示例应用程序发送我的测试电子邮件:http: //gmail-actions.appspot.com/

4

1 回答 1

3

查看第一封电子邮件和后续电子邮件中的标记后,您的startDate属性看起来是相同的 (2015-05-19T16:00:00-05:00)。您的后续电子邮件应该在startDate属性中包含更新时间 (2015-05-19T18:00:00-05:00)。

如果您查看文档上的描述,modifiedTime属性是您输入上次修改预订时的位置,而不是实际更新时间。

于 2015-05-19T18:25:38.263 回答