Webhooks are powerful ways to trigger an action programmatically in other applications. A Webhook is nothing but an API call made by a system to some other system. Most of the modern email service providers supports an API which can be called to trigger an email using their services. Blueshift’s webhook capabilities for email allows you to connect such email service provider and trigger email messages from Blueshift’s campaign journey.

Blueshift will automatically receive impression data for the emails sent using your ESP integration and associate so that you can track performance at the campaign and customer level and apply the latest campaign engagement data to trigger next steps in the customer journey.

Prerequisites

Before you can set up integration with Blueshift, you must have your provider's webhook URL handy.

Set up integration

To use the email service provider of your choice to send emails, simply add your provider's webhook URL to the adapter you create in Blueshift.

To set up integration, complete the following steps:

  1. Sign in to the Blueshift app, and click App Hub in the left navigation menu.
  2. Go to All Apps, search for, and select Email via Webhook.
  3. You can also go to Email Apps and select Email via Webhook.
  4. Click Configure to view all the configured adapters.
  5. Click +ADAPTER to add an adapter.
  6. Add a Name for the adapter.  If you have multiple adapters, the adapter name helps you to identify the integration.
  7. Provide the following details for integration:

    email_webhook.png

    Field Description
    Webhook URL Specify the webhook URL for the provider.
    Auth Header Specify the authentication header for the provider.
    Auth Token Specify the authentication token for the provider.
  8. Click Save to add the adapter

Example

Here is an example of the message sent to the webhook when you use this adapter in a campaign Email trigger.

{
"email": "janedoe@blueshift.com",
"subject": "Hello Jane",
"content": <HTML email content>,
"channel": "email",
"text": <text email content>,
"message_uuid": "4b55a633-a7ab-479c-b469-37ae0031560d",
"user_uuid": "74d75296-eba9-44af-8490-dacb8339f281",
"experiment_uuid": "80ed9463-5d5c-0a12-764d-3b570ac29e43",
"bsft_tracking": {
"mid": "4b55a633-a7ab-479c-b469-37ae0031560d",
"uid": "74d75296-eba9-44af-8490-dacb8339f281",
"bsft_ek": "2021-03-22T17:52:22Z",
"eid": "80ed9463-5d5c-0a12-764d-3b570ac29e43",
"txnid": "8a31e605-ea37-421e-a3d2-82ed840cd543"
},
"campaign_name": "webhook api triggered",
"campaign_uuid": "eecfcf9a-6ac9-468c-be76-94a95e7d06e8",
"trigger_uuid": "2dcf8df3-1f55-4d4f-a4bd-41e27a0e1a12",
"customer_id": "62894"
}

Next steps

  1. Create an Email template for your messages.
  2. In your campaign journey, add an Email trigger. On the Email tab of the trigger, go to Send Settings and specify Email via webhook as the App and select the adapter that you just created.
  3. Send events data to Blueshift for analytics and tracking.

Send event data to Blueshift

If you are using a webhook to send campaign messages to your email provider, you can send event data back to Blueshift by using the following URL.

https://api.getblueshift.com/api/v1/messaging_events/5218d497-ffe6-4a2b-95f0-234789671675

  • If you are in the EU region, use the hostname api.eu.getblueshift.com instead of api.getblueshift.com.
  • Ensure that you use the correct field names when you send event data to Blueshift.
  • The event field can have the following values: delivered, soft_bounce, bounce, spam_report, and unsubscribe.
  • The following fields must be sent to Blueshift along with the event field:
    • email
    • experiment_uuid
    • user_uuid
    • message_uuid
    • execution_key
    • journey_uuid

Example for a delivered event:

{ 
  "email" : "janedoe@blueshift.com", 
  "timestamp" : 1513299569, 
  "experiment_uuid" : "5192f38e-7094-4dfd-9138-9579aca8f1e3", 
  "user_uuid" : "ecd0474c-fb76-4e59-a321-c6ce558aac5c", 
  "message_uuid" : "1840a829-a4e9-4044-b1f3-7ce9edf120f4", 
  "execution_key" : "2020-06-18T19:02:40Z", 
  "journey_uuid" : "a977ef6b-945c-4e78-a938-8d8f0726f2a8", 
  "user_transaction_id" : "lists_7fc56270e7a70fa81a5935b72eacbe29", 
  "retailer_customer_id" : "159230", 
  "event" : "delivered" 
}
Was this article helpful?
0 out of 0 found this helpful

Comments

0 comments

Please sign in to leave a comment.