Webhooks enable you to respond to events that take place in your ShopSurvey account programmatically and collect survey data in real-time.
Webhooks require knowledge of coding or how to use a workflow automation tool that supports incoming webhooks. We recommend working with a developer to use webhooks.
To create new Webhooks, you'll need three pieces of information:
Topic - The unique identifier for the event you want to listen to, e.g. Response.Created or Session.Abandoned, etc. You can see the entire list of Webhook Events and what their payloads look like below.
HTTP Method - The HTTP Method your Webhook endpoint is expecting. Valid values are GET and POST.
URL - The URL to make the request against each time this Webhook is run.
Once you've registered your Webhook, it will start receiving traffic immediately (upon those events taking place). If you'd like to test your integration, just click the "Send Test Message" option on the Webhook dropdown menu:
Available Topics
Here is a list of each Webhook Topic and what the corresponding payload structure looks like.
Survey.Created
This event is called each time a new Survey is published to your account. Here is an example payload for the Survey.Created event:
This event is called each time a new Survey Response is collected from one of your Respondents. Here is an example payload for the Response.Created event:
{"session_id":"ffd1072f-6122-4e6d-a553-7c345e242a76","survey_id":"d9aef04a-3927-498e-909c-6071610ae123","respondent_id":"68e254d8-a593-40b4-947e-98e3072b58fe","respondent_name":"John Appleseed","respondent_email":"john.appleseed@example.com","respondent_phone":"+15555555555","respondent_optin_status":"subscribed","created_at":"2023-12-05T04:38:46.155Z","question_bd4ab475ec8b":"Advertisements online, Word of Mouth","question_78cd638eb211":"Entertainment, News","question_4f7f7f3826a7":"A few times a week","question_ff63564b98fe":"Yes","question_553a5ef6a171":"18-24"}
Respondent.Upserted
This event is called each time a Respondent record is created or updated. Either manually, through a data sync, or survey responses. Here is an example payload for the Respondent.Upserted event: