我想发送一封包含定义两张票的架构的电子邮件。 文档说明:
如果您想要每个人拥有一张票(即条形码)并拥有 票证上每个人的姓名,创建多个 事件保留(每个人一个),numSeats设置为1 下面的例子显示了它的样子。
可悲的是,这并不是那样的。如果我使用此架构(没有座位,numSeats设置为“1”):
<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-03-06T19:30:00-08:00",
"location": {
"@type": "Place",
"name": "AT&T Park",
"address": {
"@type": "PostalAddress",
"streetAddress": "24 Willie Mays Plaza",
"addressLocality": "San Francisco",
"addressRegion": "CA",
"postalCode": "94107",
"addressCountry": "US"
}
}
},
"numSeats": "1",
"ticketToken": "qrCode:AB34",
"ticketNumber": "abc123",
"ticketDownloadUrl": "http://..../ticket.pdf",
"ticketPrintUrl": "http://..../ticket.pdf"
},
{
"@context": "http://schema.org",
"@type": "EventReservation",
"reservationNumber": "E123456789",
"reservationStatus": "http://schema.org/Confirmed",
"underName": {
"@type": "Person",
"name": "Eva Green"
},
"reservationFor": {
"@type": "Event",
"name": "Foo Fighters Concert",
"startDate": "2017-03-06T19:30:00-08:00",
"location": {
"@type": "Place",
"name": "AT&T Park",
"address": {
"@type": "PostalAddress",
"streetAddress": "24 Willie Mays Plaza",
"addressLocality": "San Francisco",
"addressRegion": "CA",
"postalCode": "94107",
"addressCountry": "US"
}
}
},
"numSeats": "1",
"ticketToken": "qrCode:AB34",
"ticketNumber": "abc456",
"ticketDownloadUrl": "http://..../ticket.pdf",
"ticketPrintUrl": "http://..../ticket.pdf"
}
]
</script>
这将导致收件箱中的邮件声明此预订仅包含一个故障单。 获取收件箱以表明预订包含两张票的唯一方法是添加一个场地座位。 E.g:
<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-03-06T19:30:00-08:00",
"location": {
"@type": "Place",
"name": "AT&T Park",
"address": {
"@type": "PostalAddress",
"streetAddress": "24 Willie Mays Plaza",
"addressLocality": "San Francisco",
"addressRegion": "CA",
"postalCode": "94107",
"addressCountry": "US"
}
}
},
"numSeats": "1",
"venueSeat": "12",
"ticketToken": "qrCode:AB34",
"ticketNumber": "abc123",
"ticketDownloadUrl": "http://..../ticket.pdf",
"ticketPrintUrl": "http://..../ticket.pdf"
},
{
"@context": "http://schema.org",
"@type": "EventReservation",
"reservationNumber": "E123456789",
"reservationStatus": "http://schema.org/Confirmed",
"underName": {
"@type": "Person",
"name": "Eva Green"
},
"reservationFor": {
"@type": "Event",
"name": "Foo Fighters Concert",
"startDate": "2017-03-06T19:30:00-08:00",
"location": {
"@type": "Place",
"name": "AT&T Park",
"address": {
"@type": "PostalAddress",
"streetAddress": "24 Willie Mays Plaza",
"addressLocality": "San Francisco",
"addressRegion": "CA",
"postalCode": "94107",
"addressCountry": "US"
}
}
},
"numSeats": "1",
"venueSeat": "13",
"ticketToken": "qrCode:AB34",
"ticketNumber": "abc456",
"ticketDownloadUrl": "http://..../ticket.pdf",
"ticketPrintUrl": "http://..../ticket.pdf"
}
]
</script>
使用此脚本,收件箱中的邮件将正确说明预订包含两张票,并将另外打印两个座位。 但在我的情况下,我们没有预留座位,所以我无法添加此参数。
任何想法如何解决这个问题或谷歌的任何计划来解决这个问题?
奖金问题: 我实际上无法看到票。既不是QR码,也不是PDF的下载链接。任何想法为什么会这样?
答案 0 :(得分:1)
基于documentaiton“有两个选项可以做多张票”:
第一个是更改 numSeats 。这意味着单次预订将代表 numSeats 个人数量的门票。这是您想要的选项,因为您没有预留座位。
我使用了以下架构:
<script type="application/ld+json">
{
"@context": "http://schema.org",
"@type": "EventReservation",
"reservationNumber": "ABCD12345",
"reservationStatus": "http://schema.org/Confirmed",
"underName": {
"@type": "Person",
"name": "John Smith"
},
"reservationFor": {
"@type": "MusicEvent",
"name": "Foo Fighters Concert",
"url": "http://foofighterstour.com/SFO",
"performer": {
"@type": "Person",
"name": "The Foo Fighters",
"image": "http://www.amprocktv.com/wp-content/uploads/2013/01/foo-fighters-1-680x383.jpg"
},
"startDate": "2015-05-24T12:00:00-08:00",
"endDate": "2015-05-24T16:00:00-08:00",
"doorTime": "2015-05-24T11:00:00-08:00",
"location": {
"@type": "Place",
"name": "AT&T Park",
"address": {
"@type": "PostalAddress",
"streetAddress": "AT&T Park",
"addressLocality": "San Francisco",
"addressRegion": "CA",
"postalCode": "94107",
"addressCountry": "US"
}
}
},
"ticketDownloadUrl": "http://www.example.pdf",
"ticketPrintUrl": "http://www.example.pdf",
"modifyreservationurl": "http://www.example.pdf",
"ticketToken": "qrCode:AB34",
"ticketNumber": "abc12345",
"numSeats": "2"
}
</script>
我能够在收件箱中生成2张票,创建2张Google即时贴,在Gmail和收件箱中生成操作按钮(修改预订)。修改预订操作按钮指向票证。注意我尝试使用“URL”属性来生成“View Ticket”操作按钮,但注意到它消失了。我也能够生成QRcode,然而,QRcode似乎在第二张Now卡上被打破了。
*更新 - 以前的卡片截图来自我使用Google的iphone,这些卡在Android设备上显示不同。使用Android设备时出现其中一个故障单属性(ticketdownloadurl / ticketprinturl):