Triggering an MPO Task via Mambu Webhook
In most cases, Mambu Process Orchestrator (MPO) tasks are triggered by external events, with MPO acting as a middle layer that responds by executing business logic. In this documentation, we will use the Mambu Banking Engine as the external service triggering a task, but any external service that can send webhook notifications is capable of triggering MPO tasks.
Getting the webhook URL for an MPO process
To trigger an MPO task, begin by getting the webhook URL to start a new task. To do this, select the Start node of the process that you want to trigger. In the info panel on the right-hand side, enable Direct url for tasks upload, and select Copy webhook via JSON. Save the copied link as we will use it later.
To find the webhook URL for an Alias, see Finding out more about an alias.
The webhook URL used to initiate a task is secured by the SHA-hashed signature at the end of the URL.
Preparing Mambu to trigger an MPO task
Before you start, define the conditions to trigger the webhook and the JSON payload to send to MPO when the event is triggered.
To create a webhook in the Mambu UI do the following:
- Log in to your Mambu instance at
https://TENANT_NAME.mambu.comor use your sandbox instance at
- On the main menu, go to Administration > Webhooks.
- If Webhook Communications is set to
None, change it to
Enabledand select Save Changes. Otherwise continue to Step 4.
- Open the Notifications tab and select Add Notification.
- Enter a name for your webhook.
- Select Opt-out underneath Option. This ensures the webhook automatically applies for all of your clients and accounts. Opt-in requires you to enable this webhook notification for each account you have in your instance.
- In the Conditions section you can define the conditions that trigger the webhook. For more on the conditions you can set, see Fields for a webhook.
- Enter the URL that you saved from the Getting the webhook URL for an MPO process section in the Web Hook URL input.
- Set the Request Type to
POST, set Authorization to
No Authorizationand set Content-Type to
- In the text box, enter a JSON-formatted payload to send with the webhook. You can search under Placeholder for pre-defined patterns to use to pull in any field from Mambu.
- You can preview the JSON payload by selecting the Preview button. When you are done select Save Changes.
No validation is done on the JSON payload you create. An incorrectly formatted payload will cause errors in MPO when it is sent from Mambu.
For more on how to create webhooks in Mambu, see Defining a New Webhook.