เมื่อจองช่วงเวลาที่มีห้องว่างในราคาที่เจาะจง ระบบจะนำผู้ใช้ไปยังหน้าการจองโดยใช้ URL ที่คุณกำหนดไว้ในฟีดบริการ ต่อไปนี้เป็นตัวอย่างเทมเพลต URL ที่ใช้งานได้
ระบบจะเพิ่มพารามิเตอร์ในเทมเพลตนี้แบบไดนามิกโดยใช้ค่าที่ระบุไว้ในฟีดและใช้เพื่อสร้างลิงก์ที่ผู้ใช้จะใช้เพื่อไปยังหน้าการจอง
`https://reservation-provider.com/examplerestaurant/book?date={availability_slot_start_seconds}&num_guests={resources_party_size}`
ค่าที่ใช้ได้สำหรับเทมเพลต URL
พารามิเตอร์เทมเพลต | ต้องระบุ / ไม่บังคับ | ฟีด | ฟิลด์ | ค่าตัวอย่าง |
---|---|---|---|---|
availability_slot_availability_tag | ไม่บังคับ | availability | availability_tag | แท็ก |
availability_slot_duration_seconds | ไม่บังคับ | availability | duration_sec | 3,600 |
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 |
คำจำกัดความเทมเพลต URL
ต่อไปนี้เป็นเทมเพลต URL ที่ส่งในฟีดบริการของคุณ
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;
}
}