2016-03-01 45 views
1

我想執行的命令模式權上所提供:https://developers.google.com/gmail/markup/reference/order訂單模式沒有顯示在Gmail

<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

使用我貼在下面的JSON嘗試。 PaymentComplete無法識別,所以我使用了OrderDelivered。您可以在這裏找到更多的信息:

https://schema.org/OrderStatus

我在你的URL注意到一個詞「入場券」,你打算使用的票確認的訂單模式?我建議改用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