Hello 👋🏼 How can we help?

Chat model

Details on every Chat Object field
Written by Konstantine
Updated 9 months ago

Chats API allows you to get, search, create and snooze your chats. If necessary, you can also update chat status, assignee and department. In this way you can fully control your HelpCrunch chats.

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

{
    "id": 1568834,
    "closedBy": "customer",
    "lastCustomerMessageAt": 1601477718,
    "status": "closed",
    "notes": "Chat closed. Customer is happy. You're awesome.",
    "closedAt": 1606764198,
    "rating": "great",
    "createdAt": 1594322706,
    "lastMessageAt": 1601477718,
    "snoozedUntil": 1601647200,
    "lastMessageText": "Hello World",
    "lastMessageId": 8793611,
    "lastCommunicatedAgentId": 4188,
    "agents": {
        "id": 4180,
        "name": "Sarah",
        "email": "sarah@compeny.com",
        "role": "admin"
    },
    "customer": {
        "id": 6930456,
        "name": "Mike",
        "email": "mike@example.com",
        "userId": "company_4180"
    },
    "assignee": {
        "id": 4180,
        "name": "Sarah",
        "email": "sarah@compeny.com",
        "role": "admin"
    },
    "department": {
        "id": 233048,
        "name": "Test Department"
    }
}

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

Field Type Description
id Integer Unique id of the chat provided by HelpCrunch
closedBy String "customer" or "agent". Who closed the chat
lastCustomerMessageAt Date (UNIX timestamp) Date and time of customer's last message
status String Current chat status: "new", "opened", "pending", "onhold", "no communication", "closed" or "empty"
notes String Customer notes. Available in the customer profile.
closedAt Date (UNIX timestamp) Date and time the chat was closed
rating String How customer rated the chat after its closure: "great", "average", "poor"
createdAt Date (UNIX timestamp) Date and time the chat was created
lastMessageAt Date (UNIX timestamp) Date and time of the last message in chat, from agent or customer
snoozedUntil Date (UNIX timestamp) Date and time the chat was snoozed for. To unsnooze, pass null value.
lastMessageText String Text of the last message in chat
lastMessageId Integer Unique id of the last message provided by HelpCrunch
lastCommunicatedAgentId Integer Unique id of agent who sent the last message, provided by HelpCrunch. You can fetch agents' info (id, name, email, role) with Get all team members REST API method.
agents Array of agent objects Agents that sent at least one message to chat. Each agent data consists of id, name, email and role
customer Object Basic customer info, including unique HelpCrunch id, name, email and userId (defined on your side).
assignee Object Agent the chat is currently assigned to. Consists of unique HelpCrunch id, name, email and role.
department Object Department the chat is currently assigned to. Consists of unique HelpCrunch id and name.

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

👩‍💻 Happy Coding! 👨‍💻

Did this answer your question?