Working with trial offers
Intro
Use case description of how trial offers are serviced via the Open API and what user flow is envisioned for partners
Relevant Endpoints
- GET Get trial offer config
- GET Get bookable trial offer appointments
- GET Get bookable trial offer classes
- POST Validate for lead customer creation
- POST Create a lead customer
- GET Get class slots for trial offers
- GET Get bookable appointment slots for trial offers
- POST Validate class slot is bookable for trial offer
- POST Validate for appointment booking for trial offers
- POST Book a class slot for trial offers
- POST Book an appointment for trial offers
Trial offers in the PerfectGym Next
Trial offers are a central piece for enticing new leads to join up by testing a day in the gym or a specific class. Within the PerfectGym Next, operators can setup a distinct Trial Offer Configuration which details booking configurations as well as determining what information is required on enrolment.
Besides the administrational setup, operator then configure what services and/or classes are bookable under a specific trial offer configuration.
Display, validation and booking of trial offers
The Trial Offer collection in the Open API follows the following envisioned user flow:
-
the
GET Get bookable trial offer appointments
&
GET Get bookable trial offer classes
, return the available bookable trial sessions of a respective studio. Using the
classId
orbookableAppointmentId
, partners can furthermore retrieve bookable classes or bookable appointment slots with the GET Get class slots for trial offers and the GET Get bookable appointment slots for trial offers endpoints -
each of the bookable trial offer classes or appointments has a
trialOfferConfigId
which needs to be passed to the GET Get trial offer config endpoint to retrieve the configuration data. This data will inform partners about which data is required to create a lead customer, necessary for the further booking of a trial session -
the
POST Create a lead customer
endpoint is a mandatory step to retrieve the
customerId
needed for further booking. We offer a POST Validate for lead customer creation endpoint to make sure partners UI does not show booking options when none are available - the same logic is applied when conducting the actual booking. The POST Validate class slot is bookable for trial offer and the POST Validate for appointment booking for trial offers endpoints should be used to check if any issues arise when trying to book. The actual booking is then done via the POST Book a class slot for trial offers and POST Book an appointment for trial offers endpoints
Trial offer booking confirmation
Within the trial offer configuration the confirmationOfBookingTerm
object defines until when a booking needs to be confirmed in order to take place, for example: Personal Training Trial Session is booked by a lead with a confirmationOfBookingTerm
set to 2 days. This means that the lead needs to confirm this booking no latest than 2 days before the appointment. If no confirmation occurs, the appointment is automatically cancelled.
The actual confirmation is handled by the PerfectGym Next - the leads email (mandatory in every case) is used to send out a booking confirmation email in the name of the respective studio. This email contains a simple confirmation link that the lead needs to follow in order to confirm their trial offer booking.
To inform partners about the successful booking confirmation, a webhook of type CLASS_BOOKING_CREATED
or APPOINTMENT_BOOKING_CREATED
is sent.
Trial offer webhook events
For the trial offer collection, all events related to the classes and bookable appointments are relevant.
Full list of events can be found here: Event types