Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

Table of Contents:

Table of Contents
minLevel2

The Ongage Webhook

Intro

  • When this feature is set in your account, the Ongage platform will forward all hard bounces, soft bounces, unsubscribes, and complaints, automatically from Ongage to your CRM/Data Warehouse/Back-end platform.
  • This is a "Push" feature, designed for pushing the above data to an endpoint on your side, instead of you having to "Pull" this data from Ongage, by implementing the Ongage API.
  • Go to your 'Account General Settings'  under the 'Account Settings ' menu item. Go to the Webhook endpoint URL input field, and enter an endpoint URL to where Ongage should push this data.


Info

Note: If you'd like to Push Opens and Clicks to your CRM/Back-end, please see the Webhook Example under our Automation Rules feature.

The post command to your endpoint 

Ongage will issue an HTTP Post call to the endpoint URL you provide with an accompanying JSON as in the following format example:

Code Block
[  
   {  
      "email":"email1@email.com",
      "list_id":9997,
      "status":"unsubscribe",
      "esp_name" : "Amazon SES"
   },
   {  
      "email":"email2@email.com",
      "list_id":9998,
      "status":"soft",
      "esp_name" : "Amazon SES"
   },
   {  
      "email":"email3@email.com",
      "list_id":9998,
      "status":"hard"
      "esp_name" : "Amazon SES"
   },
   {  
      "email":"email41@email.com",
      "list_id":9994,
      "status":"complaint"
      "esp_name" : "Amazon SES"
   }
]

How to read the data from your endpoint 

To read the data on your end you'll need something like the following PHP code example

Code Block
$someArray = json_decode(file_get_contents("php://input"), true);

Here are 2 PHP code examples if you'd like to simulate this on your end:

  1. request.php
  2. response.php

Available status values

The status parameter above can contain any of the following values:

  1. soft
  2. hard
  3. unsubscribe
  4. complaint

Additional technical details

  • If the call to your web-service fails, Ongage will save the call and retry again later.
  • Ongage will call the web-service you provide every 10 minutes with all the bounces, unsubs, and complaints that accumulated in that time interval.

...