2017-08-30 165 views
0

我對此很陌生,我正在努力爲我的網球運動員提供服務,他們可以在網站上填寫預備法庭的表格。當他們想玩時,表格會發送一封包含時間和地點的電子郵件。確認後,應該更新日曆。我嘗試過提供的各種場景,但沒有奏效。我不確定我錯過了什麼。我只是發送電子郵件恩對自己如下:電子郵件中的事件更新日曆

<html> 
<body> 
<script type="application/ld+json"> 
{ 
    "@context":    "http://schema.org", 
    "@type":     "EventReservation", 
    "reservationNumber":  "IO12345", 
    "underName": { 
    "@type":    "Person", 
    "name":    "John Smith" 
    }, 
    "reservationFor": { 
    "@type":    "Event", 
    "name":    "Google I/O 2013", 
    "startDate":   "2017-08-30T08:30:00-08:00", 
    "location": { 
     "@type":    "Place", 
     "name":    "Moscone Center", 
     "address": { 
     "@type":   "PostalAddress", 
     "streetAddress": "800 Howard St.", 
     "addressLocality": "San Francisco", 
     "addressRegion": "CA", 
     "postalCode":  "94103", 
     "addressCountry": "US" 
     } 
    } 
    } 
} 
</script> 
<p> 
    Dear John, thanks for booking your Google I/O ticket with us. 
</p> 
<p> 
    BOOKING DETAILS<br/> 
    Reservation number: IO12345<br/> 
    Order for: John Smith<br/> 
    Event: Google I/O 2013<br/> 
    Start time: May 15th 2013 8:00am PST<br/> 
    Venue: Moscone Center, 800 Howard St., San Francisco, CA 94103<br/> 
</p> 


</body> 

</html> 

,但我認爲這只是一個如上面的文字。 在此先感謝, Hagop

回答

0

你錯過了一個屬性:reservationStatus這是必需的。我用Basic event reminder without a ticket JSON-LD:

<html> 
    <head> 
    <script type="application/ld+json"> 
{ 
    "@context": "http://schema.org", 
    "@type": "EventReservation", 
    "reservationNumber": "E123456789", 
    "reservationStatus": "http://schema.org/Confirmed", 
    "underName": { 
    "@type": "Person", 
    "name": "John Smith" 
    }, 
    "reservationFor": { 
    "@type": "Event", 
    "name": "Foo Fighters Concert", 
    "startDate": "2017-09-06T11:30:00-12:30", 
    "location": { 
     "@type": "Place", 
     "name": "AT&T Park", 
     "address": { 
     "@type": "PostalAddress", 
     "streetAddress": "24 Willie Mays Plaza", 
     "addressLocality": "San Francisco", 
     "addressRegion": "CA", 
     "postalCode": "94107", 
     "addressCountry": "US" 
     } 
    } 
    } 
} 
</script> 
    </head> 
    <body> 
    <p> 
     An event was reserved. 
    </p> 
    </body> 
</html> 

下面是結果:

enter image description here

我試過你的代碼,並添加了reservationStatus和它的工作。您可以使用Email Markup Tester來測試您的模式。

希望這會有所幫助。

相關問題