使用者以特定價格預訂可預訂時段時,系統會使用您在服務動態饋給中定義的網址,將使用者重新導向至預訂頁面。以下是可用的網址範本範例。
這個範本中的參數會使用動態饋給中指定的值動態新增,並用於建立使用者前往預訂頁面的連結。
`https://reservation-provider.com/examplerestaurant/book?date={availability_slot_start_seconds}&num_guests={resources_party_size}`
網址範本的可用值
範本參數 | 必填 / 選填 | 動態消息 | 欄位 | 範例值 |
---|---|---|---|---|
availability_slot_availability_tag | 選用 | availability (供應情形) | availability_tag | 標記 |
availability_slot_duration_seconds | 選用 | availability (供應情形) | duration_sec | 3600 |
availability_slot_start_seconds | 必要 | availability (供應情形) | start_sec | 4152695841 |
resources_party_size | 必要 | availability.resources | party_size | 2 |
resources_room_id | 選用 | availability.resources | room_id | bar_123 |
網址範本定義
以下是您的「服務」動態饋給會傳送的網址範本。
Message Services {
// ..
UriTemplate uri_template;
// A template specifying how Google should generate URLs to external site.
message UriTemplate {
// The uri template must follow the RFC6570, see
// https://datatracker.ietf.org/doc/html/rfc6570.
// Supports Level 2 templates.
// e.g.
// http://example.com/book/{foo}?b={bar}
// * foo = 2
// * bar = abc
// https://example.com/book/2?b=abc
// These parameters will be resolved to their values specified in their
// respective entities.
// 1) {availability_slot_start_seconds} :: populated from start_sec field in
// availability feed
// 2) {resources_party_size} :: populated from party_size field in
// availability feed
// 3) {availability_slot_duration_seconds} :: populated from duration_sec
// field in availability feed
// 4) {resources_room_id} :: populated from room_id field in the
// resource section of the availability feed
// 5) {availability_slot_availability_tag} :: populated from availability_tag
// field of the availability feed
string uri_template = 1;
}
}