Booking Policy Snapshots API: Sample Use Cases and Flows

This article shares some possible use cases your app could support, as well as a sample flow that could support each use case. This can be a helpful jumping off point as you plan your app's implementation.

Notify business owners of bookings under outdated policy

Your app could give business owners an overview of all bookings made under an older version of a service policy.

To display a list of bookings with outdated booking policy:

  1. Listen to Booking Policy Updated.
  2. Retrieve all services that are using the affected policy with Query Services. Make sure to pass the relevant policy ID from the previous step as filter.
  3. Use Query Extended Bookings. For appointment-based service include bookedEntity.item.slot.serviceId in the filter. For classes or courses include bookedEntity.item.schedule.serviceId in the filter. You may use a conditional or for both filter options in a single call.
  4. Retrieve the policy snapshots for the affected bookings with List Policy Snapshots By Booking Ids.
  5. Create a summary of these bookings, highlighting the policy changes for each booking.
  6. Send the summary to the business owners.
Was this helpful?
Yes
No