在线服务是指通过完全托管在线平台托管的服务,不需要客户亲自参与服务。在线服务的一些示例包括:
- 通过 Zoom 在线瑜伽课程
- 通过 Google Meet 在线化妆大师课程
- 通过 Skype 查看管道在线情况的视频
在线服务资格要求
在开始实现之前,请查看线上服务政策和最佳做法。
线上服务实施
在线服务集成是现有端到端集成的插件,需要对现有实现进行一些更改。大体上讲,具体变更如下:
- Feed:将
type
、VirtualSession
、DirectMerchantPayment
和CancellationPolicy
(如果尚未添加)添加到服务 Feed 中 - 预订服务器:将 CreateSessionInfo 添加到 CreateBooking 方法,向用户发送包含虚拟设置信息的电子邮件
- 实时更新(现有行为):通过 InventoryUpdate RTU 处理对虚拟库存的更改,通过 BookingNotification RTU 对预订进行修改,并通过 Service RTU 对服务进行更改。
Feed
服务 Feed
以下字段已添加到“服务”Feed 中,以支持在线服务。
服务 Feed 规范
enum ServiceType { SERVICE_TYPE_UNSPECIFIED = 0; // Service that provides dining reservation. SERVICE_TYPE_DINING_RESERVATION = 1; // Service that provides food ordering in general, could be either takeout // or delivery or both. SERVICE_TYPE_FOOD_ORDERING = 2; // Service that only provides food delivery. SERVICE_TYPE_FOOD_DELIVERY = 6; // Service that only provides food takeout. SERVICE_TYPE_FOOD_TAKEOUT = 7; // Service that provides appointments or classes. Recommended for (1) health // and fitness, (2) spa and beauty, and (3) financial consults and // evaluations services. Please see the supported service types: // https://developers.google.com/maps-booking/guides/end-to-end-integration/overview SERVICE_TYPE_APPOINTMENT = 5; // Service that provides appointment for an online class or session which // will be fully virtual. Must be set if enabling virtual service bookings. SERVICE_TYPE_ONLINE_APPOINTMENT = 8; } // Information about virtual/online session. E.g. Online yoga class, virtual // cooking class etc. message VirtualSession { // Instructions on how this virtual class is set up. If the partner does not // include the video URL with the booking, then this text must include when // the video URL will be shared with the user. Eg. “Zoom url will be mailed // 30 minutes prior to the class”. (Recommended) // Only the folloiwng four tags are supported: <br>, <strong>, <em>, <i>. Text session_instructions = 1; // Requirements for the given virtual session. Eg. yoga mat, // cooking utensils etc. (Recommended) // Only the folloiwng four tags are supported: <br>, <strong>, <em>, <i>. Text session_requirements = 2; // Information about the virtual platform used in this session. (Required to // enable virtual services) message VirtualPlatformInfo { // Enum to indicate which virtual platform would be used by the merchant. enum Platform { PLATFORM_UNSPECIFIED = 0; // The merchant is flexible in which video platform they use. FLEXIBLE = 1; GOOGLE_HANGOUTS = 2; GOOGLE_MEET = 3; ZOOM = 4; SKYPE = 5; YOUTUBE = 6; // Should be set if the video platform used is different from the ones // mentioned here. OTHER = 7; } Platform platform = 1; // The name of the platform if the platform is set to OTHER. (Required if // platform is set to OTHER) Text other_platform_name = 2; } VirtualPlatformInfo virtual_platform_info = 3; // Set this as true if the virtual session is not live and is pre-recorded. // (Optional) bool is_session_prerecorded = 4; } // Information about how the user can pay directly to the merchant instead of // pre-paying for the service via RwG. message DirectMerchantPayment { // Users would be advised to pay only via the payment methods mentioned below. repeated Text payment_methods = 1; } // Cancellation policy for a service. message CancellationPolicy { // Defines a single refund condition. Multiple refund conditions could be // used together to describe "refund steps" as various durations before the // service start time. message RefundCondition { // Duration in seconds before the start time, until when the customer can // receive a refund for part of the service's cost specified in // `refund_percent`. // When set to 0 (default), the service can be cancelled at any time. int64 min_duration_before_start_time_sec = 1; // The percent that can be refunded, as long as the service booking is // cancelled at least `min_duration_before_start_time` before the service // start time, in the range of [0, 100]. When set to 0 (default), the // service is not refundable. When set to 100 this service is fully // refundable. uint32 refund_percent = 2; } // Zero or more refund conditions applicable to the policy. repeated RefundCondition refund_condition = 1; }
服务 Feed 示例
{ "service": [ { "merchant_id": "100", "service_id": "100-1", "type" : "SERVICE_TYPE_ONLINE_APPOINTMENT", "localized_service_name": { "value": "Makeup masterclass", "localized_value": [ { "locale": "en", "value": "Makeup masterclass" } ] }, "localized_description": { "value": "Learn how to do runway makeup from an award winning makeup artist.", "localized_value": [ { "locale": "en", "value": "Learn how to do runway makeup from an award winning makeup artist." } ] }, "virtual_session": { "session_instructions": { "value": "You must have access to a computer, and a solid internet connection. Class registration link will be sent to you 15 mins before the start of the class. The class link will be accessible 1 day after the class. ", "localized_value": [ { "locale": "en", "value": "You must have access to a computer, and a solid internet connection. Class registration link will be sent to you 15 mins before the start of the class. The class link will be accessible 1 day after the class. " } ] }, "session_requirements": { "value": "makeup brush, makeup palette, mirror", "localized_value": [ { "locale": "en", "value": "makeup brush, makeup palette, mirror" } ] }, "virtual_platform_info": { "platform": "OTHER", "other_platform_name": "Susan's hosted platform" } }, "direct_merchant_payment": { "payment_methods": [ { "value": "Venmo", "localized_value": [ { "locale": "en", "value": "Venmo" } ] } ] }, "price": { "price_micros": 75000000, "currency_code": "USD" }, "rules": { "min_advance_booking": 0, "min_advance_online_canceling": 86400, "cancellation_policy": { "refund_condition": [ { "min_duration_before_start_time_sec": 3600, "refund_percent": 100 } ] } }, "prepayment_type": "NOT_SUPPORTED", "tax_rate": { "micro_percent": 7750000 } }, { "merchant_id": "100", "service_id": "100-2", "type" : "SERVICE_TYPE_ONLINE_APPOINTMENT", "localized_service_name": { "value": "Advanced Vinyasa Yoga", "localized_value": [ { "locale": "en", "value": "Advanced Vinyasa Yoga" } ] }, "localized_description": { "value": "Learn the advanced techniques of vinyasa yoga taught by award winning yoga instructors.", "localized_value": [ { "locale": "en", "value": "Learn the advanced techniques of vinyasa yoga taught by award winning yoga instructors." } ] }, "virtual_session": { "session_instructions": { "value": "You must have access to a computer, and a solid internet connection. Class registration link will be included in an email from the merchant.", "localized_value": [ { "locale": "en", "value": "You must have access to a computer, and a solid internet connection. Class registration link will be included in an email from the merchant." } ] }, "session_requirements": { "value": "yoga mat, dumbbells", "localized_value": [ { "locale": "en", "value": "yoga mat, dumbbells" } ] }, "virtual_platform_info": { "platform": "ZOOM" } }, "price": { "price_micros": 40000000, "currency_code": "USD" }, "rules": { "min_advance_booking": 0, "min_advance_online_canceling": 86400, "cancellation_policy": { "refund_condition": [ { "min_duration_before_start_time_sec": 86400, "refund_percent": 100 }, { "min_duration_before_start_time_sec": 3600, "refund_percent": 50 } ] } }, "prepayment_type": "REQUIRED", "tax_rate": { "micro_percent": 7750000 }, "require_credit_card": "REQUIRE_CREDIT_CARD_ALWAYS" } ] }
- 本地化的说明:说明应清晰地阐明服务的用途。有关如何设计服务内容结构的最佳做法,请参阅最佳做法指南。
- 会话说明:会话说明应描述所需的全部必要设置,并符合政策中规定的指导原则。
- 如果平台视频网址和会议 ID 不是作为 CreateBooking 的一部分自动创建的(例如,详细信息不是通过
CreateBookingResponse
发送的),那么您应该在session_instructions
中明确指出用户应该向他们发送平台详细信息的时机和位置。
- 如果平台视频网址和会议 ID 不是作为 CreateBooking 的一部分自动创建的(例如,详细信息不是通过
- 课程要求:课程要求应描述用户有效参与课程所需的所有设备或材料。您也可以添加用户可能需要的可选资料,但请将它们标记为可选。
- 平台:平台应指明用户将用于访问在线服务的平台。
- 如果平台稍后由商家确定,请将
platform
设置为FLEXIBLE
。 - 如果商家使用的平台不在列表中,请将
platform
设置为OTHER
,并指定other_platform_name
。
- 如果平台稍后由商家确定,请将
- 取消政策:请务必提供准确的取消政策。如果允许退款和取消,请设置
CancellationPolicy
。如果未设置,则默认假设是不允许退款。
空闲状态 Feed
- Spot 总数 (Spots Total):设置为平台允许的参与者总数量(务必减去员工人数)
预订服务器
可选:如果您的系统代表商家创建会议 ID 和网址,请将 VirtualSessionInfo
添加为 CreateBookingResponse
的一部分。
CreateBooking 规范
message Booking { // Information related to the virtual session which was booked. message VirtualSessionInfo { // URL which was created for the virtual session. (optional) string session_url = 1; // The meeting id which was created for the virtual session. (optional) string meeting_id = 2; // Password required to access the session. (optional) string password = 3; } VirtualSessionInfo virtual_session_info = X; }
CreateBookingRequest
{ "idempotency_token": "10000000000", "payment_information": { "prepayment_status": "PREPAYMENT_NOT_PROVIDED" }, "slot": { "confirmation_mode": "CONFIRMATION_MODE_SYNCHRONOUS", "duration_sec": "3600", "merchant_id": "10001", "service_id": "10001-1", "start_sec": "1586829600" }, "user_information": { "email": "john.doe@gmail.com", "family_name": "John", "given_name": "Doe", "telephone": "+123 456 7890", "user_id": "110291237" } }
CreateBookingResponse
{ "booking": { "bookingId": "abcdefg-12345", "slot": { "merchantId": "10001", "serviceId": "10001-1", "startSec": "1586804400", "durationSec": "3600" }, "userInformation": { "userId": "110291237", "givenName": "John", "familyName": "Doe", "telephone": "+123 456 7890", "email": "john.doe@gmail.com" }, "status": "CONFIRMED", "virtual_session_info": { "video_url": "meet.google.com/abcd-efg", "meeting_id": "abcd-efg", "password" : "somepassword" } } }
实时更新
对于虚拟预订,应保留用于更新商品目录或预订的现有逻辑。
- InventoryUpdate RTU:对系统或“通过 Google 预订”系统中的槽位更改所做的任何更新都应触发 InventoryUpdate RTU,以通知相应槽发生的变更。
-
BookingNotification RTU:对系统或“通过 Google 预订”系统进行预订的任何更新(例如修改或取消)都应触发 BookingNotification RTU,以通知我们预订的变化。
- 如果用户未向商家/合作伙伴提交付款,请向我们发送取消 RTU。“通过 Google 预订”将发送取消电子邮件。
- 服务 RTU:如果您目前通过服务 RTU 更新服务,则在为在线服务更新时,请务必包含相应的在线服务字段。
电子邮件
默认情况下,当用户在“通过 Google 预订”平台上进行交易时,“通过 Google 预订”会发送标准的预订确认、修改和取消电子邮件。
合作伙伴还应另外通过电子邮件向用户发送会议详细信息、付款详情和取消政策信息。 您也可以选择在预约或课程开始前发送电子邮件提醒。 请参阅政策文档,确保您遵守有关虚拟课程的电子邮件政策。