Toggle menu

Writing Bookings Plugins

Pre-Payment Plugin

Pre-payment plugins add an additional step to the booking process in between selecting tickets and paying.

Booking with Plugin

These plugin forms are used to collect additional information from the person making the booking. Examples include address, the names of attendees, vehicle registration details, dietary requirements or company information.

Examples

You can download some ready to go plugins from the Bookings section of the Community Library.

Design Your Form

This blueprint form (ZIP) [4KB] will get you started. Download and the zip, then import the blueprint form into your forms designer. Right-click on the blueprint and choose "Create a form using". Give your form a new name and description, and on the Properties tab, change the location where it will be saved. You can read more about blueprints in Form Blueprints, Snippets and Smart Snippets.

You'll see the form design already has some fields on it. The hidden fields should be left at the top of the first page. The Action - Save to iCM and Workflow - Complete Task fields should be placed at the end of the final page of your form. Other than that, you are free to add whichever fields and as many pages as you need to your form.

This simple one page form collects vehicle details:

Example Plugin Form

Adding Plugins to the Bookings Configuration

The name of your plugin form needs to be added to the plugins section of the Bookings Configuration End Point.

Near the end of the configuration, you'll find a block of code that looks like this:

config.plugins.push({
    "name": "Car details",
    "code": "CarDetails",
    "prePaymentForm": "CARDETAILSFORM",
    "postPaymentWorkflow": "",
    "postPaymentWorkflowVars":  [],
    "bookingManagementForm": "",
    "eventManagementForm": ""
})

PropertyTypeDescription
nameString, requiredThe name of the plugin. This text will be displayed to the event organiser in a drop-down field as they schedule occurrences
codeString, requiredThe value of this property is not important, but it must be unique for each plugin
prePaymentFormString, optionalThe name of the form that should be displayed to the user prior to payment
postPaymentWorkflowString, optionalThe name of the workflow that should be started once payment has been taken
postPaymentWorkflowVarsArray (of strings), optionalAn array of variables names that will be passed from the booking workflow to the postPaymentWorkflow
bookingManagementFormString, optionalThe name of the a that should be presented to a user from the booking overview page
eventManagementFormString, optionalThe name of the form that should be presented to an event administrator from the event overview page

 

This block of code will need to be duplicated for each of your plugins. You can leave values as empty strings if your plugin doesn't use them.

Adding a Plugin to an Event

Once a plugin has been added to the configuration, it can be picked from the event scheduling form:

Pick Plugin

Plugin Data in the Event Manifest

If you build your plugin using the blueprint above, which includes a database save action form field (the object label matches the booking business key), the plugin data is available in the Event Manifest.

The plugin data is visible when you view the details of each booking. It's displayed using the read only view of the plugin form:

Plugin Data Manifest View

All of the plugin data is also available in the manifest CSV.

Last modified on 17 October 2024

Share this page

Facebook icon Twitter icon email icon

Print

print icon