What are webhooks
Webhooks are simple web calls which allow one system to send information to another system. A good example is to notify the Barilliance customer email provider to opt out an email address if this email address is opted out by unsubscribe link on Barilliance triggered emails. Another example is to add the email address of a subscriber which subscribed using Barilliance email capture popup to your ESP.
Setting up the webhooks.
Go to Barilliance Settings page and scroll to the Outgoing Webhooks section.
You will see two sections.One for sending unsubscribe notifications and the other for sending subscribe notifications.
Unsubscribe webhooks
Follow these steps:
Paste the webhooks receiving URL of the target system in the Webhook URL
Select the data format which works with the other platform. See below for the supported formats.
The right format depends on the other system which receives the webhook callsOn Values to send, name the variable which will receive the unsubscribed email address.
Optionally add other fixed variables (lines 2-4)
Add a comment if needed and Save the changes and
Supported formats
Set the following format based on the requirement of the other platform.
URL params - the data is passed as parameters in the url for example:
https://otherplatform.com/theurl?email=david@smith.com&otherdata=xxx
Post Param - the data is passed as POST parameters in the call headers.
Json - data is passed as a json object containing the values in the call body.
{email} token in the webhook url - the token {email} can be added in the url of the webhook and it will be replaced by the email address.
Sending MD5 encoded value of the email
Some systems require sending the MD5 hash of the email address instead of the email itself. To support this requirement check the 'Send emails as MD5 encoded string' checkbox
Basic Authentication support
If the other platform require basic authentication, You can add username and password to the webhook url in this format:
https://username:password@otherplatform.com/webhook/endpoint/
HTTP Headers
If you need to add HTTP headers to the calls enter them in the HTTP headers box. one per line.
Example format:
Authorization: Basic QWxhZGRpbjpvcGVuIHNlc2FtZQ==
Proxy-Authenticate: Basic
How to Debug the webhooks
To debug the webhooks.
send yourself a test triggered email from Barilliance. It is recommended to use an email address you dont need since the test may unsubscribe you from your own lists and from Barilliance.
Click the unsubscribe link on the email
Wait for about 10 minutes
Go to Barilliance Settings page and click the 'DEBUG LAST CALL' button. you will see the details of the webhook call.
Check in your system that the email address has indeed opted out/blocked.
Subscribe webhooks
Subscribe webhooks send email addresses of visitors as they subscribe using Email Capture popup, Site capture, Triggered email booster or any other source.
Select the required options to send the right subscribers to your system.
Sending the email source {email_type}
To send the email capture source in the message use the token {email_type} as a value to send.
The possible values are:
0 - Onsite email entry
10 - Email my cart
20 - Triggered email booster
30 - Click on email recommendations widget
40 - Back to stock reminder
50 - Visit summary email
60 - Email capture form
70 - Email my pinned-items list