公交预订

使用场景

以下用例展示了有关如何使用 BusReservation 架构的常见示例。请参考这些示例,确保您的标记结构正确。

基本预订确认

发送预订确认邮件时,请在您的电子邮件中嵌入以下标记。

Google 应用会在行程当天显示预订详情,并会在考虑交通方式、路况等因素时通知用户出发时间,以便准时到达公交站。如果您提供如下所示的签到网址,Google 应用会在用户行程前 24 小时向用户显示该网址。

JSON-LD

<script type="application/ld+json">
{
  "@context": "http://schema.org",
  "@type": "BusReservation",
  "reservationNumber": "123456",
  "underName": {
    "@type": "Person",
    "name": "John Smith"
  },
  "reservationStatus": "http://schema.org/ReservationConfirmed",
  "reservationFor": {
    "@type": "BusTrip",
    "busCompany": {
      "@type": "Organization",
      "name": "Bolt NYC"
    },
    "departureBusStop": {
      "@type": "BusStop",
      "name": "Port Authority, NYC"
    },
    "departureTime": "2017-01-04T12:30:00-05:00",
    "arrivalBusStop": {
      "@type": "BusStop",
      "name": "Boston South Station"
    },
    "arrivalTime": "2017-01-04T17:10:00-05:00"
  }
}
</script>

微数据

<div itemscope itemtype="http://schema.org/BusReservation">
  <meta itemprop="reservationNumber" content="123456"/>
  <div itemprop="underName" itemscope itemtype="http://schema.org/Person">
    <meta itemprop="name" content="John Smith"/>
  </div>
  <link itemprop="reservationStatus" href="http://schema.org/ReservationConfirmed"/>
  <div itemprop="reservationFor" itemscope itemtype="http://schema.org/BusTrip">
    <div itemprop="busCompany" itemscope itemtype="http://schema.org/Organization">
      <meta itemprop="name" content="Bolt NYC"/>
    </div>
    <div itemprop="departureBusStop" itemscope itemtype="http://schema.org/BusStop">
      <meta itemprop="name" content="Port Authority, NYC"/>
    </div>
    <meta itemprop="departureTime" content="2017-01-04T12:30:00-05:00"/>
    <div itemprop="arrivalBusStop" itemscope itemtype="http://schema.org/BusStop">
      <meta itemprop="name" content="Boston South Station"/>
    </div>
    <meta itemprop="arrivalTime" content="2017-01-04T17:10:00-05:00"/>
  </div>
</div>

登机牌和票

除了预订确认以外,您还可以通过另外的电子邮件触发确认卡登机牌信息。

确认卡不仅有助于用户按时到达公交站,还可以在行程中向用户显示票券。为此,需要在标记中添加一些附加字段。如果乘客需要填写其他字段,请将这些字段添加到 additionalTicketText 字段中。

对于没有预订座位的门票,这些字段为:numSeatsticketNumberticketToken

JSON-LD

<script type="application/ld+json">
{
  "@context": "http://schema.org",
  "@type": "BusReservation",
  "reservationNumber": "123456",
  "underName": {
    "@type": "Person",
    "name": "John Smith"
  },
  "reservationStatus": "http://schema.org/ReservationConfirmed",
  "reservationFor": {
    "@type": "BusTrip",
    "busCompany": "Bolt NYC",
    "departureBusStop": {
      "@type": "BusStop",
      "name": "Port Authority, NYC"
    },
    "departureTime": "2017-01-04T12:30:00-05:00",
    "arrivalBusStop": {
      "@type": "BusStop",
      "name": "Boston South Station"
    },
    "arrivalTime": "2017-01-04T17:10:00-05:00"
  },
  "reservedTicket": {
    "@type": "Ticket",
    "underName": "John Smith",
    "ticketNumber": "123XYZ",
    "ticketToken": "aztecCode:AB34",
    "additionalTicketText": "We recommend that you arrive at the station at least 30 minutes prior to your scheduled departure. Allow additional time if you need help with baggage or tickets."
  }
}
</script>

微数据

