Hello! 👋 How can we help?

Customer webhooks

Complete list of all customer events you can subscribe to
Written by Konstantine
Updated 6 months ago

We recommend to read through Webhooks overview and Setting up webhooks articles before you proceed with this one.

Currently, you can subscribe to chatcustomer, and message events only. Feel free to chat us with your feedback on the missing events you'd like to use.

All webhook events contain the same attributes, listed below.

Field Type Description
event String Chat or customer event type
eventData Object A container for the data associated with the event
attempts Integer Number of times this event has been attempted
lastAttemptAt Date (UNIX timestamp) The last time the event delivery was attempted
createdAt Date (UNIX timestamp) Date and time the event was created
id String Unique event id provided by HelpCrunch

🙋 Customer Events

Event Type Description
customer.new New customer added to your HelpCrunch account
customer.email_updated Customer email updated. Changing to null value is considered as update.
customer.tags_changed Customer's tags changed. Removing all tags is considered as update.
customer.unsubscribed Customer unsubscribed from your emails
customer.subscribed Customer subscribed to your emails
customer.blocked Customer blocked by any of your team members
customer.unblocked Customer unblocked by any of your team members
customer.deleted Customer deleted from your HelpCrunch account

When the customer event occurs, HelpCrunch sends the HTTP request to the specified endpoint. You can extract basic customer information from the eventData structure in the request body (id, name, email, userId, unsubscribed) as well as all of your Custom Data attributes.

In order to get all the available customer data, use customer id from the event and call Get a single customer REST API method.


Customer Model for Webhooks

Example Response

{
    "event": "customer.email_updated",
    "eventData": {
      "id": 8745474,
      "name": "Paul",
      "userId": "example_2924",
      "email": "paul@example.com",
      "unsubscribed": false,
      "customData": {
          "Role": "admin",
          "Plan": "Enterprise (Unlimited) $9999/mo",
          "segment": "PotentialChurn_premium_seg1",
          "Currency": "USD",
          "Emails sent": 621,
          "Trial end date": "2017-07-24 14:30:00",
          "Became payer at": "2017-09-13 00:00:00",
          "Registered date": "2017-07-10 14:30:00",
          "Next payment date": "2020-09-01 00:40:00",
          "Billing info added": true,
          "Number of payments": 35,
          "Subscription status": "active"
      },
      "tags": [
          {
              "id": 52661,
              "name": "Lead"
          },
          {
              "id": 64814,
              "name": "Enterprise"
          }
      ],
    },
    "attempts": 0,
    "lastAttemptAt": 1606151791,
    "createdAt": 1606151791,
    "id": "9e7ef91a-6243-4637-b5d2-404b68841ee9"
}


eventData Object for Customer Events

Field Type Description
event String Event type
id Integer Unique internal customer id
name String Customer's name 
userId String Unique id of the customer that you can pass to HelpCrunch with User Authentication
email String Customer's email
unsubscribed Boolean Customer email subscription status. True - unsubscribed. False - subscribed.
customData Array Your Custom Data presented as an array. Each attribute consists of name/property and value.
tags Array Array of tag objects. Each tag contains it's unique HelpCrunch id and name.

If you have any questions regarding our Webhooks, feel free to chat us any time. 

👩‍💻 Happy Coding! 👨‍💻

Read Next → Message webhooks

Did this answer your question?