Customer model

Details on every Customer Object field
Written by Konstantine
Updated 1 year 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": 7831827,
    "name": "Hakim Zarakim",
    "email": "hzarakim@example.com",
    "userId": "example_22",
    "company": "example",
    "phone": null,
    "firstSeen": 1593547200,
    "lastSeen": 1593547200,
    "location": {
        "regionCode": "London",
        "countryCode": "EN",
        "city": "London"
    },
    "device": {
        "id": 28883192,
        "ip": "192.168.1.1",
        "timezone": "America/Los Angeles",
        "platform": "desktop",
        "userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_1) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/81.0.4044.138 Safari/537.36"
    },
    "unsubscribed": false,
    "blocked": false,
    "source": "http://helpcrunch.com/blog/best-live-chat-software/",
    "referer": "https://www.google.com/",
    "locale": "en",
    "notes": "He has never heard about magic",
    "lastPage": "https://example.helpcrunch.com/v2/chats",
    "tags": [
        {
            "name": "Lead",
            "color": "#cсс"
        },
        {
            "name": "Paid",
            "color": "#c377e0"
        }
    ],
    "customData": {
            "subscription_status": "Active",
            "number_of_payments": 15,
            "last_paid_amount": 100.5,
            "last_payment_date": 2021-04-30 23:11:00,
            "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 Customer's name 
email String Customer's email
userId String Unique id of the customer that you can pass to HelpCrunch with User Authentication
company String Customer's company
phone String Customer's phone number
firstSeen Date (UNIX timestamp) Date and time of customer's first visit
lastSeen Date (UNIX timestamp) Date and time of customer's last visit
location Object Customer location object. Contains  regionCode, countryCode and city strings
device Object 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 URL the customer arrived at your website from
referer String HTTP Referer string
locale String Customer locale, defining language and region of the customer
notes String Customer notes. Available in the customer profile.
lastPage String The last page the customer was on
tags Array of strings Customer tag name and color. 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?