Customer model

Details on every Customer Object field
Written by Konstantine
Updated 1 month ago

Customers API allows you to get, search, create, update, tag or untag, and delete your customers. If necessary, you can submit an activity event to a customer as well. In this way you can fully control your HelpCrunch contacts.

Here's the example response for most of the Customer API methods:

{
  "id": 542335,
  "name": "John Doe",
  "email": "[email protected]",
  "userId": "user_1234567890",
  "company": "Example Inc.",
  "phone": "+10233456781",
  "firstSeen": "1603885746",
  "lastSeen": "1603885746",
  "location": {
    "regionCode": "Kyyivs'ka Oblast",
    "countryCode": "UA",
    "city": "Kyiv"
  },
  "device": {
    "id": 542335,
    "ip": "192.168.1.1",
    "timezone": "Europe/Kiev",
    "platform": "desktop",
    "userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/86.0.4240.111 Safari/537.36"
  },
  "unsubscribed": false,
  "blocked": false,
  "source": "https://example.com",
  "referer": "https://example.com",
  "lastPage": "https://example.com",
  "locale": "uk",
  "createdFrom": "telegram",
  "integrationId": "465847687",
  "notes": "Lorem ipsum",
  "tags": [
    {
      "name": "vip",
      "color": "#ff0000"
    }
  ],
  "customData": {
    "subscription_status": "active",
    "number_of_payments": 15,
    "last_paid_amount": 15.99,
    "last_payment_date": 1603885746,
    "last_invoice_url": "https://example.com/invoice.html",
    "last_payment_was_successful": true
  }
}

Below you can find details on each of the Customer Object fields.

Field Type Description
id Integer Unique id of the customer provided by HelpCrunch
name String|Null Customer's name 
email String|Null Customer's email
userId String|Null Unique id of the customer that you can pass to HelpCrunch with User Authentication
company String|Null Customer's company
phone String|Null Customer's phone number
firstSeen String (UNIX timestamp)|Null Date and time of customer's first visit
lastSeen String (UNIX timestamp)|Null Date and time of customer's last visit
location Object Customer location object. Contains  regionCode, countryCode and city strings
device Object|Null Customer device object. Contains unique id, ip address, timezone, platform ("desktop" or "mobile") and userAgent
unsubscribed Boolean Customer email subscription status. True - unsubscribed. False - subscribed.
blocked Boolean Blocked customers do not see HelpCrunch widget at all. True - blocked. False - unblocked.
source String|Null URL the customer arrived at your website from
referer String|Null HTTP Referer string
locale String|Null Customer locale, defining language and region of the customer
createdFrom String|Null Channel name (web, iOS, android, telegram, viber, facebook, instagram)
integrationId String|Null Channel identifier (telegramId, viberId, facebookId or instagramId)
notes String|Null Customer notes. Available in the customer profile.
lastPage String|Null The last page the customer was on
tags Array of objects Customer tag name and color. The default color is #c377e0
customData Array Your Custom Data presented as an array. Each attribute consists of name (required) and value (required).

If you have any questions regarding the REST API, feel free to chat us any time.

👩‍💻 Happy Coding! 👨‍💻

Did this answer your question?