Writing Bookings Plugins
Post Payment Workflows
It's possible to start another workflow process once a booking has been made. Bookers will be taken straight to the first form in your workflow as soon as they press the "Book Now" button (if the event is free) or once they have been redirected back to your website after a successful payment.
To enable a workflow, enter the process identifier of the workflow you want to start in the plugin configuration (see the configuration section in the previous article). For example
The
- form_DATA - an object containing all of the data needed by the product
- form_EMAIL - the booker's email address
- form_NAME - the booker's name
- form_TEL - the booker's phone number. This field is optional
The business key of the booking is always passed to the new workflow as the value of the
If your plugin has a pre-payment form (described previously) you can include any variables from that in exactly the same way.
In this example two fields from the booking form are being passed to the new workflow:
"postPaymentWorkflow": "timsexampleprocess",
"postPaymentWorkflowVars": ["form_NAME", "form_EMAIL"],
Which resulted in: