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, click on the Start node of the process that you want to trigger. In the infobox on the right-hand side, enable Direct url for tasks upload, and click Copy webhook via JSON. Save the copied link as we will use it later.
To find the Webhook URL for an Alias, see the Using Aliases page.
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
- Click on Administration and then open the Webhooks tab.
- If Webhook Communications is set to None, change it to Enabled and click Save Changes. Otherwise continue to Step 4.
- Open the Notifications tab and click 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. Find out more about the conditions you can set by reading the Fields for a webhook section in the Defining a Webhook page.
- 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 clicking the Preview button. When you are done click 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, read Defining a New Webhook in our User Guide.