You can set up webhooks in your automation campaign flows to send Ometria events to your API endpoint.
This is a useful method for building custom integrations with third parties Ometria doesn't currently have a native integration for, e.g. direct mail providers.
If you delete or disable a webhook from Ometria, the campaign will continue to work as expected, ignoring the webhook node.
Before you begin
If you want to start using webhooks in your automation campaigns, please get in touch with your Customer Success Representative to discuss commercials and enablement.
You'll need the endpoint URL for the API you want to send data to.
Check your permissions
To manage webhook connections you must have the following permissions enabled:
- Administer account (and all other permissions), or;
- Both Manage webhook connections and Access settings (excluding user access and API keys
Setting up webhooks
To set up webhooks for your account, go to Settings > Connections > Add new connection:
Select the Webhook tile:
Complete the setup screen:
Field | Description |
Connection title | Give your webhook a descriptive title. |
Webhook endpoint URL |
Enter the URL for the endpoint you want to send data to.
Note: Due to the potentially sensitive nature of the data, only https URLs are allowed.
|
Headers |
Optional field. Enter any headers you like in JSON. |
Template |
Required field. This is a jinja template which accepts Ometria merge tags. When the webhook is active, these tags are replaced by the contact's data. |
Click Connect to save the webhook.
The connection will be in Pending state until it is tested.
Once a test succeeds, you can click Update to change the status to Active.
Test your webhook connection
Once your connection is active you'll see a Test button.
Click this to check everything is working correctly:
Using webhooks in your automation campaigns
In any automation campaign, select Call webhook from the Add action menu:
All you need to do is select the webhook you want to use.
Save and publish your campaign as usual.
You can use one webhook connection across multiple campaigns.
Webhook connection logs
There are Connection Logs at the bottom of the screen - click Load Logs to see:
You can filter the data displayed based on status code, customer ID or email, identifier value - and you can set a date range.
Ometria retains this data for four weeks.
Errors
If your webhook returns an error, Ometria retries the payload up to 10 times with exponential backoff (i.e. gradually decreasing the rate until no error is returned).
The last attempt happens approximately one hour after the first attempt.
After 10 retry attempts, the message is dropped.
If a connection is down (or has a high error rate) for more than two hours, the connection status changes to "Error" and no further messages are sent until the issue is resolved.
Once the connection is "Active" again, functionality will resume.
How can I resolve webhook errors?
As webhooks are typically outside of Ometria, you'll need to resolve any errors yourself, or contacting the third party responsible for your webhook.
Common issues include:
- An authentication token in the headers needs changing
- A temporary error, e.g. a third party API is down for a few hours - in this case, use the Test button until you get a successful response.
What happens to my automation campaigns if the webhook errors?
If your webhook stops working, your automation campaigns are not affected and will continue to enter contacts.
Comments
0 comments
Article is closed for comments.