<div itemscope itemtype="http://schema.org/BusReservation">
  <meta itemprop="reservationNumber" content="123456"/>
  <div itemprop="underName" itemscope itemtype="http://schema.org/Person">
    <meta itemprop="name" content="John Smith"/>
  </div>
  <link itemprop="reservationStatus" href="http://schema.org/ReservationConfirmed"/>
  <div itemprop="reservationFor" itemscope itemtype="http://schema.org/BusTrip">
    <meta itemprop="busCompany" content="Bolt NYC"/>
    <div itemprop="departureBusStop" itemscope itemtype="http://schema.org/BusStop">
      <meta itemprop="name" content="Port Authority, NYC"/>
    </div>
    <meta itemprop="departureTime" content="2017-01-04T12:30:00-05:00"/>
    <div itemprop="arrivalBusStop" itemscope itemtype="http://schema.org/BusStop">
      <meta itemprop="name" content="Boston South Station"/>
    </div>
    <meta itemprop="arrivalTime" content="2017-01-04T17:10:00-05:00"/>
  </div>
  <div itemprop="reservedTicket" itemscope itemtype="http://schema.org/Ticket">
    <meta itemprop="underName" content="John Smith"/>
    <meta itemprop="ticketNumber" content="123XYZ"/>
    <meta itemprop="ticketToken" content="aztecCode:AB34"/>
    <meta itemprop="additionalTicketText" content="We recommend that you arrive at the station at least 30 minutes prior to your scheduled departure. Allow additional time if you need help with baggage or tickets."/>
  </div>
</div>

对于保留座位的门票,这些字段为:seatNumberseatingTypeticketNumberticketToken

JSON-LD

<script type="application/ld+json">
{
  "@context": "http://schema.org",
  "@type": "BusReservation",
  "reservationNumber": "123456",
  "underName": {
    "@type": "Person",
    "name": "John Smith"
  },
  "reservationStatus": "http://schema.org/ReservationConfirmed",
  "reservationFor": {
    "@type": "BusTrip",
    "busCompany": "Bolt NYC",
    "departureBusStop": {
      "@type": "BusStop",
      "name": "Port Authority, NYC"
    },
    "departureTime": "2017-01-04T12:30:00-05:00",
    "arrivalBusStop": {
      "@type": "BusStop",
      "name": "Boston South Station"
    },
    "arrivalTime": "2017-01-04T17:10:00-05:00"
  },
  "reservedTicket": {
    "@type": "Ticket",
    "underName": "John Smith",
    "ticketedSeat": {
      "@type": "Seat",
      "seatNumber": "27B",
      "seatingType": "Coach"
    },
    "ticketNumber": "123XYZ",
    "ticketToken": "aztecCode:AB34",
    "additionalTicketText": "We recommend that you arrive at the station at least 30 minutes prior to your scheduled departure. Allow additional time if you need help with baggage or tickets."
  }
}
</script>

微数据

<div itemscope itemtype="http://schema.org/BusReservation">
  <meta itemprop="reservationNumber" content="123456"/>
  <div itemprop="underName" itemscope itemtype="http://schema.org/Person">
    <meta itemprop="name" content="John Smith"/>
  </div>
  <link itemprop="reservationStatus" href="http://schema.org/ReservationConfirmed"/>
  <div itemprop="reservationFor" itemscope itemtype="http://schema.org/BusTrip">
    <meta itemprop="busCompany" content="Bolt NYC"/>
    <div itemprop="departureBusStop" itemscope itemtype="http://schema.org/BusStop">
      <meta itemprop="name" content="Port Authority, NYC"/>
    </div>
    <meta itemprop="departureTime" content="2017-01-04T12:30:00-05:00"/>
    <div itemprop="arrivalBusStop" itemscope itemtype="http://schema.org/BusStop">
      <meta itemprop="name" content="Boston South Station"/>
    </div>
    <meta itemprop="arrivalTime" content="2017-01-04T17:10:00-05:00"/>
  </div>
  <div itemprop="reservedTicket" itemscope itemtype="http://schema.org/Ticket">
    <meta itemprop="underName" content="John Smith"/>
    <div itemprop="ticketedSeat" itemscope itemtype="http://schema.org/Seat">
      <meta itemprop="seatNumber" content="27B"/>
      <meta itemprop="seatingType" content="Coach"/>
    </div>
    <meta itemprop="ticketNumber" content="123XYZ"/>
    <meta itemprop="ticketToken" content="aztecCode:AB34"/>
    <meta itemprop="additionalTicketText" content="We recommend that you arrive at the station at least 30 minutes prior to your scheduled departure. Allow additional time if you need help with baggage or tickets."/>
  </div>
</div>

包含所有受支持字段的示例

