다음 튜토리얼에서는 연결된 직원 또는 시간 및 요일에 따라 서비스 가격을 차별화하기 위해 피드를 구현하는 방법을 설명합니다.
직원당/시간 가격
다음 4가지 항목을 설정해야 합니다.
판매자 피드에서 가격 옵션마다
Merchant.payment_option
를 하나씩 설정합니다.- 원하는
price
를 특정 시간/직원의 서비스 가격으로 설정합니다. payment_option_id
값은 동일한 애그리게이터의 모든 판매자 간에 공유되므로payment_option_id
는 통합 전체에서 고유해야 합니다. 혼동을 방지하고 문제 해결 및 관리를 간소화하려면 다른 판매자가 동일한payment_option
를 사용하더라도 이 판매자가 사용하는 모든payment_option
값을 고유한payment_option_id
로 정의(재)정의하는 것이 좋습니다.- 교직원당 가격의 경우 더 쉽게 추적하고 전체 통합에서
payment_option_id
가 고유하도록 하려면merchant_id
,service_id
,staff_id
의 조합으로payment_option_id
를 생성하는 것이 좋습니다. - 시간별 가격의 경우
merchant_id
,service_id
, 이 시간을 나타내는 문자열 (evening
,weekends
,sundayafternoon
...)의 조합으로payment_option_id
를 생성하는 것이 좋습니다. 그래야 추적이 용이하고 전체 통합에서payment_option_id
가 고유하도록 할 수 있습니다.
- 가용성 수준 가격 책정 (이 튜토리얼의 사용 사례)에 사용하는 경우 이름과 설명은 주로 디버깅 목적으로 사용됩니다.
- 한 판매자에 대해
payment_option
값을 100개를 초과하여 설정하지 마세요. 100개 이상의payment_option
값에 도달할 것으로 예상되면 Google 담당자가 이 구현을 실행하세요. - 이 사용 사례에서는 다른 모든
payment_option
필드는 무시해도 됩니다.
- 교직원당 가격의 경우 더 쉽게 추적하고 전체 통합에서
- 원하는
재고 피드에서
Merchant
수준에서 정의한payment_option
의payment_option_id
를 사용하여Availability.payment_option_id
를 단일 상품 배열로 설정합니다.서비스 피드에서
Service.price
을(를) 이 서비스의 가격대 중 가장 낮은 값으로 설정하고Service.price_interpretation
을STARTS_AT
로 설정합니다.
직원당 가격 예시
이 예에서 로버트 (id: 1)는 제인 (id: 2)보다 미용사 경험이 많은 미용사이므로 미용실 주인은 로버트를 5달러 더 비싼 가격으로 예약하기로 결정했습니다. 짧은 헤어컷의 비용은 기본적으로 20달러, 긴 머리 커트의 비용은 30달러입니다. 사용자가 로버트를 선택하면 컷은 각각 25달러 또는 35달러가 됩니다.
직원 이름 | 짧은 헤어컷 | 긴 머리 자르기 |
---|---|---|
Jane | $20* | $30* |
Robert | 달러 | $35 |
*서비스 기본 가격
판매자
{ "metadata": { "processing_instruction": "PROCESS_AS_COMPLETE", "generation_timestamp": 1503638100, "total_shards": 1 }, "merchant": [ { "category": "beauty_salon", "merchant_id": "beauty-per-staff-price", "name": "Beauty Salon", "url": "www.merchantspublicsite.com", "telephone": "+1 123-456-7890", "geo": { "latitude": 37.422113, "longitude": -122.084041, "address": { "locality": "Mountain View", "country": "US", "region": "CA", "street_address": "1600 Amphitheatre Pkwy", "postal_code": "94043" } }, "payment_option": [ { "payment_option_id": "beauty-per-staff-price-haircut-short-1", "name": "Short haircut (Robert)", "description": "Short hair haircut price for Robert", "price": { "currency_code": "USD", "price_micros": 25000000 } }, { "payment_option_id": "beauty-per-staff-price-haircut-short-default", "name": "Short haircut (Default)", "description": "Normal short hair haircut price", "price": { "currency_code": "USD", "price_micros": 20000000 } }, { "payment_option_id": "beauty-per-staff-price-haircut-long-1", "name": "Long haircut (Robert)", "description": "Long hair haircut price for Robert", "price": { "currency_code": "USD", "price_micros": 35000000 } }, { "payment_option_id": "beauty-per-staff-price-haircut-long-default", "name": "Long haircut (Default)", "description": "Normal long hair haircut price", "price": { "currency_code": "USD", "price_micros": 30000000 } } ] } ] }
서비스
{ "metadata": { "processing_instruction": "PROCESS_AS_COMPLETE", "generation_timestamp": 1535437200, "total_shards": 1 }, "service": [ { "service_id": "haircut-short", "prepayment_type": "NOT_SUPPORTED", "merchant_id": "beauty-per-staff-price", "price": { "currency_code": "USD", "price_micros": 20000000 }, "localized_service_name": { "value": "Haircut (shorter than shoulder)", "localized_value": [ { "locale": "en", "value": "Haircut (shorter than shoulder)" } ] }, "localized_description": { "value": "Awesome haircut for short hair", "localized_value": [ { "locale": "en", "value": "Awesome haircut for short hair" } ] } }, { "service_id": "haircut-long", "prepayment_type": "NOT_SUPPORTED", "merchant_id": "beauty-per-staff-price", "price": { "currency_code": "USD", "price_micros": 30000000 }, "localized_service_name": { "value": "Haircut (longer than shoulder)", "localized_value": [ { "locale": "en", "value": "Haircut (longer than shoulder)" } ] }, "localized_description": { "value": "Awesome haircut for long hair", "localized_value": [ { "locale": "en", "value": "Awesome haircut for long hair" } ] } } ] }
지원 대상
{ "metadata": { "processing_instruction": "PROCESS_AS_COMPLETE", "generation_timestamp": 1535178900, "total_shards": 1 }, "service_availability": [ { "availability": [ { "spots_total": 1, "start_sec": 1535806800, "spots_open": 1, "duration_sec": 3600, "recurrence": { "repeat_until_sec": 1535846340, "repeat_every_sec": 3600 }, "service_id": "haircut-short", "merchant_id": "beauty-per-staff-price", "resources": { "staff_name": "Robert", "staff_id": "1" }, "payment_option_id": ["beauty-per-staff-price-haircut-short-1"] }, { "spots_total": 1, "start_sec": 1535806800, "spots_open": 1, "duration_sec": 3600, "recurrence": { "repeat_until_sec": 1535846340, "repeat_every_sec": 3600 }, "service_id": "haircut-long", "merchant_id": "beauty-per-staff-price", "resources": { "staff_name": "Robert", "staff_id": "1" }, "payment_option_id": ["beauty-per-staff-price-haircut-long-1"] }, { "spots_total": 1, "start_sec": 1535806800, "spots_open": 1, "duration_sec": 3600, "recurrence": { "repeat_until_sec": 1535846340, "repeat_every_sec": 3600 }, "service_id": "haircut-short", "merchant_id": "beauty-per-staff-price", "resources": { "staff_name": "Jane", "staff_id": "2" }, "payment_option_id": ["beauty-per-staff-price-haircut-short-default"] }, { "spots_total": 1, "start_sec": 1535806800, "spots_open": 1, "duration_sec": 3600, "recurrence": { "repeat_until_sec": 1535846340, "repeat_every_sec": 3600 }, "service_id": "haircut-long", "merchant_id": "beauty-per-staff-price", "resources": { "staff_name": "Jane", "staff_id": "2" }, "payment_option_id": ["beauty-per-staff-price-haircut-long-default"] } ] } ] }
시간별 가격 예시
이 예에서 미용실은 10:00부터 20:00까지 영업합니다. 미용실 주인은 18시 이후 예약에 대해 5달러를 추가로 추가하기로 했습니다.
가용성의 예는 태평양 표준시 기준으로 2018년 9월 1일 토요일로 정의됩니다. 1535821200은 10:00이고 1535850000은 해당 날짜의 18:00이고 1535857200은 20:00입니다.
시간 | 짧은 헤어컷 | 긴 머리 자르기 |
---|---|---|
10:00 ~ 11:00 | $20 | $30 |
11:00 ~ 12:00 | $20 | $30 |
12:00 ~ 13:00 | $20 | $30 |
13:00 ~ 14:00 | $20 | $30 |
14:00 ~ 15:00 | $20 | $30 |
15:00 ~ 16:00 | $20 | $30 |
16:00 ~ 17:00 | $20 | $30 |
17:00 ~ 18:00 | $20 | $30 |
18:00 ~ 19:00 | 달러 | $35 |
19:00 ~ 20:00 | 달러 | $35 |
판매자
{ "metadata": { "processing_instruction": "PROCESS_AS_COMPLETE", "generation_timestamp": 1503638100, "total_shards": 1 }, "merchant": [ { "category": "beauty_salon", "merchant_id": "beauty-per-time-price", "name": "Beauty Salon", "url": "www.merchantspublicsite.com", "telephone": "+1 123-456-7890", "geo": { "latitude": 37.422113, "longitude": -122.084041, "address": { "locality": "Mountain View", "country": "US", "region": "CA", "street_address": "1600 Amphitheatre Pkwy", "postal_code": "94043" } }, "payment_option": [ { "payment_option_id": "beauty-per-time-price-haircut-short-evening", "name": "Short haircut (Evening)", "description": "Short hair haircut price for the evening", "price": { "currency_code": "USD", "price_micros": 25000000 } }, { "payment_option_id": "beauty-per-time-price-haircut-short-default", "name": "Short haircut (Normal)", "description": "Short hair haircut price for the rest of the day", "price": { "currency_code": "USD", "price_micros": 21000000 } }, { "payment_option_id": "beauty-per-time-price-haircut-long-evening", "name": "Long haircut (Evening)", "description": "Long hair haircut price for the evening", "price": { "currency_code": "USD", "price_micros": 35000000 } }, { "payment_option_id": "beauty-per-time-price-haircut-long-default", "name": "Long haircut (Normal)", "description": "Long hair haircut price for the rest of the day", "price": { "currency_code": "USD", "price_micros": 31000000 } } ] } ] }
서비스
{ "metadata": { "processing_instruction": "PROCESS_AS_COMPLETE", "generation_timestamp": 1535437200, "total_shards": 1 }, "service": [ { "service_id": "haircut-short", "prepayment_type": "NOT_SUPPORTED", "merchant_id": "beauty-per-time-price", "price": { "currency_code": "USD", "price_micros": 2100000 }, "localized_service_name": { "value": "Haircut (shorter than shoulder)", "localized_value": [ { "locale": "en", "value": "Haircut (shorter than shoulder)" } ] }, "localized_description": { "value": "Awesome haircut for short hair", "localized_value": [ { "locale": "en", "value": "Awesome haircut for short hair" } ] } }, { "service_id": "haircut-long", "prepayment_type": "NOT_SUPPORTED", "merchant_id": "beauty-per-time-price", "price": { "currency_code": "USD", "price_micros": 31000000 }, "localized_service_name": { "value": "Haircut (longer than shoulder)", "localized_value": [ { "locale": "en", "value": "Haircut (longer than shoulder)" } ] }, "localized_description": { "value": "Awesome haircut for long hair", "localized_value": [ { "locale": "en", "value": "Awesome haircut for long hair" } ] } } ] }
지원 대상
{ "metadata": { "processing_instruction": "PROCESS_AS_COMPLETE", "generation_timestamp": 1535178900, "total_shards": 1 }, "service_availability": [ { "availability": [ { "spots_total": 1, "start_sec": 1535821200, "spots_open": 1, "duration_sec": 3600, "recurrence": { "repeat_until_sec": 1535849940, "repeat_every_sec": 3600 }, "service_id": "haircut-short", "merchant_id": "beauty-per-time-price", "payment_option_id": ["beauty-per-time-price-haircut-short-default"] }, { "spots_total": 1, "start_sec": 1535821200, "spots_open": 1, "duration_sec": 3600, "recurrence": { "repeat_until_sec": 1535849940, "repeat_every_sec": 3600 }, "service_id": "haircut-long", "merchant_id": "beauty-per-time-price", "payment_option_id": ["beauty-per-time-price-haircut-long-default"] }, { "spots_total": 1, "start_sec": 1535850000, "spots_open": 1, "duration_sec": 3600, "recurrence": { "repeat_until_sec": 1535857140, "repeat_every_sec": 3600 }, "service_id": "haircut-short", "merchant_id": "beauty-per-time-price", "payment_option_id": ["beauty-per-time-price-haircut-short-evening"] }, { "spots_total": 1, "start_sec": 1535850000, "spots_open": 1, "duration_sec": 3600, "recurrence": { "repeat_until_sec": 1535857140, "repeat_every_sec": 3600 }, "service_id": "haircut-long", "merchant_id": "beauty-per-time-price", "payment_option_id": ["beauty-per-time-price-haircut-long-evening"] } ] } ] }