특정 가격으로 이용 가능 시간대를 예약하면 사용자가 서비스 피드에 정의한 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 | 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 |
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;
}
}