订单架构未在Gmail上正常显示

时间:2016-03-01 13:45:56

标签: google-schemas

我正在尝试实现订单架构,如下所示:https://developers.google.com/gmail/markup/reference/order

<script type="application/ld+json">
{
  "@context": "http://schema.org",
  "@type": "Order",
  "merchant": {
    "@type": "Organization",
    "name": "Test Ltd."
  },
  "orderNumber": "56d59b633427b",
  "orderStatus": "http://schema.org/PaymentComplete",
  "acceptedOffer": {
    "@type": "Offer",
    "itemOffered": {
      "@type": "Product",
      "name": "Test Products"
    },
    "price": "41.09",
    "priceCurrency": "USD",
    "eligibleQuantity": {
      "@type": "QuantitativeValue",
      "value": "1"
    },
    "url": "http://project1.local/account/tickets",
    "potentialAction": {
      "@type": "ViewAction",
      "target": "http://project1.local/account/tickets"
    }
  }}
</script>

问题是电子邮件显示为普通电子邮件。我究竟做错了什么?

谢谢!

PS:代码在https://developers.google.com/structured-data/testing-tool/

上验证

1 个答案:

答案 0 :(得分:1)

尝试使用我在下面发布的JSON。 PaymentComplete无法识别,因此我使用了OrderDelivered。您可以在这里找到更多信息:

https://schema.org/OrderStatus

我注意到您网址中的“门票”一词,您是否打算使用订单架构进行票证确认?我建议改用event reservation。使用它将与Google Now cards集成,并将事件输入到用户的日历中。您仍然可以使用url或modifyReservationurl生成操作按钮。

<script type="application/ld+json">
{
  "@context": "http://schema.org",
  "@type": "Order",
  "merchant": {
    "@type": "Organization",
    "name": "Test Ltd."
  },
  "orderNumber": "56d59b633427b",
  "orderStatus": "http://schema.org/OrderDelivered",
  "priceCurrency": "USD",
  "price": "41.00",
  "acceptedOffer": {
    "@type": "Offer",
    "itemOffered": {
      "@type": "Product",
      "name": "Test Products"
    },
    "price": "41.00",
    "priceCurrency": "USD",
    "eligibleQuantity": {
      "@type": "QuantitativeValue",
      "value": "1"
    }
  },
  "url": "https://project1.local/account/tickets",
  "potentialAction": {
    "@type": "ViewAction",
    "target": "https://project1.local/account/tickets"
  }
}
</script>

enter image description here