wbb-imin
v0.1.1
Published
This integration lets you fetch and display activities, schedules and events from the Imin API
Downloads
66
Readme
WBB Imin
This Integration lets you query the Imin database, and display EventSeries, SessionSeries and ScheduledSessions
Blocks Provided
| Response Name | Purpose | | -------------- | ----------------------------------------------- | | Imin | Example of a Response, with a set of queries | | Imin Variables | This Response is used to set the imin variables |
Handler Names
The following handler names and their functions are available :
| Handler Name | Purpose | | -------------- | ------------------------------------------------------------------------------------------------------------------------- | | Imin | This is the function that queries the Imin database and displays EventSeries, SessionSeries, and ScheduledSession objects | | Imin Variables | This function, when accessed through a button on a scheduled session, sets the imin variables for the user |
Configuration Options
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.
imin
| Property | Required | Description | | ----------------------- | -------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | | api | true | The API Key used to access the imin api | | startDate | false | This field is used to find activities that start the beginning of the epsecified date. Best used with a Date question | | endDate | false | This field is used to find activities that end before the end of the day specified date. Best used with a Date question | | showSchedule | false | If set to true, the function will display Schedules for found activities, with upcoming sessions | | showSessions | false | If set to true, the function will display upcoming Sessions for found activities | | hideFullSessions | false | If set to true, ScheduledSessions that have no more remaining capacity will not be displayed | | hideShowMore | false | If set to true, will hide the "Show More" button, displayed when more pages are available | | showUrl | false | If set to true, will show a button to the objects URL field, or the URL of the parent if none is found | | customUrl | false | If set, a button with this link will be displayed on all items. This will override any available URL on the objects fetched from the api | | urlButtonText | false | The text to display on the url button | | hideUrlWhenFull | false | If set to true, when displaying ScheduledSessions, if no remaining capacity remains, the URL button will not be displayed | | checkoutBaseUrl | false | The base of the checkout url, this is used to access a branded checkout page. If this field is filled, the checkout button will appear when a session is available for booking | | checkoutInChat | false | If set to true, the checkout page will be rendered inside the chat | | checkoutText | false | The checkout button text | | noItemsResponse | false | The Response to display if no items are found, defaults to 'menu' | | eventsMessage | false | The message to display before EventsSeries are displayed, this can include templates using the Imin api results, for example %%view.imin:currentPage%%. Defaults to "Here are the available activities. Page %%view.imin:currentPage%% of %%view.imin:totalPages%%" | | seriesMessage | false | The message displayed before displaying the available SessionSeries. This can include templates using the first SessionSeries item. Defaults to "Here are the available schedules." | | sessionMessage | false | The message displayed before displaying the available ScheduledSessions, this can be a template using the first SessionSeries item. Defaults to "Here are the upcoming sessions." | | variablesResponseChoice | false | If set, a button will appear on ScheduledSessions and SessionSeries, which will set the imin variables on user, for use in other integrations, templates or Decision response | | variablesResponseChoice | false | The text on the button that sets the imin variables and continues the conversation with the Variables Response. Defaults to 'Continue |
| queries | true | The queries used to find activities, besides startDate and endDate. Both key and value of each field can be a template, for example 'startTime[%%beforeOrAfter%%]' : '%%timeOfDay%%' |
Variables
The Imin variables are imin-activity-name
, imin-activity-date
and imin-open-active-id
. These can be used in templates and other integrations and work best when working with a particular scheduled session. imin-activity-date
will use the first available session, if looking at SessionSeries
, and imin-open-active-id
refers to the activity's OpenActive
id.