以下示例填充了所有受支持的字段,供您参考:

JSON-LD

<script type="application/ld+json">
{
  "@context": "http://schema.org",
  "@type": "BusReservation",
  "reservationNumber": "123456",
  "url": "http://boltbus.com/view/123456",
  "underName": {
    "@type": "Person",
    "name": "John Smith",
    "email": "[email protected]"
  },
  "programMembership": {
    "@type": "ProgramMembership",
    "memberNumber": "12345",
    "program": "STA"
  },
  "bookingAgent": {
    "@type": "Organization",
    "name": "Bolt Bus NYC",
    "url": "http://boltbus.com/"
  },
  "bookingTime": "2013-01-14T13:05:00-05:00",
  "modifiedTime": "2013-03-14T13:05:00-05:00",
  "confirmReservationUrl": "http://boltbus.com/confirm?id=123456",
  "cancelReservationUrl": "http://boltbus.com/cancel?id=123456",
  "modifyReservationUrl": "http://boltbus.com/edit?id=123456",
  "checkinUrl": "http://boltbus.com/checkin?id=AB3XY2",
  "reservationStatus": "http://schema.org/ReservationConfirmed",
  "reservationFor": {
    "@type": "BusTrip",
    "name": "?",
    "busNumber": "63",
    "busName": "Bolt Bus NY:Boston",
    "busCompany": {
      "@type": "Organization",
      "name": "Bolt NYC"
    },
    "departureBusStop": {
      "@type": "BusStop",
      "name": "Port Authority, NYC",
      "address": {
        "@type": "PostalAddress",
        "streetAddress": "625 8th Avenue",
        "addressLocality": "New York",
        "addressRegion": "NY",
        "postalCode": "10018",
        "addressCountry": "USA"
      },
      "directions": "Bus terminals are at floors 2-4 of the Port Authority building"
    },
    "departureTime": "2017-01-04T12:30:00-05:00",
    "arrivalBusStop": {
      "@type": "BusStop",
      "name": "Boston South Station",
      "address": {
        "@type": "PostalAddress",
        "streetAddress": "Summer St.",
        "addressLocality": "Boston",
        "addressRegion": "MA",
        "postalCode": "02111",
        "addressCountry": "USA"
      },
      "directions": "Bus stops are at thewest side of the train station."
    },
    "arrivalTime": "2017-01-04T17:10:00-05:00"
  },
  "reservedTicket": {
    "@type": "Ticket",
    "ticketNumber": "123XYZ",
    "downloadUrl": "?",
    "printUrl": "?",
    "ticketToken": "qrCode:123456789",
    "additionalTicketText": "?",
    "price": "45.00",
    "priceCurrency": "USD",
    "underName": {
      "@type": "Person",
      "name": "Mary Smith"
    },
    "ticketedSeat": {
      "@type": "Seat",
      "seatingType": "Coach",
      "seatNumber": "27",
      "seatRow": "A"
    }
  }
}
</script>

微数据

