Skip to main content
All CollectionsTechnical & SetupEmail handling
Webhooks - Outgoing from Barilliance to ESP
Webhooks - Outgoing from Barilliance to ESP

How to send unsubscribe and subscribe notifications to other platforms

Nir avatar
Written by Nir
Updated over 11 months ago

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:

  1. Paste the webhooks receiving URL of the target system in the Webhook URL

  2. 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 calls

  3. On Values to send, name the variable which will receive the unsubscribed email address.

  4. Optionally add other fixed variables (lines 2-4)

  5. 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. 

  1. 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.

  2. Click the unsubscribe link on the email

  3. Wait for about 10 minutes

  4. Go to Barilliance Settings page and click the 'DEBUG LAST CALL' button. you will see the details of the webhook call.

  5. 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

Did this answer your question?