SightMill: What is the webhook format?

What is the webhook format?

Our webhook API is a simple, industry-standard method of linking different systems together to let you send out an NPS survey in response to an event on a different system.

For example, you could:
Link your helpdesk system to SightMill using webhooks to send a survey after a support ticket is closed. Read more
Or you could send a survey when a purchase is made on your website. Read more
Or send a survey response from a customer to a Slack channel. Read more

To link two systems using a webhook, the receiver software provides the sender with a URL. For SightMill, we provide a unique URL for each account and project to receive webhooks. You'll find this in your Project/Settings - Webhooks menu.

Webhooks functions
The SightMill webhooks support lets you:
  1. send an email survey
  2. send an SMS survey
  3. add a new contact (that is then included in a scheduled survey)
In addition, the email webhooks function supports a delay feature - so you can setup your email to go out a certain number of hours after the webhooks request is received.

Webhooks endpoint / URL
When SightMill sends data, your receive application will provide a unique URL that you copy and paste in to SightMill. You'll find this in the Project/Settings - Webhooks menu

Webhooks data / payload format
The data that is exchanged is in JSON format and contains a range of fields including the NPS score, verbatim comments, tags, etc.

For example, if linking SightMill to Slack so that SightMill can post new survey results in real-time to your Slack channel, you would copy your Slack unique webhook URL into the integrations setup for your project in SightMill. Read more here.

The format for the information your CRM or application sends across to SightMill via a webhook needs to be in a specific format with nine fields supported:
  1. firstname, 
  2. surname, 
  3. email address (or phone number for an SMS survey)
  4. segment, 
  5. spend, 
  6. product, 
  7. tag, 
  8. owner
  9. id (this is a unique identifier for this contact - if your system does not generate unique IDs then repeat the email address or phone number here)
The only two that MUST be included are the id field and the email address (or phone number for SMS) field.

Here's a simple example to send an email survey:
      {"Email":"test@example.com", "FirstName":"John", "LastName":"Smith", "id":"12345"}

or with additional meta fields:
      {"Email":"test@example.com", "FirstName":"John", "LastName":"Smith", "segment":"legal", "spend":"$1500", "product":"Gold-plan", "id":"12345"}

NOTE. ensure that the contact has its own unique id field - normally a CRM or helpdesk system will have an ID field, otherwise repeat the email address or phone number here)

Testing your webhooks? Use a tool like Insomnia to generate a POST to your unique SightMill Project webhooks URL and add the JSON format payload, for example:

POST https://sightmill.com/hooks/xxx/yyy/survey/email
{
"email": "hello@test.com",
"firstname": "Fred",
"lastname": "Smith",
"tags": "tag1",
"segment": "legal",
"product": "gold-plan",
"id": "hello@test.com"
}

    • Related Articles

    • What is a webhook API?

      A webhook is sometimes called a web callback or push API. It's a way for one system to send real-time information to another system - data is exchanged immediately an event happens. In a typical standard API, one system will keep asking another for ...
    • How do webhooks work in practice?

      Let's take an example of integrating SightMill with Salesforce CRM so that SightMill will generate and send out an NPS email survey when you change your contact settings in Salesforce to show the contact has bought your product. (Note: to send ...
    • How to use webhooks to trigger SightMill to send an email survey

      You can link your CRM or application directly to SightMill so that an email survey is sent by SightMill when triggered directly from your application. This is a great way to send an email survey after, for example, a customer service call or when a ...
    • How to send surveys from a web page - using javascript and webhooks

      You might have a requirement to send an NPS survey directly from an action on your website or software platform. A few examples are when you need to: Send an email survey if a user clicks on a button on your website Send an email survey if a customer ...
    • Does SightMill have an API?

      Yes, we support an API concept called webhooks. Webhooks are an industry-standard, lightweight technology used to pass data between platforms in response to events. As more and more applications use real-time information and events, webhooks are ...