A webhook is an event callback, used by remote applications to receive notifications of events from Symplify.
Events can be triggered as an HTTP webhook or sent to an SQS queue. The later is recommended when you are expecting bigger amount of events.
When selecting HTTP webhooks, events will be sent to the URL provided. From one of the following IPs depending on the server of your Symplify account:
- SERVER ONE – 192.165.55.111
- SERVER TWO – 192.165.55.112
- SERVER THREE – 192.165.55.113
- SERVER FIVE – 184.107.113.20
You can set up events for:
- Bounce – email address hard bounces
- Form submitted - data submitted in a form on a Dynamic web page
- Enduser updated – enduser property updated via link click function
- Link clicked – any link is clicked
- Mail opened – mail opened
- Opt out – opt outs completed via click on unsubscribe link in email
- SMS Inbox – incoming mobile number registration
- Optin – contact created via Symplify Optin form.
- Set property - contact updated via link click in email.
- Sendout summary - information about a sendout triggered when a delivery is sent (batch processed sendouts only)
Setup
Create the endpoint(s) on your end (these should be managed asynchroniously, learn more below).
When you have created webhook endpoints you can add those to the events you want to use.
Select the level (account or specific project) and click on Edit for the event you want to receive and paste your endpoint and hit Save.
Regardless webhook type it is important that you have an asynchronous approach receiving the calls. The hooks are fired once (no retry will be made) and the endpoint is expected to acknowledge each hook within one (1) second or it will time out.
If the endpoint, for some reason, is struggling, not being able to acknowledge the hooks or even fails them, the circuit breaker on the Symplify side will kick in.
The circuit breaker is a safety system which will stop sending calls to an already struggling endpoint until the problem is solved.
The normal state of the circuit breaker is closed. When it is closed, calls are triggered to the endpoint as intended.
It is transitioned to an open state when 5 calls in row are not acknowledged within 1 second and/or the failure rate is 50% or higher.
When the circuit breaker is in open state, no calls to the endpoint will be made.
After 60 seconds in open state, it is transitioned to a half open.
In half open state, 10 calls will go through to evaluate the performance of the endpoint. For these 10 calls, the response time must be within 1 second and the failure rate less than 50%.
If the endpoint meets these requirements, the circuit breaker will be transitioned to closed state.
If the requirements are not reached, it will be transitioned back to open state and run the pattern until response time and failure rate meets the requirements.
Examples
The data that will be sent via Webhook from Symplify is as follows from some examples.
Mail opened
{"eventId":2105637381,"contactId":"ORIGINALID123","campaignId":736510,"sentTimestamp":"2022-06-13T08:11:15.990-04:00","module":"CAMPAIGN","channel":"EMAIL","project":"Newsletter","description":"MailOpened","list":"DatabaseCOM","listId":23021,"messageType":"OPENED","carmaContactId":2047817542,"campaign":"Campaign 11","projectId":6965,"timestamp":"2022-06-13T08:11:15.990-04:00"}
Link clicked
{"eventId":421213692,"contactId":"ORIGINALID123","campaignId":310216,"linkTarget":"http://www.example.com?new_parameter=example_placeholder¶meter_name=parameter_value&mallgroda=2&skorpgrus=yes&slang=hallon","module":"CAMPAIGN","channel":"EMAIL","project":"Newsletter","clickTimestamp":"2022-06-13T12:44:28.687+02:00","description":"ClickedLink","list":"DatabaseCOM","listId":17717,"messageType":"LINK_CLICKED","carmaContactId":4221770811,"campaign":"Campaign 10","projectId":11471,"timestamp":"2022-06-13T12:44:28.687+02:00"}
Opt out (unsubscribed)
{"eventId":421213698,"contactId":"ORIGINALID123","campaignId":310217,"module":"CAMPAIGN","channel":"SMS","project":"Newsletter","description":"OptOut",
"list":"DatabaseCOM","listId":6862,"carmaContactId":78605652,"campaign":"Campaign_1","comment":null,"projectId":4,"unsubscribeTimestamp":"2022-06-29T11:29:35.797+02:00","timestamp":"2022-06-29T11:29:35.797+02:00"}
Bounce
{"eventId":1544584357,"bounceStatusCode":"5.7.1 (delivery not authorized)","contactId":"123456","bounceType":1,"campaignId":310216,"bounceTimestamp":"2017-01-11","project":"Account","bounceDomain":"example.com","description":"Bounce","bounceMessage":"relaying-issues","list":"Email verification","bounceRecipient":"123456","listId":19350,"carmaContactId":xxxxxxxxx,"campaign":"Campaign_1","projectId":7656,"timestamp":"2017-01-11T09:00:28.063+01:00"}
Form submitted
{"customerId":1001,"micrositeId":646,"microsite":"Preferences","siteType":"DEFAULT","pageId":1,"page":"Landing page","projectId":1142,"project":"Automations COM","listId":17717,"list":"DatabaseCOM","originalId":"123456","data":{"gdpr_consent":"true","frequency":"weekly"},"timestamp":1698220840114,"messageType":"FORM_SUBMITTED"}
Enduser updated
{“listId”:23481,“eventId”:503916682,“contactId”:“ORIGINALID123”,“property”:“city”,“carmaContactId”:421497130,“listName”:”DatabaseCOM”,“value”:“london”}
Optin
{"listId":23610,"eventId":503965015,"contactId":"ORIGINALID123","carmaContactId":421506676,"description":"OptIn","list":"DatabaseCOM","timestamp":"2017-11-22T16:04:04.063+01:00"}
SMS Inbox
{“timestamp”: “2018-04-03T13:20:15.413+02:00″, “message”: “stop”, “sender”: “467123456789″, “shortCode”: 72456, “eventId”: 1986037821, “listId”: 42261, “description”: “SmsInbox”, “keyword”: “STOP”, “originalId”: “123456”, “sentTimestamp”: “2018-04-03T13:20:15.413+02:00”, “country”: “se”}
Set property
{"listId": 31391, "eventId": 1535568871, "messageType": "SET_PROPERTY", "contactId": "ORIGINALID123", "property": "contact.title", "carmaContactId": 663829901, "listName": "jesper@compost.se", "value": "Updated by email click"}
Sendout summary
{"eventId": 513337426, "campaignId": 1011835, "subjects": [{"content": "Subject line to all members","segmentId": 9919,"segment": "Members"},{"content": "Subject line to the rest","segmentId": -10,"segment": "Everyone"}],"channel": "EMAIL","project": "Newsletter","list": "My database","type": "SINGLE_STEP","sentCount": 11000,"listId": 240023,"messageType": "SENDOUT_SUMMARY","segment": "Swedish customers","segmentId": 10599,"replyTo": "Company name (hello@example.com)","campaign": "WEEK15","from": "Company name (hello@example.com)","projectId": 11462,"timestamp": 1680507950167}}