افزودن خدمات آنلاین (منسوخ شده)

خدمات آنلاین به خدماتی گفته می شود که به طور کامل به صورت آنلاین از طریق یک پلتفرم میزبانی شده برگزار می شوند و نیازی به حضور مشتری در این سرویس به صورت حضوری ندارند. چند نمونه از خدمات آنلاین ممکن است شامل موارد زیر باشد:

  • کلاس آنلاین یوگا از طریق زوم
  • مسترکلاس آرایش آنلاین از طریق Google Meet
  • تخمین آنلاین لوله کشی از طریق اسکایپ

الزامات واجد شرایط بودن خدمات آنلاین

قبل از شروع پیاده سازی، لطفاً سیاست ها و بهترین شیوه های خدمات آنلاین را مرور کنید.

اجرای خدمات آنلاین

یکپارچه‌سازی خدمات آنلاین یک افزودنی برای یکپارچه‌سازی پایان به انتها قرار ملاقات‌های موجود است و به تغییراتی در اجرای موجود نیاز دارد. در سطح بالا، تغییرات زیر عبارتند از:

  • فیدها : type ، VirtualSession ، DirectMerchantPayment و CancellationPolicy (اگر قبلاً اضافه نشده باشد) به فیدهای خدمات اضافه کنید
  • سرور رزرو : VirtualSessionInfo را به روش 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/actions-center/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"
    }
  ]
}
  • توصیف محلی : توضیحات باید به وضوح بیان کند که سرویس در مورد چه چیزی است. لطفاً به راهنمای بهترین روش‌ها در مورد چگونگی ساختار بهتر محتوای خدمات خود مراجعه کنید.
  • دستورالعمل‌های جلسه : دستورالعمل‌های جلسه باید تمام تنظیمات لازم را توصیف کند و با راهنمایی‌های مندرج در خط‌مشی مطابقت داشته باشد.
    • اگر آدرس اینترنتی ویدیوی پلتفرم و شناسه جلسه به‌طور خودکار به‌عنوان بخشی از CreateBooking ایجاد نمی‌شود (مثلاً جزئیات از طریق CreateBookingResponse ارسال نمی‌شوند)، باید به وضوح در session_instructions اعلام کنید که کاربر چه زمانی و از چه کسی باید انتظار داشته باشد جزئیات پلتفرم‌ها ارسال شوند. به آنها.
  • الزامات جلسه : الزامات جلسه باید تمام تجهیزات یا مواد لازم را که یک کاربر برای شرکت مؤثر در کلاس نیاز دارد، توصیف کند. همچنین ممکن است مطالب اختیاری مورد نیاز کاربر را نیز اضافه کنید، اما لطفاً آنها را به عنوان اختیاری علامت بزنید.
  • پلتفرم : پلتفرم باید پلتفرمی را که کاربر برای دسترسی به سرویس آنلاین از آن استفاده می کند، نشان دهد.
    • اگر پلتفرم بعداً توسط تاجر تعیین می‌شود، platform را روی FLEXIBLE تنظیم کنید.
    • اگر پلتفرمی که تاجر استفاده می‌کند در لیست نیست، platform روی OTHER قرار دهید و other_platform_name مشخص کنید.
  • سیاست لغو : مهم است که سیاست های لغو دقیق داشته باشید. اگر بازپرداخت و لغو مجاز است CancellationPolicy تنظیم کنید. فرض پیش‌فرض اگر تنظیم نشود، این است که بازپرداخت مجاز نیست.

فید در دسترس بودن

  • مجموع نقاط : این را روی ظرفیت کل شرکت کنندگان مجاز برای پلت فرم تنظیم کنید (اطمینان حاصل کنید که کارکنان را کم کنید)

سرور رزرو

اختیاری: اگر سیستم شما یک شناسه جلسه و آدرس اینترنتی از طرف تاجر شما ایجاد می کند، لطفاً 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;
}

ایجاد درخواست رزرو

{
  "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 : هر گونه به روز رسانی برای تغییرات اسلات در سیستم شما یا سیستم Action Center، باید یک InventoryUpdate RTU را راه اندازی کند تا تغییرات در اسلات ها را به ما اطلاع دهد.
  • BookingNotification RTU : هر گونه به روز رسانی رزروها (مثلاً تغییر زمان، یا لغو) در سیستم شما یا سیستم Action Center، باید یک BookingNotification RTU را فعال کند تا تغییرات رزرو را به ما اطلاع دهد.
    • اگر کاربر پرداخت را به تاجر/شریک ارسال نکرد، لطفاً RTU لغو را برای ما ارسال کنید. یک ایمیل لغو توسط مرکز اقدامات ارسال خواهد شد.
  • سرویس RTU : اگر در حال حاضر خدمات را از طریق یک سرویس RTU به روز می کنید، در صورت به روز رسانی برای یک سرویس آنلاین، مطمئن شوید که فیلدهای خدمات آنلاین مناسب را در آن قرار دهید.

ایمیل ها

به‌طور پیش‌فرض، «مرکز اقدامات» ایمیل‌های تأیید رزرو، اصلاح و لغو استاندارد را هنگام انجام تراکنش‌های کاربر در پلتفرم «Action Center» ارسال می‌کند.

شرکا باید جزئیات کنفرانس، جزئیات پرداخت و اطلاعات سیاست لغو را در ایمیل‌های جداگانه برای کاربر ارسال کنند. در صورت تمایل، می‌توانید قبل از قرار ملاقات یا کلاس، ایمیل‌های یادآوری ارسال کنید. لطفاً به سند خط‌مشی مراجعه کنید تا مطمئن شوید که از خط‌مشی‌های ایمیل برای کلاس‌های مجازی پیروی می‌کنید.