<div itemscope itemtype="http://schema.org/BusReservation">
  <meta itemprop="reservationNumber" content="123456"/>
  <link itemprop="url" href="http://boltbus.com/view/123456"/>
  <div itemprop="underName" itemscope itemtype="http://schema.org/Person">
    <meta itemprop="name" content="John Smith"/>
    <meta itemprop="email" content="[email protected]"/>
  </div>
  <div itemprop="programMembership" itemscope itemtype="http://schema.org/ProgramMembership">
    <meta itemprop="memberNumber" content="12345"/>
    <meta itemprop="program" content="STA"/>
  </div>
  <div itemprop="bookingAgent" itemscope itemtype="http://schema.org/Organization">
    <meta itemprop="name" content="Bolt Bus NYC"/>
    <link itemprop="url" href="http://boltbus.com/"/>
  </div>
  <meta itemprop="bookingTime" content="2013-01-14T13:05:00-05:00"/>
  <meta itemprop="modifiedTime" content="2013-03-14T13:05:00-05:00"/>
  <link itemprop="confirmReservationUrl" href="http://boltbus.com/confirm?id=123456"/>
  <link itemprop="cancelReservationUrl" href="http://boltbus.com/cancel?id=123456"/>
  <link itemprop="modifyReservationUrl" href="http://boltbus.com/edit?id=123456"/>
  <link itemprop="checkinUrl" href="http://boltbus.com/checkin?id=AB3XY2"/>
  <link itemprop="reservationStatus" href="http://schema.org/ReservationConfirmed"/>
  <div itemprop="reservationFor" itemscope itemtype="http://schema.org/BusTrip">
    <meta itemprop="name" content="?"/>
    <meta itemprop="busNumber" content="63"/>
    <meta itemprop="busName" content="Bolt Bus NY:Boston"/>
    <div itemprop="busCompany" itemscope itemtype="http://schema.org/Organization">
      <meta itemprop="name" content="Bolt NYC"/>
    </div>
    <div itemprop="departureBusStop" itemscope itemtype="http://schema.org/BusStop">
      <meta itemprop="name" content="Port Authority, NYC"/>
      <div itemprop="address" itemscope itemtype="http://schema.org/PostalAddress">
        <meta itemprop="streetAddress" content="625 8th Avenue"/>
        <meta itemprop="addressLocality" content="New York"/>
        <meta itemprop="addressRegion" content="NY"/>
        <meta itemprop="postalCode" content="10018"/>
        <meta itemprop="addressCountry" content="USA"/>
      </div>
      <meta itemprop="directions" content="Bus terminals are at floors 2-4 of the Port Authority building"/>
    </div>
    <meta itemprop="departureTime" content="2017-01-04T12:30:00-05:00"/>
    <div itemprop="arrivalBusStop" itemscope itemtype="http://schema.org/BusStop">
      <meta itemprop="name" content="Boston South Station"/>
      <div itemprop="address" itemscope itemtype="http://schema.org/PostalAddress">
        <meta itemprop="streetAddress" content="Summer St."/>
        <meta itemprop="addressLocality" content="Boston"/>
        <meta itemprop="addressRegion" content="MA"/>
        <meta itemprop="postalCode" content="02111"/>
        <meta itemprop="addressCountry" content="USA"/>
      </div>
      <meta itemprop="directions" content="Bus stops are at thewest side of the train station."/>
    </div>
    <meta itemprop="arrivalTime" content="2017-01-04T17:10:00-05:00"/>
  </div>
  <div itemprop="reservedTicket" itemscope itemtype="http://schema.org/Ticket">
    <meta itemprop="ticketNumber" content="123XYZ"/>
    <meta itemprop="downloadUrl" content="?"/>
    <meta itemprop="printUrl" content="?"/>
    <meta itemprop="ticketToken" content="qrCode:123456789"/>
    <meta itemprop="additionalTicketText" content="?"/>
    <meta itemprop="price" content="45.00"/>
    <meta itemprop="priceCurrency" content="USD"/>
    <div itemprop="underName" itemscope itemtype="http://schema.org/Person">
      <meta itemprop="name" content="Mary Smith"/>
    </div>
    <div itemprop="ticketedSeat" itemscope itemtype="http://schema.org/Seat">
      <meta itemprop="seatingType" content="Coach"/>
      <meta itemprop="seatNumber" content="27"/>
      <meta itemprop="seatRow" content="A"/>
    </div>
  </div>
</div>

测试您的标记

您可以使用电子邮件标记测试工具验证您的标记。粘贴您的标记代码,然后点击验证按钮以扫描内容,然后在出现任何错误时接收报告。

规范

请查看电子邮件的详细信息,了解这些房源是否适用于您的公交车预订。通过标记这些额外的属性,您可以让 Google 向用户显示更丰富的公交预订信息。

