Chat with us, powered by LiveChat

Action - Webhook

The Webhook action allows you to call your own API when a contact reaches a certain point in a journey.

The Webhook action is aimed at technical users. If you think you need it but don't understand the details, it would be best to involve your developer in its implementation.

To set up a Webhook action, drop the shape on the journey canvas:

 

Screen_Shot_2020-04-22_at_2.17.17_pm.png

 Click on the shape to configure it:

Screen_Shot_2020-04-27_at_9.55.53_am.png

At a minimum you need to provide a URL to your endpoint and a HTTP method to set up the webhook.

You can optionally provide headers to your system to use for request verification, such as a pre-shared key. We also allow you to do HTTP basic auth if you would prefer.

When a contact or contacts reach this shape, Autopilot will call your URL with the provided HTTP method and a payload as follows:

Sample Payload

 { records:
[ { company_priority: false,
Name: 'Peter AddToList',
LastName: 'AddToList',
FirstName: 'Peter',
Email: 'peter+1587942544854addedbyaddcontacttest@bislr.com',
Company: '',
updated_at: '2020-04-27T00:18:55.000Z',
created_at: '2020-04-26T23:09:25.000Z',
Status: 'Insights',
Website: 'http://www.today.com',
lists: [Array],
contact_id: 'person_637C329C-4398-47BF-BA0E-AC19FC7A8117' },
{ Name: 'Peter FormStack',
LastName: 'FormStack',
FirstName: 'Peter',
Email: 'peter+formstack1587944182614@bislr.com',
anywhere_form_submits: [Object],
lastTimezone: 'America/New_York',
lastLocation: 'US',
lastEngagement: '2020-04-26T19:36:31.386736701-04:00',
updated_at: '2020-04-27T00:18:55.000Z',
created_at: '2020-04-26T23:36:25.000Z',
Status: 'Insights',
Website: 'http://www.today.com',
first_visit_at: '2020-04-26T23:35:50.765Z',
first_conversion_at: '2020-04-26T23:36:25.393Z',
anywhere_page_visits: [Object],
anywhere_utm: [Object],
lists: [Array],
custom_fields: [Array],
mail_received: [Object],
contact_id: 'person_80F2D685-EACB-4561-8D0A-CE5259994414' } ],
journey:
{ name: 'New Journey 2',
id: 'campaign_A230A520-D08E-4E19-BAD4-F22C76A667A0' } }

Note that as you can see in the sample, if multiple contacts reach the shape at the same time, they will be sent together in the "records" array. A payload can contain up to 200 records. You also receive information about the journey.

If you need more context about the position in the journey in case you have multiple webhooks in the same journey, you can use headers to identify the particular shape which has been reached.

How retries are handled

Your webhook has 5 seconds to accept the request sent. If this fails, the system will retry another 2 times to connect. Once a webhook is missed and the retries exhausted, it will not try again. It is therefore important that your webhook processing server is reliable.

Can I change what is in the payload?

At this stage, no.