0.0.9 • Published 9 months ago

wbb-gladstone v0.0.9

Weekly downloads
-
License
-
Repository
-
Last release
9 months ago

Responses Provided

Provide a list of the responses provided as part of this integration. This should be a list of response name, and its description. | Response Name | Purpose | |------------|---------| | Gladstone Deep Link | Example of a Response using the Deep Link Handler | | Gladstone Bookings | Example of a Response using the Bookings handler | | Gladstone Authentication | Example of a Response using the Authentication handler. This is also the response used by the handlers that require authentication, to automatically redirect before handling rest of function | | Gladstone Cancel | An example of a Response using the Cancel Booking handler, also the Response used when clicking cancel on a booking found in the Bookings handler | | Gladstone book | The Response used for the in-chat booking choice, that can optionally be displayed using the deep link handler | | gladstone param failure | This Response is shown if one or more required function args/parameters are missing, for example secret and client ids | | Gladstone No Activity | The default Response shown when no activities are found | | gladstone no user | The default response shown when no user is found during authentication | | gladstone booking success | The default response shown when in-chat booking was successful | | gladstone booking failed | The defauls response shown when in-chat booking failed |

Handler Names

The following handler names and their functions are available :

Handler NamePurpose
Deep LinkFinds activities and generates deep link buttons to book a session
AuthenticateAuthenticates user, based on membership id, and one other factor, home email by default
BookingsFinds users past or future bookings
Cancel bookingCancels any one future booking

Configuration Options

( Provide a list of the configuration options for each of the handlers mentioned above )

Within the function there are a number of options that can be set to configure the behaviour of the integration. The tables below show the settings that are available for each handler.

Authenticate

PropertyRequiredDescription
domaintrueThe client subdomain for the endpoint, for example thirdpartyintegration-test in https://thirdpartyintegration-test.gladstonesoftware.cloud/
clientIdtrueClient id required to authenticate with the api. Should be supplied by Gladstone
secrettrueClient secret required to authenticate with the api. Should be supplied by Gladstone
membershipNrFieldfalseThe name of the question where the users membership number is found, defaults to gladstoneMembershipNr
otherFieldfalseThe name of the question where the users other authentication value is found, defaults to gladstoneHomeEmail
otherFieldNamefalseThe user field that the otherField is compared to, must be present in the Gladstone Member Search result, defaults to homeEmail
nextBlockfalseThe Response to display after authentication is successful, if set on the default response, this may override the config set by other handlers
noUserBlockfalseThe Response to display if no users are found, defaults to gladstone-no-user

Deep Link

PropertyRequiredDescription
domaintrueThe client subdomain for the endpoint, for example thirdpartyintegration-test in https://thirdpartyintegration-test.gladstonesoftware.cloud/
clientIdtrueClient id required to authenticate with the api. Should be supplied by Gladstone
secrettrueClient secret required to authenticate with the api. Should be supplied by Gladstone
siteidsfalseList of site ids to query activities with, formatted as an array of string, for example ["WIN", "CHE"]
activityfalseThe name of the activity to look for, this can be hardcoded, or set to a template using %%, for example %%activityForm%% to use form values or variables from other integrations
fromDatefalseThe start date of the activity session, can be set to a template, to use form values or variables from other integrations. If this is not set, all activities are returned
searchDayLimitfalseLimit of how many days to display sessions for, if you only want the sessions for the specified date and time, set this to 1. If set to 0, all sessions are displayed
noActivityResponsefalseThe Response to display if no activities are found. Defaults to Gladstone No Activity
activitiesMessagefalseThe Message to display preceding the gallery of available activities, defaults to Here is what I've found:
onlyFirstSessionfalseIf set, will only display the first available session, this can be useful if another integration has been used to find activities beforehand
deepLinkfalseIf set, will display a choice that deep links to Gladstone portal, for the specified activity
deepLinkChoicefalseThe text to display on the deepLink choice, defaults to Book in Gladstone GO
chatBookfalseIf set, will display a choice that books the activity for an authenticated user in the chat
chatBookChoicefalseThe text to display on the chatBook choice, defaults to Book in chat
bookSuccessResponsefalseThe response to display when in-chat booking was successful, defaults to gladstone-booking-success
bookFailResponsefalseThe response to display when in-chat booking failed, defaults to gladstone-booking-failed

Cancel Booking

PropertyRequiredDescription
domaintrueThe client subdomain for the endpoint, for example thirdpartyintegration-test in https://thirdpartyintegration-test.gladstonesoftware.cloud/
clientIdtrueClient id required to authenticate with the api. Should be supplied by Gladstone
secrettrueClient secret required to authenticate with the api. Should be supplied by Gladstone
bookingIdFieldfalseThe name of the question of argument field containing the booking id, defaults to %%bookingId%%, overriding this in the default Response can cause the Bookings handler cancel option to stop working, as this field is usually supplied by this handler
cancelSuccessResponsefalseThe Response to show once cancellation has gone through successfully, defaults to menu
cancelFailResponsefalseThe Response to show if cancellation failed, defaults to gladstone-no-activities

Bookings

PropertyRequiredDescription
domaintrueThe client subdomain for the endpoint, for example thirdpartyintegration-test in https://thirdpartyintegration-test.gladstonesoftware.cloud/
clientIdtrueClient id required to authenticate with the api. Should be supplied by Gladstone
secrettrueClient secret required to authenticate with the api. Should be supplied by Gladstone
noBookingsResponsefalseThe Response shown if no bookings are found, defaults to gladstone-no-activities
pastfalseIf set, this handler finds past bookings, instead of future bookings
nextResponsefalseIf set, adds a choice to continue the conversation with this Respones
nextResponseChoicefalseThe title of the choice added if nextResponse is set, defaults to Continue
bookingsMessagefalseThe message displayed before the gallery of found bookings, defaults to Here are the bookings I could find

### Creating bookings Using the deep link handler, it is possible to create bookings directly in the chat, at this time this functionality is limited only to members, and activities that has a cost of 0 for that member. This is due to the integration currently not supporting taking payments, or fetching the 3DS challenge necessary for payments. As a side-effect, any bookings created in chat will not be marked as being paid for.