ユースケース
次のユースケースでは、TrainReservation
スキーマの一般的な使用例を示します。以下の例を使用して、マークアップが適切に構造化されていることを確認します。
予約に関する基本的な確認
予約確認を送信する際に、次のマークアップをメールに埋め込む。
経路上の日に予約の詳細が表示され、駅や停留所に時間どおりに到着するための移動手段(移動手段や交通状況など)が通知されます。以下の例のようなチェックイン URL を指定すると、ユーザーが訪問する 24 時間前までに Google アプリがユーザーにこの URL を表示します。
JSON-LD
<script type="application/ld+json">
{
"@context": "http://schema.org",
"@type": "TrainReservation",
"reservationNumber": "AB3XY2",
"reservationStatus": "http://schema.org/ReservationConfirmed",
"reservationFor": {
"@type": "TrainTrip",
"departureStation": {
"@type": "TrainStation",
"name": "Munich Central"
},
"departureTime": "2017-01-04T10:30:00+01:00",
"arrivalStation": {
"@type": "TrainStation",
"name": "Paris Gare De Lyon"
},
"arrivalTime": "2017-01-04T03:10:00+01:00"
}
}
</script>
microdata
<div itemscope itemtype="http://schema.org/TrainReservation">
<meta itemprop="reservationNumber" content="AB3XY2"/>
<link itemprop="reservationStatus" href="http://schema.org/ReservationConfirmed"/>
<div itemprop="reservationFor" itemscope itemtype="http://schema.org/TrainTrip">
<div itemprop="departureStation" itemscope itemtype="http://schema.org/TrainStation">
<meta itemprop="name" content="Munich Central"/>
</div>
<meta itemprop="departureTime" content="2017-01-04T10:30:00+01:00"/>
<div itemprop="arrivalStation" itemscope itemtype="http://schema.org/TrainStation">
<meta itemprop="name" content="Paris Gare De Lyon"/>
</div>
<meta itemprop="arrivalTime" content="2017-01-04T03:10:00+01:00"/>
</div>
</div>
搭乗券とチケット
予約確認メールに加えて、確認カードの搭乗券を別途メールでトリガーすることもできます。
確認カードは、時間どおりに駅に到着できるようにするだけでなく、移動中にチケットを提示することもできます。そのためには、いくつかの追加フィールドをマークアップに含める必要があります。乗客の搭乗に追加が必要なフィールドがある場合は、additionalTicketText
フィールドに追加します。
座席が予約されていないチケットの場合、このフィールドは numSeats
、ticketNumber
、ticketToken
です。
JSON-LD
<script type="application/ld+json">
{
"@context": "http://schema.org",
"@type": "TrainReservation",
"reservationNumber": "AB3XY2",
"underName": {
"@type": "Person",
"name": "Eva Green"
},
"reservationStatus": "http://schema.org/ReservationConfirmed",
"reservationFor": {
"@type": "TrainTrip",
"departureStation": {
"@type": "TrainStation",
"name": "Munich Central"
},
"departureTime": "2017-01-04T10:30:00+01:00",
"arrivalStation": {
"@type": "TrainStation",
"name": "Paris Gare De Lyon"
},
"arrivalTime": "2017-01-04T03:10:00+01:00"
},
"reservedTicket": {
"@type": "Ticket",
"underName": "Eva Green",
"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>
microdata
<div itemscope itemtype="http://schema.org/TrainReservation">
<meta itemprop="reservationNumber" content="AB3XY2"/>
<div itemprop="underName" itemscope itemtype="http://schema.org/Person">
<meta itemprop="name" content="Eva Green"/>
</div>
<link itemprop="reservationStatus" href="http://schema.org/ReservationConfirmed"/>
<div itemprop="reservationFor" itemscope itemtype="http://schema.org/TrainTrip">
<div itemprop="departureStation" itemscope itemtype="http://schema.org/TrainStation">
<meta itemprop="name" content="Munich Central"/>
</div>
<meta itemprop="departureTime" content="2017-01-04T10:30:00+01:00"/>
<div itemprop="arrivalStation" itemscope itemtype="http://schema.org/TrainStation">
<meta itemprop="name" content="Paris Gare De Lyon"/>
</div>
<meta itemprop="arrivalTime" content="2017-01-04T03:10:00+01:00"/>
</div>
<div itemprop="reservedTicket" itemscope itemtype="http://schema.org/Ticket">
<meta itemprop="underName" content="Eva Green"/>
<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>
座席が予約済みのチケットの場合、このフィールドは seatNumber
、seatingType
、ticketNumber
、ticketToken
です。
JSON-LD
<script type="application/ld+json">
{
"@context": "http://schema.org",
"@type": "TrainReservation",
"reservationNumber": "AB3XY2",
"underName": {
"@type": "Person",
"name": "Eva Green"
},
"reservationStatus": "http://schema.org/ReservationConfirmed",
"reservationFor": {
"@type": "TrainTrip",
"departureStation": {
"@type": "TrainStation",
"name": "Munich Central"
},
"departureTime": "2017-01-04T10:30:00+01:00",
"arrivalStation": {
"@type": "TrainStation",
"name": "Paris Gare De Lyon"
},
"arrivalTime": "2017-01-04T03:10:00+01:00"
},
"reservedTicket": {
"@type": "Ticket",
"underName": "Eva Green",
"ticketedSeat": {
"@type": "Seat",
"seatNumber": "27B",
"seatingType": "1st Class"
},
"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>
microdata
<div itemscope itemtype="http://schema.org/TrainReservation">
<meta itemprop="reservationNumber" content="AB3XY2"/>
<div itemprop="underName" itemscope itemtype="http://schema.org/Person">
<meta itemprop="name" content="Eva Green"/>
</div>
<link itemprop="reservationStatus" href="http://schema.org/ReservationConfirmed"/>
<div itemprop="reservationFor" itemscope itemtype="http://schema.org/TrainTrip">
<div itemprop="departureStation" itemscope itemtype="http://schema.org/TrainStation">
<meta itemprop="name" content="Munich Central"/>
</div>
<meta itemprop="departureTime" content="2017-01-04T10:30:00+01:00"/>
<div itemprop="arrivalStation" itemscope itemtype="http://schema.org/TrainStation">
<meta itemprop="name" content="Paris Gare De Lyon"/>
</div>
<meta itemprop="arrivalTime" content="2017-01-04T03:10:00+01:00"/>
</div>
<div itemprop="reservedTicket" itemscope itemtype="http://schema.org/Ticket">
<meta itemprop="underName" content="Eva Green"/>
<div itemprop="ticketedSeat" itemscope itemtype="http://schema.org/Seat">
<meta itemprop="seatNumber" content="27B"/>
<meta itemprop="seatingType" content="1st Class"/>
</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>
複数人乗り
複数の乗客を含む予約について説明する場合は、1 つの区間につき 1 人につき 1 つの TrainReservation
を使用します。
JSON-LD
<script type="application/ld+json">
[
{
"@context": "http://schema.org",
"@type": "TrainReservation",
"reservationNumber": "AB3XY2",
"reservationStatus": "http://schema.org/ReservationConfirmed",
"reservationFor": {
"@type": "TrainTrip",
"departureStation": {
"@type": "TrainStation",
"name": "Munich Central"
},
"departureTime": "2017-01-04T10:30:00+01:00",
"arrivalStation": {
"@type": "TrainStation",
"name": "Paris Gare De Lyon"
},
"arrivalTime": "2017-01-04T03:10:00+01:00"
},
"reservedTicket": {
"@type": "Ticket",
"underName": {
"@type": "Person",
"name": "Eva Green"
}
}
},
{
"@context": "http://schema.org",
"@type": "TrainReservation",
"reservationNumber": "AB3XY2",
"reservationStatus": "http://schema.org/ReservationConfirmed",
"reservationFor": {
"@type": "TrainTrip",
"departureStation": {
"@type": "TrainStation",
"name": "Munich Central"
},
"departureTime": "2017-01-04T10:30:00+01:00",
"arrivalStation": {
"@type": "TrainStation",
"name": "Paris Gare De Lyon"
},
"arrivalTime": "2017-01-04T03:10:00+01:00"
},
"reservedTicket": {
"@type": "Ticket",
"underName": {
"@type": "Person",
"name": "John Green"
}
}
},
{
"@context": "http://schema.org",
"@type": "TrainReservation",
"reservationNumber": "AB3XY2",
"reservationStatus": "http://schema.org/ReservationConfirmed",
"reservationFor": {
"@type": "TrainTrip",
"departureStation": {
"@type": "TrainStation",
"name": "Munich Central"
},
"departureTime": "2017-01-04T10:30:00+01:00",
"arrivalStation": {
"@type": "TrainStation",
"name": "Paris Gare De Lyon"
},
"arrivalTime": "2017-01-04T03:10:00+01:00"
},
"reservedTicket": {
"@type": "Ticket",
"underName": {
"@type": "Person",
"name": "Carol Green"
}
}
},
{
"@context": "http://schema.org",
"@type": "TrainReservation",
"reservationNumber": "AB3XY2",
"reservationStatus": "http://schema.org/ReservationConfirmed",
"reservationFor": {
"@type": "TrainTrip",
"departureStation": {
"@type": "TrainStation",
"name": "Munich Central"
},
"departureTime": "2017-01-04T10:30:00+01:00",
"arrivalStation": {
"@type": "TrainStation",
"name": "Paris Gare De Lyon"
},
"arrivalTime": "2017-01-04T03:10:00+01:00"
},
"reservedTicket": {
"@type": "Ticket",
"underName": {
"@type": "Person",
"name": "Daniel Green"
}
}
}
]
</script>
microdata
<div itemscope itemtype="http://schema.org/TrainReservation">
<meta itemprop="reservationNumber" content="AB3XY2"/>
<link itemprop="reservationStatus" href="http://schema.org/ReservationConfirmed"/>
<div itemprop="reservationFor" itemscope itemtype="http://schema.org/TrainTrip">
<div itemprop="departureStation" itemscope itemtype="http://schema.org/TrainStation">
<meta itemprop="name" content="Munich Central"/>
</div>
<meta itemprop="departureTime" content="2017-01-04T10:30:00+01:00"/>
<div itemprop="arrivalStation" itemscope itemtype="http://schema.org/TrainStation">
<meta itemprop="name" content="Paris Gare De Lyon"/>
</div>
<meta itemprop="arrivalTime" content="2017-01-04T03:10:00+01:00"/>
</div>
<div itemprop="reservedTicket" itemscope itemtype="http://schema.org/Ticket">
<div itemprop="underName" itemscope itemtype="http://schema.org/Person">
<meta itemprop="name" content="Eva Green"/>
</div>
</div>
</div>
<div itemscope itemtype="http://schema.org/TrainReservation">
<meta itemprop="reservationNumber" content="AB3XY2"/>
<link itemprop="reservationStatus" href="http://schema.org/ReservationConfirmed"/>
<div itemprop="reservationFor" itemscope itemtype="http://schema.org/TrainTrip">
<div itemprop="departureStation" itemscope itemtype="http://schema.org/TrainStation">
<meta itemprop="name" content="Munich Central"/>
</div>
<meta itemprop="departureTime" content="2017-01-04T10:30:00+01:00"/>
<div itemprop="arrivalStation" itemscope itemtype="http://schema.org/TrainStation">
<meta itemprop="name" content="Paris Gare De Lyon"/>
</div>
<meta itemprop="arrivalTime" content="2017-01-04T03:10:00+01:00"/>
</div>
<div itemprop="reservedTicket" itemscope itemtype="http://schema.org/Ticket">
<div itemprop="underName" itemscope itemtype="http://schema.org/Person">
<meta itemprop="name" content="John Green"/>
</div>
</div>
</div>
<div itemscope itemtype="http://schema.org/TrainReservation">
<meta itemprop="reservationNumber" content="AB3XY2"/>
<link itemprop="reservationStatus" href="http://schema.org/ReservationConfirmed"/>
<div itemprop="reservationFor" itemscope itemtype="http://schema.org/TrainTrip">
<div itemprop="departureStation" itemscope itemtype="http://schema.org/TrainStation">
<meta itemprop="name" content="Munich Central"/>
</div>
<meta itemprop="departureTime" content="2017-01-04T10:30:00+01:00"/>
<div itemprop="arrivalStation" itemscope itemtype="http://schema.org/TrainStation">
<meta itemprop="name" content="Paris Gare De Lyon"/>
</div>
<meta itemprop="arrivalTime" content="2017-01-04T03:10:00+01:00"/>
</div>
<div itemprop="reservedTicket" itemscope itemtype="http://schema.org/Ticket">
<div itemprop="underName" itemscope itemtype="http://schema.org/Person">
<meta itemprop="name" content="Carol Green"/>
</div>
</div>
</div>
<div itemscope itemtype="http://schema.org/TrainReservation">
<meta itemprop="reservationNumber" content="AB3XY2"/>
<link itemprop="reservationStatus" href="http://schema.org/ReservationConfirmed"/>
<div itemprop="reservationFor" itemscope itemtype="http://schema.org/TrainTrip">
<div itemprop="departureStation" itemscope itemtype="http://schema.org/TrainStation">
<meta itemprop="name" content="Munich Central"/>
</div>
<meta itemprop="departureTime" content="2017-01-04T10:30:00+01:00"/>
<div itemprop="arrivalStation" itemscope itemtype="http://schema.org/TrainStation">
<meta itemprop="name" content="Paris Gare De Lyon"/>
</div>
<meta itemprop="arrivalTime" content="2017-01-04T03:10:00+01:00"/>
</div>
<div itemprop="reservedTicket" itemscope itemtype="http://schema.org/Ticket">
<div itemprop="underName" itemscope itemtype="http://schema.org/Person">
<meta itemprop="name" content="Daniel Green"/>
</div>
</div>
</div>
サポートされているすべてのフィールドの例
サポートされているすべてのフィールドが入力された例を次に示します。
JSON-LD
<script type="application/ld+json">
{
"@context": "http://schema.org",
"@type": "TrainReservation",
"reservationNumber": "AB3XY2",
"url": "http://eurotravel/view/AB3XY2",
"underName": {
"@type": "Person",
"name": "John Smith",
"email": "john@mail.com"
},
"programMembership": {
"@type": "ProgramMembership",
"memberNumber": "12345",
"program": "STA"
},
"bookingAgent": {
"@type": "Organization",
"name": "European Vacations",
"url": "http://eurotravel/"
},
"bookingTime": "2013-01-14T13:05:00-05:00",
"modifiedTime": "2013-03-14T13:05:00-05:00",
"confirmReservationUrl": "http://eurotravel/confirm?id=AB3XY2",
"cancelReservationUrl": "http://eurotravel/cancel?id=AB3XY2",
"modifyReservationUrl": "http://eurotravel/edit?id=AB3XY2",
"reservationStatus": "http://schema.org/ReservationConfirmed",
"checkinUrl": "http://train.com/checkin?id=AB3XY2",
"reservationFor": {
"@type": "TrainTrip",
"trainNumber": "9203",
"trainName": "Orient Express",
"trainCode": "iGTV",
"trainCompany": {
"@type": "Organization"
},
"departureStation": {
"@type": "TrainStation",
"name": "Munich Central"
},
"departurePlatform": "64",
"departureTime": "2017-01-04T10:30:00+01:00",
"arrivalStation": {
"@type": "TrainStation",
"name": "Paris Gare De Lyon"
},
"arrivalPlatform": "101B",
"arrivalTime": "2017-01-04T03:10:00+01:00"
},
"reservedTicket": {
"@type": "Ticket",
"ticketNumber": "123XYZ",
"downloadUrl": "?",
"printUrl": "?",
"ticketToken": "qrCode:123456789",
"additionalTicketText": "?",
"price": "135.00",
"priceCurrency": "EUR",
"underName": {
"@type": "Person",
"name": "Mary Smith"
},
"ticketedSeat": {
"@type": "Seat",
"seatingType": "1st Class",
"seatNumber": "27",
"seatRow": "A"
}
}
}
</script>
microdata
<div itemscope itemtype="http://schema.org/TrainReservation">
<meta itemprop="reservationNumber" content="AB3XY2"/>
<link itemprop="url" href="http://eurotravel/view/AB3XY2"/>
<div itemprop="underName" itemscope itemtype="http://schema.org/Person">
<meta itemprop="name" content="John Smith"/>
<meta itemprop="email" content="john@mail.com"/>
</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="European Vacations"/>
<link itemprop="url" href="http://eurotravel/"/>
</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://eurotravel/confirm?id=AB3XY2"/>
<link itemprop="cancelReservationUrl" href="http://eurotravel/cancel?id=AB3XY2"/>
<link itemprop="modifyReservationUrl" href="http://eurotravel/edit?id=AB3XY2"/>
<link itemprop="reservationStatus" href="http://schema.org/ReservationConfirmed"/>
<link itemprop="checkinUrl" href="http://train.com/checkin?id=AB3XY2"/>
<div itemprop="reservationFor" itemscope itemtype="http://schema.org/TrainTrip">
<meta itemprop="trainNumber" content="9203"/>
<meta itemprop="trainName" content="Orient Express"/>
<meta itemprop="trainCode" content="iGTV"/>
<div itemprop="trainCompany" itemscope itemtype="http://schema.org/Organization">
</div>
<div itemprop="departureStation" itemscope itemtype="http://schema.org/TrainStation">
<meta itemprop="name" content="Munich Central"/>
</div>
<meta itemprop="departurePlatform" content="64"/>
<meta itemprop="departureTime" content="2017-01-04T10:30:00+01:00"/>
<div itemprop="arrivalStation" itemscope itemtype="http://schema.org/TrainStation">
<meta itemprop="name" content="Paris Gare De Lyon"/>
</div>
<meta itemprop="arrivalPlatform" content="101B"/>
<meta itemprop="arrivalTime" content="2017-01-04T03:10:00+01: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="135.00"/>
<meta itemprop="priceCurrency" content="EUR"/>
<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="1st Class"/>
<meta itemprop="seatNumber" content="27"/>
<meta itemprop="seatRow" content="A"/>
</div>
</div>
</div>
マークアップをテスト
マークアップの検証には、メール マークアップ テスター ツールを使用できます。マークアップ コードを貼り付けて [検証] ボタンをクリックすると、コンテンツがスキャンされ、エラーが見つかった場合はレポートが届きます。
仕様
メールの詳細をご覧になり、これらの予約のいずれかが列車の予約に適用されるかどうかをご確認ください。これらの追加プロパティをマークアップすることで、列車の予約に関するより詳細な説明を Google からユーザーに表示できます。
プロパティ | タイプ | 説明 |
---|---|---|
予約番号 | Text | (必須)予約の番号または ID。 |
URL | URL | 予約を表示できるウェブページ。 |
UnderName | Person または Organization | 乗客名。 |
underName | Text | (確認カード/検索の回答で推奨)担当者の名前。 |
underName.メールアドレス | Text | メールアドレス。 |
プログラム メンバーシップ | プログラムのメンバー | マイレージ、ホテル向けポイント プログラムなどのメンバーシップが予約に適用されます。 |
programMembership.memberNumber | Text | メンバーシップの ID。 |
programMembership.program | Text | プログラムの名前。 |
BookAgent | Organization または Person | 予約エージェントまたは代理店。文字列(「.」など)も使用できます。 |
bookingAgent.名前 | Text | エージェント/サービスの名前。 |
bookingAgent.URL | URL | エージェント/サービスのウェブサイト。 |
予約時間 | DateTime | 予約が行われた日付。 |
変更日時 | DateTime | (確認カード / 検索の回答に推奨)予約の最終更新日時。 |
confirmReservationUrl | URL | 予約を確認できるウェブページです。 |
cancelReservationUrl | URL | 予約をキャンセルできるウェブページです。 |
changeReservationUrl | URL | (確認カード / 検索での回答に推奨)予約を変更できるウェブページです。 |
予約ステータス | ReservationStatus | (必須)予約の現在のステータス。 |
チェックイン URL | URL | 乗客がチェックインできるウェブページ。 |
予約 | 電車の旅 | (必須)列車ルートに関する情報。 |
reservationFor.trainNumber | Text | (確認カード/検索の回答に推奨)列車番号。 |
reservationFor.train の名前 | Text | 列車の名前。 |
reservationFor.trainCode | Text | 電車の一意の識別子。 |
reservationFor.train 会社 | 組織 | 電車を運営している組織。文字列(「.」など)も使用できます。 |
reservationFor の StatStation | TrainStation | (必須)電車の出発駅。 |
reservationFor.exitStation. | Text | (必須)TrainStation の名前。 |
reservationFor の出発プラットフォーム | Text | 電車が出発するプラットホーム。 |
reservationFor の出発時刻 | DateTime | (必須)予定出発時刻。 |
reservationFor.arrivalStation | TrainStation | (必須)鉄道の終着駅。 |
reservationFor.arrivalStation. | Text | (必須)TrainStation の名前。 |
reservationFor.arrivalPlatform | Text | 電車が到着するプラットホーム。 |
reservationFor.arrivalTime | DateTime | (必須)到着予定時刻。 |
予約済みのチケット | チケット | チケット情報。 |
reservedTicket.ticketNumber | Text | チケットの番号または ID。 |
reservedTicket.downloadUrl | URL | . |
reservedTicket.printUrl | URL | . |
reservedTicket.ticketToken | テキストまたは URL | バーコード画像がサイトでホストされている場合、フィールドの値は画像の URL、またはバーコードまたは QR URI(「barcode128:AB34」(ISO-15417 バーコード)、「qrCode:AB34」(QR コード)、「aztecCode:AB34」(Aztec コード)、「bar4EAN:13UP2.CA:13UP」(コード 12:13UP) |
reservedTicket.additionalTicketText | Text | チケットに関するその他の説明テキスト。 |
reservedTicket | Text | チケットの合計金額。 |
reservedTicket.priceCurrency | Text | チケットの価格の通貨(3 文字の ISO 4217 形式)。 |
reservedTicket.underName | Person または Organization | チケットが適用される個人または組織。 |
reservedTicket.underName名前 | Text | 担当者の名前。 |
reservedTicket.チケット制シート | 座席: | 予約済みの座席の場所(例:27B)。. |
reservedTicket.ticketedSeat.seatingType | Text | 座席の種類/クラス。 |
reservedTicket.ticketedSeat.seatNumber | Text | 予約済みの座席の場所。 |
reservedTicket.ticketedSeat.seatRow | Text | 予約済みシートの行の場所。 |