[#1294] Booking source ( admin-booked v. self-booked ) in webhook

Migrated from Redmine #1294 | Author: Michael Wells
Status: Feedback | Priority: High, I’m very impatient | Created: 2024-10-23


Doing a lot of SBM work for clients in conversions, and we’re unable to find some data we need.
One key factor is the origin of a booking.

Currently the webhook appears to fire on all bookings, whether made by admin or through the website widget, and we don’t see a way to differentiate?
Even a call to retrieve that new booking by ID doesn’t seem to contain the data we need, but we can see it in SBM admin console reports.

How do we determine this?

Michael Wells wrote:

Ideally, we’d really like the ability to tag an individual booking widget so that the specific tag also appears as a field.
Quite commonly we have special widget setups for specific user groups to handle different booking approaches, so we’d like to be able to determine

  • It was from an online widget booking
  • Any widget-specific tag like “poac” that was assigned in the config JSON

Same for API-initiated bookings, the ability to tag that booking for future traceability and reporting.

Dmytro Bondarev wrote:

Hi,
you can use API documentation | SimplyBook.me Online Scheduling method to get booking details.
in result you will receive API documentation | SimplyBook.me Online Scheduling , by field log you can see if it was created by user or by client.

Michael Wells wrote:

Thanks Dmytro,

A few questions, I’ll work backwards.

I’m currently using Zapier’s integration to log the bookings and identify the source. In the zapier event I get a Booking Code but no Booking ID.
The /admin/bookings appears to require the ID, how do I translate the code to the ID? I’ve tried various filters on /bookings but unable to find the right way to isolate it.

Once I have the ID I can call /admin/bookings and see the log;
In the case of a customer-created booking will the user_login always be null? Or should I look for specific admin logins in order to determine the customer v. admin booking origin?

And third, is there a way to auth directly ( e.g. Bearer token ) using the SBM api key?
I have the api key but have not figured out how to use it in API auth, so I’m temporarily using user login-> token which will break when the user password changes.

Thanks!