Journeys can easily be triggered by external events using Adversus' built-in Webhook Endpoints.
To configure a Webhook Endpoint, navigate to ''Journeys'' and select ''Webhooks'' under ''Available integrations''. Give it a proper name for easier recognition later on.
This example is focused on updating existing leads, but it can be used to create and update contacts. The trigger type is defined by the ''Resource type'', which is being set to ''Leads''.
Testing your endpoint
To ensure your endpoint is live and see how your data is being processed in Adversus, you can test the endpoint by cURL'ing the trigger URL.
Remember to replace <YOUR TRIGGER URL HERE> and <YOUR TOKEN HERE>.
curl --location --request POST '<YOUR TRIGGER URL HERE>' \
--header 'Authorization: Bearer <YOUR TOKEN HERE>' \
--header 'Content-Type: application/json' \
"updatedName": "John Doe",
"updatedPhone": "+45 86 3000 86"
After you have requested with cURL you can see a preview of the data.
Since we are updating an existing resource (in this case; a lead) we have to match a property from the request to a reference in Adversus.
This can be done using either a custom field (phone number, external id, etc.) or by using the lead id if that is known. In this case, we will use match on ID, since this is included in our webhook request.
Now map the fields you want to use in the journey builder under ''Webhook fields''.
That's it! Click submit, and we're ready to use our new webhook trigger! 👌