オンライン サービスの追加

オンライン サービスは、ホストされるプラットフォームを介して完全にオンラインで保持されるサービスとして定義され、お客様が対面からサービスにアクセスする必要はありません。オンライン サービスの例:

  • Zoom によるオンラインヨガクラス
  • Google Meet を利用したメイクアップのマスタークラスをオンラインで開催
  • Skype でオンライン配管修理の見積もりを出す

オンライン サービスの資格要件

実装を開始する前に、オンライン サービス ポリシーとベスト プラクティスをご確認ください。

オンライン サービスの実装

オンライン サービス統合は既存のエンドツーエンドの統合のアドオンであり、既存の実装に変更を加える必要があります。主な変更点は次のとおりです。

  • フィード: typeVirtualSessionDirectMerchantPaymentCancellationPolicy(まだ追加されていない場合)をサービス フィードに追加します。
  • 予約サーバー: VirtualBookingInfo を CreateBooking メソッドに追加し、仮想設定情報を記載したメールをユーザーに送信します
  • リアルタイム更新(既存の動作): InventoryUpdate RTU を介した仮想在庫の変更、BookingNotification RTU による予約の変更、Service RTU を介したサービスの変更を処理します。

フィード

サービス フィード

オンライン サービスをサポートするために、サービス フィードに次のフィールドが追加されています。

サービス フィードの仕様

 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;
}

サービス フィードの例

{
  "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"
    }
  ]
}
  • ローカライズした説明: サービスの説明を明確にする必要があります。サービス コンテンツの最適な構成方法については、ベスト プラクティス ガイドをご覧ください。
  • セッション手順: セッション手順では、必要なすべての設定について記載し、ポリシーに示されたガイダンスに従ってください。
    • プラットフォーム動画の URL と会議 ID が CreateBooking の一部として自動的に作成されない場合(例: CreateBookingResponse で詳細が送信されない場合)、session_instructions で、誰に、プラットフォームの詳細がいつ送信されるのかをユーザーに明示する必要があります。
  • セッションの要件: セッションの要件では、ユーザーがクラスに効果的に参加するために必要な必要な機器や資料をすべて記述する必要があります。ユーザーが必要とする可能性があるオプションのコンテンツを含めることもできますが、オプションとしてマークしてください。
  • プラットフォーム: プラットフォームは、ユーザーがオンライン サービスへのアクセスに使用するプラットフォームを示す必要があります。
    • プラットフォームが後で販売者によって決まる場合は、platformFLEXIBLE に設定します。
    • 販売者が使用しているプラットフォームがリストにない場合は、platformOTHER に設定し、other_platform_name を指定します。
  • キャンセル ポリシー: 正確なキャンセル ポリシーを設定することが重要です。払い戻しとキャンセルが許可されている場合は、CancellationPolicy を設定します。設定されていない場合、デフォルトで、払い戻しはできないという前提です。

空き情報フィード

  • Spots Total: プラットフォームに許容される参加者の総人数に設定します(スタッフを確保してください)。

予約サーバー

省略可: システムが会議 ID と URL を販売者に代わって作成する場合は、CreateBookingResponse の一部として VirtualSessionInfo を指定します。

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 を呼び出して予約の変更を Google に通知する必要があります。
    • ユーザーが販売者またはパートナーに支払いを送信しない場合は、キャンセルの RTU を Google に送信します。キャンセルのメールは「Google で予約」から送信されます。
  • サービス RTU: 現在、サービス RTU を使用してサービスを更新している場合、オンライン サービスを更新する場合は、必ず適切なオンライン サービス フィールドを指定してください。

メール

デフォルトでは、「Google で予約」プラットフォームでユーザーが予約を行うと、標準の予約確認、変更、キャンセルのメールが送信されます。

パートナーはさらに、カンファレンスの詳細、支払いの詳細、キャンセル ポリシーに関する情報を、ユーザーに個別にメールで送信する必要があります。予約や授業の前にリマインダー メールを送信することもできます。仮想クラスのメールに関するポリシーを遵守しているかどうか、ポリシー ドキュメントで確認してください。