Search results for "{{ search.query }}"

No results found for "{{search.query}}". 
View All Results

WebEngage webhooks let you add an HTTP callback to the events happening in WebEngage. By configuring a webhook, WebEngage is triggered to call a script on your web-servers whenever a particular event, for which you want to get a real-time data, occurs and use it for internal purpose. You can use webhooks to send information to systems such as Salesforce. You can also use webhooks to send information to your backend systems. For example, you might want to credit your customers' account with a promotion once they’ve performed a custom event a certain number of times.

Request Details

Webhook requests will be posted to a configured URL and format for a specific webhook. Webhook request method will always be POST. There will be additional parameters that will be appended to the postURL.

Headers

Name Description
x-request-id:{HEX_STRING} This header is used to identify the webhook post requests uniquely to achieve events idempotency. {HEX_STRING} will be replaced with a unique random hex string

Parameters

Name
Description

eventType

Event for which data is being posted

licenseCode

Your WebEngage Publisher LicenseCode

secret

This secret key is to be used to identify the webhook post requests from WebEngage. More about this here

Request Body

Request body will contain the event specific data. The request body will vary based on the registered webhook.

Expected Response

WebEngage will understand HTTP Status, of the response. For HTTP Status 200 will be treated as Successful posts, everything else will be logged as failed webhook posts.
See this to understand, what happens in case of failures.

Verifying Request

You will get a Webhook Secret Key for your account on the Webhook Configuration page. This secret key is to be used to identify the Webhook post requests from WebEngage to your servers. WebEngage appends secret parameter in the postURL. Value of the secret parameter is the MD5 Hex of the combination of the licenseCode and the Webhook Secret Key key separated by a :.

Error Handling and Retries

WebEngage keeps a log of recent Webhook Requests under Webhook History tab in the dashboard. Automatic retries are currently not supported. To see the logs and manage failed requests, you will need to go to your Webhook History. From there, you will be able to resend a particular failed Webhook Request by clicking the Resend link against that history item.

Configuration

In your WebEngage Dashboard, you will be able to configure URLs for different events. Following are the Webhooks we currently allow you to configure.

Feedback Webhook

Triggers on feedback submission. To add a webhook specific to FEEDBACK_SUBMIT event, you need to configure this webhook by specifying the postURL and the response format again from xml & json.
Feedback data looks the same as that received from /feedback/<FeedbackId> API call.

Feedback Reply Webhook

Triggers on posting a reply to an existing feedback thread. To add a webhook specific to FEEDBACK_REPLY_SUBMIT event, you need to configure this webhook by specifying the postURL and the response format again from xml & json.
Feedback reply data looks the same as that received from /feedback/<FeedbackId>/replies API call.

Survey Response Webhook

Triggers on survey response submission. To add a webhook specific to SURVEY_RESPONSE_SUBMIT event, you need to configure this webhook by specifying the postURL and the response format again from xml & json.
Survey response data looks the same as that received from /survey/response/<ResponseId> API call.

Events Webhook

Triggers when the specified event gets logged into the system. To add a webhook specific to an event, you need to configure this webhook by specifying the name of the event, the postURL. Currently only json response format is supported.

Here is an example of how the event data for push_notification_accepted event looks like

{
    "event_data": {
        "result": "SUCCESS" // push-notification sent succefully
    },
    "system_data": {
        "variation_id": "1if30if",
        "sdk": "ANDROID",
        "scope":"~7l798ci",
        "id": "20hlgbg",
        "push_notification_content": "{\"identifier\":\"1if30if\",\"experimentId\":\"20hlgbg\",\"packageName\":null,\"title\":\"Master App\",\"message\":\"How are you today ?\",\"image\":null,\"cta\":{\"id\":\"3d7630c9\",\"type\":\"DEEP_LINK\",\"actionLink\":\"webengage://com.webengage.testapp1/start_activity/com.webenagege.testapp1.Activity1\",\"actionText\":null,\"templateId\":null},\"custom\":[{\"key\":\"theKey\",\"value\":\"whatIsKey\"}],\"expandableDetails\":{\"title\":null,\"image\":\"https://webengage.net/wk-test-static-files/~99199077/6313a242-91a5-46b8-96b5-1598365a509a.jpg\",\"message\":null,\"cta1\":null,\"cta2\":null,\"cta3\":null,\"style\":\"BIG_PICTURE\",\"category\":null},\"tokens\":null}"
    },
    "event_time": "2016-06-01T15:53:59+0000",
    "event_name": "push_notification_accepted",
    "license_code": "~99199077",
    "category": "system",
    "user_id": "chirag@webklipper.com",
    "anonymous_id": "0000014a-a2da-cfd3-91c7-0252d7df1a4c"
}

Here is an example of how the event data for push_notification_rejected event looks like

 {
     "event_data": {
         "result": "UNAVAILABLE"
     },
     "system_data": {
         "variation_id": "1if30if",
         "sdk": "ANDROID",
         "scope":"~7l799ci",
         "id": "20hlgbg",
         "push_notification_content": "GCM_ERROR"
     },
     "event_time": "2016-06-01T15:53:58+0000",
     "event_name": "push_notification_rejected",
     "license_code": "~99199077",
     "category": "system",
     "user_id": "chirag@webklipper.com",
     "anonymous_id": "0000014a-a2da-cfd3-91c7-0252d7df1a4c"
 }

Journey Webhook

Triggers on Journey create, update, publish and delete events. To add a webhook specific to a journey, you need to configure this webhook by specifying the postURL. JSON format is supported.

Here is an example of how the event data for journey_activated event looks like

{
    "category": "account",
    "resource": "Journey",
    "version": 1,
    "event_name": "journey_activated",
    "event_time": "2017-03-06T11:00:52+0000",
    "license_code": "311c48b3",
    "user_id": "john@doe.com",
    "event_data": {
        "creationTime": "2017-03-06T11:00:52+0000",
        "createdBy": "john@doe.com",
        "name": "Repeat Order Journey",
        "id": "abn3jj5",
        "activatedBy": "john@doe.com",
        "activationTime": "2017-03-06T11:00:52+0000",
        "status": "ACTIVE",
        "tags": ["premium-user"]
    }
}

Webhooks