Webhooks are a way you can communicate with 3rd-party apps by sending automated communications whenever there is a change in certain Salespanel entities, ex. a visitor is identified, or they qualify for a certain Segment, etc. Salespanel makes an HTTP POST request to a publicly available URL endpoint that you can configure while creating the webhook.
You can use Webhooks in various scenarios, for example:
- Send the email address of an identified lead to your email marketing tool to start a funnel,
- Send a qualified lead to your Sales team on Slack or to any CRM,
- Keep your Sales reps updated when your leads visit milestone web pages, etc.
Following is an example of a webhook payload data in JSON format sent when a lead qualifies for a Segment:
// this is an example output
{
"hook": {
"id": "2ac9c790-9431-4609-9696-cac25b9b5ad3",
"event": "person.segment_qualified",
"target": "https://webhook.site/0ed2286d-b934-491e-8d34-f8e933c6eb22",
"title": "signed up for webinar"
},
"payload": {
"acquisition_details": {
"source": "Direct",
"landing_user_agent": {
"device": "PC",
"device_os": "Mac OS X 10.15.7",
"browser": "Chrome 94.0.4606"
},
"landing_location": {
"city": "Pune",
"region_code": "MH",
"emoji_flag": "\ud83c\uddee\ud83c\uddf3",
"country": "India",
"region": "Maharashtra",
"continent_code": "AS",
"country_code": "IN",
"continent": "Asia",
"emoji_unicode": "U+1F1EE U+1F1F3"
}
},
"lead_scoring": {
"lead_score": 20
},
"contact_id": "c1e82a57-bc6f-ad03-d6c1-2a2cc23948fe",
"person_details": {
"website": "https://webspdy.com/",
"bio": "web tech enthusiast",
"age_range": "29-35",
"last_name": "Darekar",
"name": "Akshay Darekar",
"title": null,
"twitter": null,
"first_name": "Akshay",
"linkedin": null,
"facebook": null,
"location": null,
"organization": "Salespanel.io",
"email": "akshay@webspdy.com"
},
"company_details": {
"website": "https://webspdy.com",
"bio": null,
"domain": "webspdy.com",
"name": "Webspdy",
"industry": null,
"linkedin": null,
"founded": null,
"facebook": null,
"location": null,
"employees": null,
"category": null,
"twitter": null
},
"segment": {
"segment_id": "9887ba45-b350-42eb-ac1e-062b4f55328a",
"title": "Webinar Campaign"
}
}
}
How to send a Webhook
- On the Webhooks List page, click on Create Webhook button.
- On the Create Webhook page, provide a title to save the Webhook for reference.
- In the Target URL field, provide your webhook endpoint URL.
- Click on the Test button, so Salespanel can help you verify if the Target URL is active and ready to receive visitor data from Salespanel. Fix any 4xx/5xx errors, and repeat the verification until the 200/201 response code is returned by the Target URL.
- Next, select the events you'd like to trigger the request on, and provide the webpage links and /or Segment names to configure the events.
- Activate the Webhook, and proceed to Save.
Selecting the events for sending Webhooks
Salespanel will send requests to your Target URLs when an event from the following list occurs:
Person Events
person.identified
Salespanel will request your Target URL as soon as a visiting person is identified with their email address.
person.page_visit
We will send a request as soon as the lead visits a particular web page. Please select this option and provide the link to that web page in the input field that is revealed. You can provide as many URLs as you want.
person.segment_qualidied
Salespanel makes a request to your Target URL in real-time, as soon as a visitor is qualified for a Salespanel Segment. You can also check if a Segment is connected to webhooks in that Segment's Trigger Settings.
Company Events
company.identified
Salespanel will request your Target URL as soon as a visiting company is identified.
company.page_visit
We will send a request as soon as the Visiting Company visits a particular web page on your website. Please select this option and provide the link to that web page in the input field that is revealed. You can provide as many URLs as you want.
company.segment_qualidied
Salespanel makes a request to your Target URL in real-time, as soon as a Visiting Company is qualified for a Salespanel Segment. You can also check if a Segment is connected to webhooks in that Segment's Trigger Settings.
Testing a webhook
To ensure it's working properly, you can manually trigger a webhook on the Create Webhook Screen. Click on the "Test" button next to the Target URL field, and Salespanel will deliver a test payload to the URL you have submitted.
Verify the payload delivered by a webhook
Along with the webhook payload, Salespanel also sends the information you can use to verify the origin of the webhook request. The signature token available on the webhook edit page can be verified against the webhook request's payload: "hook" -> "id".
Retries
Salespanel retries making webhook requests that encounter temporary server errors (HTTP 5xx status codes) 5 times. If the server error persists on the 5th attempt, it will deactivate the webhook and send an email to the account owner.