属性 类型 说明
reservationNumber 文本 必需)预留的编号或 ID。
网址 网址 可查看预订信息的网页。
underName PersonOrganization 必填)乘客。
underName.name 文本 必填)人物的姓名。
underName.email 文本 电子邮件地址。
programMembership ProgramMembership 通过预订获得的飞行常客奖励计划、酒店会员回馈活动等会员资格。
programMembership.memberNumber 文本 成员资格的标识符。
programMembership.program 文本 课程的名称。
bookingAgent OrganizationPerson 预订代理机构或预订代理机构。它还接受字符串(例如 ")。
bookingAgent.name 文本 代理/服务的名称。
bookingAgent.url 网址 代理/服务的网站。
bookingTime DateTime 预订日期。
modifiedTime DateTime 推荐用于确认卡片/搜索答案)上次修改预订的时间。
confirmReservationUrl 网址 可以确认预订的网页。
cancelReservationUrl 网址 可以取消预订的网页。
modifyReservationUrl 网址 推荐用于确认卡片/搜索答案)可修改预订的网页。
checkinUrl 网址 乘客可办理登机手续的网页。
reservationStatus ReservationStatus 必填)预留的当前状态。
reservationFor BusTrip 必需)公交车行程的相关信息。
reservationFor.name 文本 BusTrip 的名称。
reservationFor.busNumber 文本 例如101。
reservationFor.busName 文本 例如Bolt Express。
reservationFor.busCompany 组织 必填),例如Bolt NYC。同样接受字符串(例如“Bolt NYC”)。
reservationFor.busCompany.name 文本 必填)组织的名称。
reservationFor.departureBusStop BusStopBusStation 必需)公交车的出发地。
reservationFor.departureBusStop.name 文本 必需)公交站的名称。
reservationFor.departureBusStop.address PostalAddress 公交车站 / 车站的地址。
reservationFor.departureBusStop.address.streetAddress 文本 (推荐用于确认卡片/搜索答案)公交车站 / 车站的街道地址。
reservationFor.departureBusStop.address.addressLocality 文本 (推荐用于确认卡片/搜索答案)发车公交车站 / 车站的市行政区(如城市)。
reservationFor.departureBusStop.address.addressRegion 文本 (推荐用于确认卡片/搜索答案)公交车站/车站所在的区域(例如州/省)。
reservationFor.departureBusStop.address.postalCode 文本 (推荐用于确认卡片/搜索答案)公交车站 / 车站的邮政编码。
reservationFor.departureBusStop.address.addressCountry 文字或国家/地区 (推荐用于确认卡片/搜索答案)公交车站/车站发车国家/地区。
reservationFor.departureBusStop.directions 文本 前往公交站的路线。
reservationFor.departureTime DateTime 必需)公交车发车时间。
reservationFor.arrivalBusStop BusStopBusStation 必需)公交车的到达地。
reservationFor.arrivalBusStop.name 文本 必需)公交站的名称。
reservationFor.arrivalBusStop.address PostalAddress 公交车站 / 车站的地址。
reservationFor.arrivalBusStop.address.streetAddress 文本 (推荐用于确认卡片/搜索答案)到达公交站 / 车站的街道地址。
reservationFor.arrivalBusStop.address.addressLocality 文本 (推荐用于确认卡片/搜索答案)到达公交站 / 车站所在的市行政区(例如城市)。
reservationFor.arrivalBusStop.address.addressRegion 文本 (推荐用于确认卡片/搜索答案)到达公交站/车站的区域(例如州/省/自治区/直辖市)。
reservationFor.arrivalBusStop.address.postalCode 文本 (推荐用于确认卡片/搜索答案)到达公交站 / 车站的邮政编码。
reservationFor.arrivalBusStop.address.addressCountry 文字或国家/地区 (推荐用于确认卡片/搜索答案)到达公交站/车站所在的国家/地区。
reservationFor.arrivalBusStop.directions 文本 前往公交站的路线。
reservationFor.arrivalTime DateTime 必填)公交到达时间。
reservedTicket 票务信息。
reservedTicket.ticketNumber 文本 门票的编号或 ID。
reservedTicket.downloadUrl 网址 .
reservedTicket.printUrl 网址 .
reservedTicket.ticketToken Text 或 URL 如果条形码图片托管在您的网站上,则此字段的值为该图片的网址或者条形码或二维码 URI,例如“barcode128:AB34”(ISO-15417 条形码)、"qrCode:AB34"(二维码)、"aztecCode:AB34"(阿兹特克代码),"barcodeEAN:1234"(EAN 代码)和“barcodeUPCA:1234”(UPCA 代码)。
reservedTicket.additionalTicketText 文本 关于门票的其他说明文字。
reservedTicket.price 文本 门票的总价。
reserveTicket.priceCurrency 文本 门票价格的币种(采用由 3 个字母表示的 ISO 4217 格式)。
reservedTicket.underName PersonOrganization 门票所面向的个人或组织。
reservedTicket.underName.name 文本 此人的姓名。
reservedTicket.ticketedSeat 席位 预订座位的位置(例如,(第 27B 条)。.
reservedTicket.ticketedSeat.seatingType 文本 座位的类型/等级。
reservedTicket.ticketedSeat.seatNumber 文本 预订座位的位置。
reservedTicket.ticketedSeat.seatRow 文本 预订座位的行位置。