Webhook
Webhook allows you to capture actions on the Huggy platform and forward event notifications directly to your system. You can be notified about:
- When chats are opened and closed;
- Contact cretion;
- Messages received from your contacts;
- Platform messages coming from agents, bots, IVR, and other system entities.
Authentication
You can use Huggy's Webhook in two ways: by default panel configuration or by using Huggy's application framework.
To use the default setting, log on to the platform and go to Settings > Webhook.
When you enter or update the URL of your system, Huggy will send a POST request in the following format:
{
"token":"380c4e7399999999999999999999d354",
"validToken":true
}
2
3
4
To successfully complete the authentication process, your system must send a new request to Huggy containing the explicit token.
Once you have done this, just choose the events that you want to be notified about.
✔️ See a practical implementation of this kind of authentication using Google Apps Script.
Huggy's application framework also allows you to forward event notifications to different systems simultaneously. To use it, you must run the API v3 authentication flow.
Log in to the platform, go to Settings > Your Apps and add an app.
Once the application is authenticated, add your system URL for Webhook events to be forwarded.
✔️ Check out a practical solution for performing the authentication process using a customized and intuitive interface.
Notifications
Listed below are the Webhook events. All of them can be selected on the Huggy platform, so choose the ones relevant to the experience you intend to create.
Event of notification | Description |
---|---|
receivedMessage | Received messages on platform the webhook will notify events of chats that are in automatic or queue |
receivedAllMessage | Get all messages received by a chat contact |
startedChat | When a chat is created by any channel |
createdChat | Deprecated |
agentEntered | When the agent joins the conversation |
closedChat | When a chat ends |
answeredChatForm | Deprecated |
createdCustomer | When a new contact is created in the Huggy panel |
startedWidgetAttendance | Started when data request is enabled in Huggy Chat. This event is started when the customer inform the data and initialize the attendance |
startedAutomationFlow | When a chat is initialized in a channel that are using a flow |
finishedAutomationFlow | When a flow that was executing in a chat are finalized |
sentAllMessage | All messages sent by an agent |
updatedWorkflowStep | When there is a change in the workflow step of the chat |
leftQueue | When a chat leaves the queue |
agentChangedStatus | When an agent updates the status |
updatedCustomer | When a contact is updated |
newInternalMessage | When an internal message is sent |
asyncExportData | When data is exported |
updatedChatDepartment | When the chat department is updated |
Received messages on platform the webhook will notify events of chats that are in automatic or queue
Deprecated
Deprecated
Started when data request is enabled in Huggy Chat. This event is started when the customer inform the data and initialize the attendance
Note: An event is returned like a Message List. When a specific event is sent to your system, it can brings other events belonging to the chain events in addition to the event data. This indicates that between an action and its completion, other events can be or not be triggered.
Context variable processing
Huggy uses a collection of predefined context variables that can be used directly in Flow actions, such as Send Message
, Conditional
, Question
actions, among others.
These variables are created during Flow execution, and this behavior directly impacts the data that will be displayed in the payload of events that your organization is tracking. It is important to understand how context variables are created so that there are no doubts about their functioning. Whenever a Flow is executed, the variables are recreated and to better illustrate this operation, let's take the following example:
We assume that your organization is tracking the startedAutomationFlowEvent
and finishedAutomationFlowEvent
events. It's easy to understand that when the service is created, the chat context will have no agent information until an agent catches the service. Therefore, the startedAutomationFlowEvent
event will not have Agent information, even though the predefined variables linked to agent information are present in Flow actions. Still using the same example, when a chat is finished, you may notice that your organization will receive notifications for both events, however, this time, the chat context already has the information and variables when recreated for the finishedAutomationFlowEvent
event, will receive the corresponding values.
Creation of context variables at the beginning of the service
{
"time": 1709256108,
"messages": {
"startedAutomationFlow": [
{
"chatID": 214570,
"companyID": "1",
"flowID": 70582,
"flowToken": "eb72feea-f7d1-3096-b53f-0t276bd58f03",
"context": {
"SYSTEM.TIME_HELLO": "Welcome",
"SYSTEM.CHAT_ID": 214570,
"SYSTEM.CHAT_CREATED_DATE": "2024-02-29 22:21:47",
"SYSTEM.DEPARTMENT_NAME": "Without department",
"SYSTEM.DEPARTMENT_ORDER": null,
"SYSTEM.CLIENT_NAME": "Charles",
"SYSTEM.CLIENT_FIRST_NAME": "Charles",
"SYSTEM.CLIENT_SECOND_NAME": "",
"SYSTEM.CLIENT_NUMBER": "+551199999999",
"SYSTEM.CLIENT_EMAIL": "charles@webster.com",
"SYSTEM.CLIENT_ORGANIZATION_ID": null,
"SYSTEM.CLIENT_ORGANIZATION_NAME": null,
"SYSTEM.COMPANY_NAME": "Huggy Testing",
"SYSTEM.COMPANY_NUMBER": "5511999995555",
"SYSTEM.AGENT_NAME": null,
"SYSTEM.AGENT_MAIL": null,
"SYSTEM.AGENT_PHONE": null,
"SYSTEM.QUEUE_POSITION": "",
"SYSTEM.WORKFLOW_ID": null,
"SYSTEM.WORKFLOW_STEP_ID": null,
"SYSTEM.CURRENT_MESSAGE": "Hello John"
},
"company": {
"id": 1
}
}
],
"finishedAutomationFlow": [
{
"chatID": 214570,
"companyID": "1",
"flowID": 70582,
"flowToken": "eb72feea-f7d1-3096-b53f-0t276bd58f03",
"context": {
"SYSTEM.TIME_HELLO": "Welcome",
"SYSTEM.CHAT_ID": 214570,
"SYSTEM.CHAT_CREATED_DATE": "2024-02-29 22:21:47",
"SYSTEM.DEPARTMENT_NAME": "Without department",
"SYSTEM.DEPARTMENT_ORDER": null,
"SYSTEM.CLIENT_NAME": "Charles",
"SYSTEM.CLIENT_FIRST_NAME": "Charles",
"SYSTEM.CLIENT_SECOND_NAME": "",
"SYSTEM.CLIENT_NUMBER": "+551199999999",
"SYSTEM.CLIENT_EMAIL": "charles@webster.com",
"SYSTEM.CLIENT_ORGANIZATION_ID": null,
"SYSTEM.CLIENT_ORGANIZATION_NAME": null,
"SYSTEM.COMPANY_NUMBER": "5511999995555",
"SYSTEM.AGENT_PHONE": null,
"SYSTEM.QUEUE_POSITION": "",
"SYSTEM.WORKFLOW_ID": null,
"SYSTEM.WORKFLOW_STEP_ID": null,
"SYSTEM.CURRENT_MESSAGE": "Oganization Id: 1\nOrganization name: Huggy Testing\n",
"huggy.chat.agent.id": null,
"huggy.chat.agent.name": null,
"huggy.chat.agent.email": null,
"huggy.chat.company.id": 1,
"huggy.chat.company.name": "Huggy Testing"
},
"company": {
"id": 1
}
}
]
},
"token": "5e8b9943da099dbd05c53c48662c21ab"
}
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
Note: The service is created, both events are triggered, but the service context does not yet have an agent.
Recreation of context variables at the end of the service
{
"time": 1709256136,
"messages": {
"startedAutomationFlow": [
{
"chatID": 214570,
"companyID": "1",
"flowID": 70582,
"flowToken": "eb72feea-f7d1-3096-b53f-0t276bd58f03",
"context": {
"SYSTEM.TIME_HELLO": "Welcome",
"SYSTEM.CHAT_ID": 214570,
"SYSTEM.CHAT_CREATED_DATE": "2024-02-29 22:21:47",
"SYSTEM.DEPARTMENT_NAME": "Without department",
"SYSTEM.DEPARTMENT_ORDER": null,
"SYSTEM.CLIENT_NAME": "Charles",
"SYSTEM.CLIENT_FIRST_NAME": "Charles",
"SYSTEM.CLIENT_SECOND_NAME": "",
"SYSTEM.CLIENT_NUMBER": "+5511999999999",
"SYSTEM.CLIENT_EMAIL": "charles@webster.com",
"SYSTEM.CLIENT_ORGANIZATION_ID": null,
"SYSTEM.CLIENT_ORGANIZATION_NAME": null,
"SYSTEM.COMPANY_NUMBER": "5511999995555",
"SYSTEM.AGENT_PHONE": null,
"SYSTEM.QUEUE_POSITION": "",
"SYSTEM.WORKFLOW_ID": null,
"SYSTEM.WORKFLOW_STEP_ID": null,
"SYSTEM.CURRENT_MESSAGE": "Organization Id: 1\nOrganization name: Huggy Testing\n",
"huggy.chat.agent.id": null,
"huggy.chat.agent.name": null,
"huggy.chat.company.id": 1,
"huggy.chat.agent.email": null,
"huggy.chat.company.name": "Huggy Testing"
},
"company": {
"id": 1
}
}
],
"finishedAutomationFlow": [
{
"chatID": 214570,
"companyID": "1",
"flowID": 70582,
"flowToken": "eb72feea-f7d1-3096-b53f-0t276bd58f03",
"context": {
"SYSTEM.TIME_HELLO": "Welcome",
"SYSTEM.CHAT_ID": 214570,
"SYSTEM.CHAT_CREATED_DATE": "2024-02-29 22:21:47",
"SYSTEM.DEPARTMENT_NAME": "Without department",
"SYSTEM.DEPARTMENT_ORDER": null,
"SYSTEM.CLIENT_NAME": "Charles",
"SYSTEM.CLIENT_FIRST_NAME": "Charles",
"SYSTEM.CLIENT_SECOND_NAME": "",
"SYSTEM.CLIENT_NUMBER": "+551199999999",
"SYSTEM.CLIENT_EMAIL": "charles@webster.com",
"SYSTEM.CLIENT_ORGANIZATION_ID": null,
"SYSTEM.CLIENT_ORGANIZATION_NAME": null,
"SYSTEM.COMPANY_NUMBER": "551199995555",
"SYSTEM.AGENT_PHONE": null,
"SYSTEM.QUEUE_POSITION": "",
"SYSTEM.WORKFLOW_ID": null,
"SYSTEM.WORKFLOW_STEP_ID": null,
"SYSTEM.CURRENT_MESSAGE": "Organization Id: 1\nOrganization name: Huggy Testing\n",
"huggy.chat.agent.id": 40419,
"huggy.chat.agent.name": "John Doe",
"huggy.chat.company.id": 1,
"huggy.chat.agent.email": "john@doe.com",
"huggy.chat.company.name": "Huggy Testing"
},
"company": {
"id": 1
}
}
]
},
"token": "5e8b9943da099dbd05c53c48662c21ab"
}
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
Note: The service is finished, both events are triggered and the service context has agent information that will be linked to the event corresponding to the end of the chat.
Practical examples
Variations on events
- If exists an input and/or output flow
- Type received messages
Intelligent layer:
receivedMessage (when a chat its in automatic or in queue).Human layer:
receivedMessage; receivedALLMessage.
- If some flow interaction exists to close a chat.
Some notification examples
Action | Notification | Note |
---|---|---|
Chat creation | startedChat | 1. Created by an agent. It doesn’t have interaction with a Flow. |
Chat creation | startedChat, receivedAllMessage | 1. The customer creates a new attendance and sent a message to the chat. 2. After creation there is Flow interaction. |
Chat creation | startedChat, receivedAllMessage, startedAutomationFlow | 1. The customer creates a new chat. 2. The customer sends a message. 3. A Flow was initialized in the chat. |
Chat finished | startedAutomationFlow, receivedAllMessage, finishedAutomationFlow, closedChat | 1. An output Flow with a feedback action is executed. 2. The customer answers the feedback. 3. The chat is closed. |
Chat finished | sentAllMessage, closedChat | 1. An agent informs to a client that the chat will be closed. 2. A tabulation is set when this chat is closed. 3. The chat is closed. |
Chat finished | agentEntered, closedChat | 1. An agent enters in a chat (taking it from the queue, for example). 2. The chat is closed. |
startedChat
Exemplo: 1. Created by an agent. It doesn’t have interaction with a Flow.
startedChat, receivedAllMessage
Exemplo: 1. The customer creates a new attendance and sent a message to the chat. 2. After creation there is Flow interaction.
startedChat, receivedAllMessage, startedAutomationFlow
Exemplo: 1. The customer creates a new chat. 2. The customer sends a message. 3. A Flow was initialized in the chat.
startedAutomationFlow, receivedAllMessage, finishedAutomationFlow, closedChat
Exemplo: 1. An output Flow with a feedback action is executed. 2. The customer answers the feedback. 3. The chat is closed.
sentAllMessage, closedChat
Exemplo: 1. An agent informs to a client that the chat will be closed. 2. A tabulation is set when this chat is closed. 3. The chat is closed.
agentEntered, closedChat
Exemplo: 1. An agent enters in a chat (taking it from the queue, for example). 2. The chat is closed.
Note: Consider that the events only will be notified if they were marked in the webhook settings of Huggy platform.
Understanding the Event Format
Notice that messages
is an array and can contain various objects.
{
"time": 1631130946,
"messages": {
"startedChat": [
{
"id": 171789,
"situation": "auto",
"channel": {
"id": 19507,
"uuid": "7b1413d6-2e67-43f8-a015-0542c62f7854",
"name": "Huggy Chat"
},
"department": null,
"contact": {
"id": 169163,
"name": "John Doe",
"mobile": null,
"phone": null,
"email": null,
"photo": "https://c.pzw.io/img/avatar-user-boy.jpg"
},
"pipe": null,
"company": {
"id": 3526
}
}
],
"receivedMessage": [
{
"id": 931354,
"body": "Olá",
"is_internal": false,
"is_email": false,
"sender": {
"id": 633,
"name": "John Doe",
"mobile": null,
"phone": null,
"email": null,
"photo": "https://c.pzw.io/img/avatar-user-boy.jpg"
},
"senderType": "widget",
"receiver": false,
"receiverType": "agent",
"file": null,
"channel": "widget",
"customer": {
"id": 633,
"name": "John Doe",
"mobile": null,
"phone": null,
"email": null,
"photo": "https://c.pzw.io/img/avatar-user-boy.jpg"
},
"chat": {
"id": 171789,
"channel": "widget",
"situation": "wait_for_chat",
"department": false,
"customer": {
"id": 633,
"name": "John Doe",
"mobile": null,
"phone": null,
"email": null,
"photo": "https://c.pzw.io/img/avatar-user-boy.jpg"
},
"workflowID": null,
"workflowStepID": null
},
"send_at": "2021-09-08 16:55:44",
"read_at": null,
"company": {
"id": 3526
}
}
]
},
"token": "3024b31r97d4b1b19c5fe513d85d7bb3"
}
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
Note: This action was executed with the
receivedAllMessages
event disabled in Huggy platform. If this event was selected, you would receive the notifications ofstartedChat
,receivedAllMessage
,receivedMessage
. The chat is only created when the customer sends the first message or when an agent opens a chat with a customer, but in this case only thestartedChat
and thereceivedMessage
events are triggered. ThereceivedAllMessage
is started regardless of being automatic messages.
Event Properties
Properties | Type | Description |
---|---|---|
time | integer | coming soon |
messages | array[Message] | An array that return webhook events. |
startedChat | StartedChat | Contains data of creating chat |
receivedMessage | ReceivedMessage | Contains data of received message |
token | string | coming soon |
Exemplo: coming soon
Exemplo: coming soon
startedChat
Properties | Type | Description |
---|---|---|
id | integer | Chat itendifier number |
situation | string | In attendance, in queue, finalized etc |
channel | string | Channel that the customer has contacted |
department | string | Chat department |
contact | Customer | Data customer |
company | Company | Data company |
Customer
Properties | Type | Description |
---|---|---|
id | integer | Chat itendifier number |
name | string | Contact name |
mobile | string | Contact mobile |
phone | string | Contact phone |
string | Contact email | |
photo | string | Contact photo |
Exemplo: Chat itendifier number
Exemplo: Contact name
Exemplo: Contact mobile
Exemplo: Contact phone
Exemplo: Contact email
Exemplo: Contact photo
Company
Properties | Type | Description |
---|---|---|
id | integer | Company ID that the chat was create |
Company ID that the chat was create
receivedMessage
Properties | Type | Description |
---|---|---|
id | integer | Contact ID |
body | string | Message sent by customer |
is_internal | string | If the message was sent to an internal chat |
is_email | string | If the message was received by email |
sender | Sender | message sender data |
senderType | string | Channel that the customer has contacted |
receiver | string | Contact name |
receiverType | string | Type of person that receiving the message. For example: Agent, Contact. |
file | string | If was sent some file. |
channel | string | Used channel. |
customer | Customer | Customer data. |
chat | Chat | Data chat information. |
send_at | string | Received message date. |
read_at | string | Last reading date. |
Exemplo: Contact ID
Exemplo: Message sent by customer
Exemplo: If the message was sent to an internal chat
Exemplo: If the message was received by email
Exemplo: Channel that the customer has contacted
Exemplo: Contact name
Exemplo: Type of person that receiving the message. For example: Agent, Contact.
Exemplo: If was sent some file.
Exemplo: Used channel.
Exemplo: Received message date.
Exemplo: Last reading date.
Sender
Properties | Type | Description |
---|---|---|
id | integer | Contact ID |
name | string | Contact name |
mobile | string | Contact mobile |
phone | string | Contact phone |
string | Contact email | |
photo | string | Contact profile photo URL address |
Exemplo: Contact ID
Exemplo: Contact name
Exemplo: Contact mobile
Exemplo: Contact phone
Exemplo: Contact email
Exemplo: Contact profile photo URL address
Chat
Properties | Type | Description |
---|---|---|
id | integer | Contact ID |
channel | string | Channel name |
situation | string | If the chat is in attendance, in queue, finalized, etc. |
department | string | Channel department number. |
customer | Customer | Customer data. |
Exemplo: Contact ID
Exemplo: Channel name
Exemplo: If the chat is in attendance, in queue, finalized, etc.
Exemplo: Channel department number.
Message format
The receivedAllMessage
event, in this example, is an event notified by the action of sending a message. The customer contacted the Kivya agent by Huggy Chat. There’s no automated events that happen after the customer contacts.
{
"time": 1562879079,
"messages": {
"receivedAllMessage": [{
"id": "423747203",
"body": "Hello Kivya, how are you?",
"is_internal": false,
"is_email": false,
"sender": {
"id": 2574725,
"name": "L8883851555530376861",
"mobile": null,
"phone": null,
"email": null,
"photo": "https://c.pzw.io/img/avatar-user-boy.jpg"
},
"senderType": "widget",
"receiver": {
"id": 39708,
"name": "Kivya",
"mobile": "5575999999999",
"phone": "5575999999999",
"email": "kivya@test.com",
"photo": "https://c.pzw.io/img/avatar-user-boy.jpg"
},
"receiverType": "agent",
"file": null,
"channel": "widget",
"customer": {
"id": 2574725,
"name": "L8883851555530376861",
"mobile": null,
"phone": null,
"email": null,
"photo": "https://c.pzw.io/img/avatar-user-boy.jpg"
},
"chat": {
"id": 19585255,
"channel": "widget",
"situation": "in_chat",
"department": false,
"customer": {
"id": 2574725,
"name": "L8883851555530376861",
"mobile": null,
"phone": null,
"email": null,
"photo": "https://c.pzw.io/img/avatar-user-boy.jpg"
}
},
"send_at": "2019-07-11 18:04:39",
"read_at": null,
"company": {
"id": "15691"
}
}]
},
"token": "8817ce0c2e5d0aefd626fa4989f63974"
}
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
To improve your event browsing experience, you can click in any event above, or click on title of any event for back to the event lists.
receivedMessage
Received message notification
Huggy sends a notification to your system whenever a message is received.
{
"time": 1524155854,
"messages": {
"receivedMessage": [
{
"id": "51917884",
"body": "teste",
"is_internal": false,
"is_email": false,
"sender": {
"id": 419689,
"name": "Charles",
"mobile": "557599999999",
"phone": "557599999999",
"email": "charles@teste.com",
"photo": "https://c.pzw.io/img/avatar-user-boy.jpg"
},
"senderType": "widget",
"receiver": false,
"receiverType": "agent",
"file": null,
"channel": "widget",
"customer": {
"id": 419689,
"name": "Charles",
"mobile": "557599999999",
"phone": "557533333333",
"email": "charles@teste.com",
"photo": "https://c.pzw.io/img/avatar-user-boy.jpg"
},
"chat": {
"id": 2932424,
"channel": "widget",
"situation": "wait_for_chat",
"department": 11445
},
"send_at": "2018-04-19 13:37:34",
"read_at": null,
"company": {
"id": "6618"
}
}
]
},
"token": "132ce76c7abb1154f01ebc0d508162e4"
}
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
Note: You will by communicated with a receivedMessage event when a chat is in queue or in automatic. If an agent queues a chat and you are notified with a event agentEntered, the option of automatic distribution will be enabled in panel. For clearer experience with webhook, make sure of this.
receivedAllMessage
Notification of all messages received and/or sent
Huggy sends a notification to your system whenever a message is received. Unlike the receivedMessage
event, this event will be started regardless if the message is automatic (Bot, URA…) or no (from customer/agents).
{
"time": 1524146026,
"messages": {
"receivedAllMessage": [
{
"id": "51917874",
"body": "I!",
"is_internal": false,
"is_email": false,
"sender": {
"id": 419688,
"name": "Johann",
"mobile": "557599999999",
"phone": "557533333333",
"email": "johann@test.com",
"photo": "https://c.pzw.io/img/avatar-user-boy.jpg"
},
"senderType": "widget",
"receiver": {
"id": 8792,
"name": "Kivya Aguiar",
"mobile": "557533333333",
"phone": "557599999999",
"email": "kivya@teste.com",
"photo": "https://cdn.pzw.io/03a3e95e84ccd5f19140ce6db54f71f1.jpg"
},
"receiverType": "agent",
"file": null,
"channel": "widget",
"customer": {
"id": 419688,
"name": "Johann",
"mobile": "557599999999",
"phone": "557533333333",
"email": "johann@test.com",
"photo": "https://c.pzw.io/img/avatar-user-boy.jpg"
},
"chat": {
"id": 2932423,
"channel": "widget",
"situation": "in_chat",
"department": 11445
},
"send_at": "2018-04-19 10:53:45",
"read_at": null,
"company": {
"id": "9999"
}
}
]
},
"token": "132ce76c7abb1154f01ebc0d508162e4"
}
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
startedChat
Attendance opening notification
Huggy sends a notification to your system whenever a chat is created.
{
"time": 1631107925,
"messages": {
"startedChat": [
{
"id": 171780,
"situation": "auto",
"channel": {
"id": 101,
"uuid": "298745b9-6af7-4e8b-a2t6-719b6b9b9ddd",
"name": "Huggy Agent",
"type": "Email"
},
"department": null,
"contact": {
"id": 566,
"name": "John Doe",
"mobile": "5511999999999",
"phone": "5511999999999",
"email": "john@doe.com",
"photo": "https://c.pzw.io/img/avatar-user-boy.jpg",
"custom_fields": {
"profession": null
}
},
"pipe": null,
"company": {
"id": 3526
}
}
]
},
"token": "3124b32e97d3b1b09c5fe513d95d6bb1"
}
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
⚠️ This event replaces the old createdChat.
agentEntered
Agent entry notification to chat
Huggy sends a notification to your system whenever an agent is added to a conversation.
{
"time": 1583439114,
"messages": {
"agentEntered": [
{
"id": 30608118,
"channel": "email",
"situation": "in_chat",
"department": false,
"customer": {
"id": 8341726,
"name": "Charles Edward",
"mobile": "75999999999",
"phone": "7533333333",
"email": "edward@teste.com",
"photo": "https://c.pzw.io/img/avatar-user-boy.jpg"
},
"agent": {
"id": 40419,
"name": "John Doe",
"mobile": "5575999999999",
"phone": "5575999999999",
"email": "john@doe.com",
"photo": "https://c.pzw.io/img/avatar-user-boy.jpg"
},
"company": {
"id": "15691"
}
}
]
},
"token": "8817ce0c2e5d0aefd626fa4999f62974"
}
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
closedChat
Chat notification ended
Huggy sends a notification to your system whenever a chat ends.
{
"time": 1583439671,
"messages": {
"closedChat": [
{
"id": 30608118,
"channel": "email",
"closed_at": "2020-03-05 17:21:10",
"tabulation": false,
"situation": "finishing",
"closed": 1,
"company": {
"id": "15691"
}
}
]
},
"token": "8817ce0c2e5d0aefd626fa4999f62974"
}
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
createdCustomer
Contact creation notification
Huggy sends a notification to your system whenever a new contact (Customer) is created.
{
"time": 1722277423,
"messages": {
"createdCustomer": [
{
"id": 217806,
"name": "John Doe",
"mobile": null,
"phone": null,
"email": null,
"photo": "https://c.pzw.io/img/avatar-user-boy.jpg",
"custom_fields": {},
"organizations": [
{
"id": 16146,
"name": "DCS - Brasil"
}
],
"groups": [
{
"id": 12,
"name": "DCS"
}
],
"company": {
"id": 1
}
}
]
},
"token": "e45c51f6c888f21c9d3fa645dd3e8233"
}
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
startedWidgetAttendance
Notification of new event by Huggy Chat
Huggy sends a notification to your system whenever an attendance is created by Huggy Chat.
{
"time": 1524151902,
"messages": {
"startedWidgetAttendance": [
{
"id": 18516008,
"name": "Charles",
"mobile": "557599999999",
"phone": "557533333333",
"email": "charles@teste.com",
"widget": "2008",
"company": {
"id": "9999"
}
}
]
},
"token": "132ce76c7abb1154f01ebc0d508162e4"
}
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
startedAutomationFlow
Notification that flow has started
Huggy sends a notification to your system whenever a flow is initialized.
{
"time": 1530109996,
"messages": {
"startedAutomationFlow": [
{
"chatID": 99999,
"lastActionID": 99999,
"companyID": "99999",
"flowID": 99999,
"context": {
"SYSTEM.TIME_HELLO": "Good Morning",
"SYSTEM.CHAT_ID": "99999",
"SYSTEM.DEPARTMENT_NAME": "",
"SYSTEM.DEPARTMENT_ORDER": "",
"SYSTEM.CLIENT_NAME": "",
"SYSTEM.CLIENT_FIRST_NAME": "",
"SYSTEM.CLIENT_SECOND_NAME": "",
"SYSTEM.CLIENT_NUMBER": "",
"SYSTEM.COMPANY_NAME": "Test",
"SYSTEM.COMPANY_NUMBER": "9999999999",
"SYSTEM.AGENT_NAME": "",
"SYSTEM.AGENT_MAIL": "",
"SYSTEM.AGENT_PHONE": ""
},
"company": {
"id": "99999"
}
}
]
},
"token": "871457dcsvffe7d7d4177e47fr4d4sd74"
}
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
finishedAutomationFlow
Flow notification finalized
Huggy sends a notification to your system whenever a flow is finalized.
{
"time": 1530110012,
"messages": {
"finishedAutomationFlow": [
{
"chatID": 99999,
"lastActionID": 99999,
"companyID": "99999",
"flowID": 99999,
"context": {
"SYSTEM.TIME_HELLO": "bom dia",
"SYSTEM.CHAT_ID": "99999",
"SYSTEM.DEPARTMENT_NAME": "",
"SYSTEM.DEPARTMENT_ORDER": "",
"SYSTEM.CLIENT_NAME": "",
"SYSTEM.CLIENT_FIRST_NAME": "",
"SYSTEM.CLIENT_SECOND_NAME": "",
"SYSTEM.CLIENT_NUMBER": "",
"SYSTEM.COMPANY_NAME": "Teste",
"SYSTEM.COMPANY_NUMBER": "9999999999",
"SYSTEM.AGENT_NAME": "",
"SYSTEM.AGENT_MAIL": "",
"SYSTEM.AGENT_PHONE": "",
"hash_fluxo.pergunta": "Response"
},
"company": {
"id": "99999"
}
}
]
},
"token": "871458dcsvffe7d7d4177e47fr4d4sd74"
}
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
sentAllMessage
Notification of message send by Huggy platform
Huggy sends a notification to your system whenever a message is sent by an agent of your company.
{
"time": 1563279612,
"messages": {
"sentAllMessage": [
{
"id": "270925787",
"body": "Yes, let's go!",
"is_internal": false,
"is_email": false,
"sender": {
"id": 33980,
"name": "Amanda Muniz",
"mobile": "557599999999",
"phone": "557533333333",
"email": "Amanda@test.com",
"photo": "https://c.pzw.io/img/avatar-user-boy.jpg"
},
"senderType": "agent",
"receiver": {
"id": 1841823,
"name": "John",
"mobile": "557599999999",
"phone": "557533333333",
"email": "john@doe.com",
"photo": "https://c.pzw.io/img/avatar-user-boy.jpg"
},
"receiverType": "widget",
"file": null,
"channel": "agent",
"customer": {
"id": 1841823,
"name": "john",
"mobile": "557599999999",
"phone": "557533333333",
"email": "john@doe.com",
"photo": "https://c.pzw.io/img/avatar-user-boy.jpg"
},
"chat": {
"id": 13120639,
"channel": "widget",
"situation": "in_chat",
"department": false,
"customer": {
"id": 1841823,
"name": "john",
"mobile": "557599999999",
"phone": "557533333333",
"email": "john@doe.com",
"photo": "https://c.pzw.io/img/avatar-user-boy.jpg"
}
},
"send_at": "2019-07-16 09:20:11",
"read_at": null,
"company": {
"id": "11721"
}
}
]
},
"token": "af0adcc862a9343c1d44e24cbdc0194c"
}
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
updatedWorkflowStep
Notification of changes in the workflow step
Huggy sends a notification to your system whenever there are changes in the workflow step of the chat.
{
"time": 1612806064,
"messages": {
"updatedWorkflowStep": [
{
"agent": {
"id": 40419,
"name": "John Doe",
"photo": "https://c.pzw.io/img/avatar-user-boy.jpg"
},
"chat": {
"id": 31155221,
"channel": "widget",
"situation": "in_chat",
"department": false,
"customer": {
"id": 4362755,
"name": "L4732015503367501516",
"mobile": null,
"phone": null,
"email": null,
"photo": "https://c.pzw.io/img/avatar-user-boy.jpg"
},
"workflowID": 6074,
"workflowStepID": 7611
},
"step": {
"id": 7611,
"name": "etapa 2",
"workflow": {
"id": 6074,
"name": "Workflow of test"
}
},
"previousStep": {
"id": 7610,
"name": "etapa 1",
"workflow": {
"id": 6074,
"name": "Workflow of test"
}
},
"company": {
"id": 11721
}
}
]
},
"token": "9aee897289bd0576d6e49adf97dad96c"
}
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
leftQueue
Notification of chats leaving the queue
Huggy sends a notification to your system whenever a chat leaves the queue.
{
"time": 1642602560,
"messages": {
"leftQueue": [
{
"id": 92340841,
"situation": "in_chat",
"agent": {
"id": 40419
},
"channel": {
"id": 50,
"uuid": "dfab45f1-a203-3ffe-ie44-2fafa6c88476",
"name": "John Doe"
},
"department": null,
"contact": {
"id": 37427857,
"name": "Customer",
"mobile": null,
"phone": null,
"email": null,
"photo": "https://c.pzw.io/img/avatar-user-boy.jpg",
"custom_fields": {
"teste_customer": null,
"ultimo_endereco_customer": null
}
},
"pipe": null,
"company": {
"id": 15693
}
}
]
},
"token": "afb63a5e1abreece89f1c80acb1686ac"
}
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
agentChangedStatus
Notification of agent status update
Huggy sends a notification to your system whenever an agent updates the status.
{
"time": 1644341895,
"messages": {
"agentChangedStatus": [
{
"id": 40419,
"name": "John Doe",
"mobile": "75999999999",
"phone": "7533333333",
"email": "john@doe.com",
"photo": "https://c.pzw.io/img/avatar-user-boy.jpg",
"isActive": true,
"isOnline": true,
"isAvailable": true,
"statusID": null,
"origin": "manually",
"company": {
"id": 15693
}
}
]
},
"token": "afb53a5e1abeeece89f1c80arb1686ab"
}
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
updatedCustomer
Notification of updated contact
Huggy sends a notification to your system whenever a contact is updated.
{
"time": 1722277720,
"messages": {
"updatedCustomer": [
{
"id": 217806,
"name": "John Doe",
"mobile": null,
"phone": null,
"email": null,
"photo": "https://c.pzw.io/img/avatar-user-boy.jpg",
"custom_fields": {},
"organizations": [
{
"id": 16146,
"name": "DCS - Brasil"
}
],
"groups": [
{
"id": 12,
"name": "Grupo PHP 8"
}
],
"company": {
"id": 1
}
}
]
},
"token": "e45c51f6c888f21c9d2fa645dd3e8233"
}
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
newInternalMessage
Internal message notification
Huggy sends a notification to your system whenever an internal message is sent in the chat.
{
"time": 1708370297,
"messages": {
"newInternalMessage": [
{
"id": 1288613,
"body": "Testing internal message",
"is_internal": true,
"is_email": false,
"sender": {
"id": 49851,
"name": "John Doe",
"mobile": "5511999999999",
"phone": "551133333333",
"email": "john@doe.com",
"photo": "https://panel-testing-panelback-php8-cdn-origin.s3.amazonaws.com/9d2149754d95b7c9db8e7b8cffa147a1.png",
"isActive": true,
"isOnline": true,
"isAvailable": true,
"statusID": null,
"statusType": 1
},
"senderType": "agent",
"receiver": {
"id": 213955,
"name": "Igor",
"mobile": null,
"phone": null,
"email": null,
"photo": "https://c.pzw.io/img/avatar-user-boy.jpg",
"custom_fields": []
},
"receiverType": "telegram_bot",
"file": null,
"chat": {
"id": 214420,
"channel": "telegram_bot",
"situation": "in_chat",
"department": false,
"customer": {
"id": 213955,
"name": "Igor",
"mobile": null,
"phone": null,
"email": null,
"photo": "https://c.pzw.io/img/avatar-user-boy.jpg",
"custom_fields": []
},
"workflowID": null,
"workflowStepID": null
},
"send_at": "2024-02-19 16:18:17",
"read_at": null,
"company": {
"id": 1
}
}
]
},
"token": "5e8b9943da099dbd05c53c47662c31ab"
}
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
asyncExportData
Data export notification
Huggy sends a notification to your system whenever data has been exported and the file is ready for download.
{
"time": 1712088961,
"messages": {
"asyncExportData": [
{
"fileUrl": "https://huggy-svc-async-report-export-origin.s3.us-east-1.amazonaws.com/f0d26a4643322175e5c790adb0338080/1712088961066.csv?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Content-Sha256=UNSIGNED-PAYLOAD&X-Amz-Credential=ASIATZF2FY5UGDNIS6EW%2F20240402%2Fus-east-1%2Fs3%2Faws4_request&X-Amz-Date=20240402T201601Z&X-Amz-Expires=3600&X-Amz-Security-Token=IQoJb3JpZ2luX2VjED0aCXVzLWVhc3QtMSJHMEUCIDpWn5ZGpY97PP0yKwr2cKuU2cXoeNeaOLXeEXDlwkDWAiEA3i64g0LJgQo2IRQ75sc4o08s%2BFVDpU%2B5qnSyaNtJW40qrwMIZRADGgwyNjAyMzU5NzA0MDgiDAOuoJw4W71ERKlkDiqMA43o1%2F2u%2BWpvWW%2FE4bteL2hPhikZ6gLnJIFO583bTJp4IXG9sIqSRTa8fdcnloqtxs%2FS3k3QTt4SKpj2I3hoV9jJN2IFPYRQq5IokxZEv3wb7v%2BbsT8LQ2R7C5kWRQRhoomCXZidpwb9IpqShHtFbdp2V4vtb6KXY6Orhi%2FsFpmdWRb7WexKqm6vK9ixUAmQqsU8Bw0Zvvc6yHc%2Bofk%2FiFqPylpzNPF2udV0ugInut8Xr7MXd1i2C%2Fg7MzLzMeVsDNGQdh4Krz6Qqiqm61jGuO5ZwkCVOR62YlMJe3uCA%2FD1ES58gKkELlMqfhagALdmtb9rzYqBovKvVZbY3ctQdXeuVVjfFubO6b3EGkX1pkvxbnN86v2QkVcPqG76QCaEnCBUcq2S3No%2F8wB2aNiMQv%2BxI1j%2BE7Jr7FKuGNY7p9n6gBj07I0lxT2tq6iNS8LmXxAKh46HGTsxXaRCT8qKpj8sBGrfIP61YYy33wLfwfUy%2BJygqb13ZV1Sz4KkAGZKG2gl4kRTGUZrsmidiDC6y7GwBjqdAU3xM7ZJTC3SK3CDWLk%2BCRE73ReHOW6y6bf2XkzYHeymkHbzlaJoNv4Ov74jbr%2BtTYucpiH2w8ngP2%2BDvoffF%2FQnkObGAb86goh%2F%2FkCwJ0VO8ajyOj5DLLG%2B5TpKh8NlQztVmkfXKUKhQE%2BcD6YesnapQsqYuQ7F6xwDJQC3wMZUeFEF9bR%2BtIDiFbGWes%2B4Ie%2BxMrTUWchfXb0bXVE%3D&X-Amz-Signature=d373a09c505d3bff4f09cc3779ad00fb6498662dc6a928816779fa9c76a0357b&X-Amz-SignedHeaders=host&x-id=GetObject",
"company": {
"id": 1
}
}
]
},
"token": "64735a5ae8fa14344c8acfd220ff25bf"
}
2
3
4
5
6
7
8
9
10
11
12
13
14
updatedChatDepartment
Notification of chat department update
Huggy sends a notification to your system whenever the chat department is updated.
{
"time": 1727185640,
"messages": {
"updatedChatDepartment": [
{
"chat": {
"id": 217618,
"channel": "widget",
"situation": "in_chat",
"department": 30643,
"customer": {
"id": 2184,
"name": "John Doe",
"mobile": "+551199999999",
"phone": "+551133333333",
"email": "john@doe.com",
"photo": "https://c.pzw.io/img/avatar-user-boy.jpg"
},
"workflowID": null,
"workflowStepID": null
},
"previousDepartment": {
"id": 30642,
"name": "department name"
},
"company": {
"id": 1
}
}
]
},
"token": "420786094f46358650"
}
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
← API v3 Webhook SMS →