Skip to content

Commit 786cb2d

Browse files
authored
CDP-112: extend customer's statistics with 'tickets_count' in v3.6 (#1562)
1 parent dabef0d commit 786cb2d

File tree

7 files changed

+70
-10
lines changed

7 files changed

+70
-10
lines changed

payloads/messaging/v3.6/agent-chat-api/other-structures/chat.json

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -92,10 +92,15 @@
9292
"visits_count": 6,
9393
"page_views_count": 2,
9494
"greetings_shown_count": 2,
95-
"greetings_accepted_count": 1
95+
"greetings_accepted_count": 1,
96+
"tickets_count": 12
9697
},
9798
"agent_last_event_created_at": "2020-05-12T11:42:47.393002Z",
98-
"customer_last_event_created_at": "2020-05-12T12:31:46.463000Z"
99+
"customer_last_event_created_at": "2020-05-12T12:31:46.463000Z",
100+
"tickets": [{
101+
"ticket_id": "0c04cb99-817a-4935-9d62-137c89a74388",
102+
"created_at": "2017-10-12T15:19:21.010200Z"
103+
}]
99104
},
100105
{
101106

payloads/messaging/v3.6/agent-chat-api/other-structures/chatSummary.json

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -60,10 +60,15 @@
6060
"visits_count": 6,
6161
"page_views_count": 2,
6262
"greetings_shown_count": 2,
63-
"greetings_accepted_count": 1
63+
"greetings_accepted_count": 1,
64+
"tickets_count": 12
6465
},
6566
"agent_last_event_created_at": "2020-05-12T11:42:47.393002Z",
66-
"customer_last_event_created_at": "2020-05-12T12:31:46.463000Z"
67+
"customer_last_event_created_at": "2020-05-12T12:31:46.463000Z",
68+
"tickets": [{
69+
"ticket_id": "0c04cb99-817a-4935-9d62-137c89a74388",
70+
"created_at": "2017-10-12T15:19:21.010200Z"
71+
}]
6772
},
6873
{
6974

payloads/messaging/v3.6/agent-chat-api/users/customer.json

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,8 @@
4242
"statistics": {
4343
"chats_count": 3,
4444
"threads_count": 9,
45-
"visits_count": 5
45+
"visits_count": 5,
46+
"tickets_count": 12
4647
},
4748
"__priv_lc2_customer_id": "test_771305.dafea66e5c",
4849
"agent_last_event_created_at": "2017-10-12T15:19:21.010200Z",
@@ -55,5 +56,9 @@
5556
"group_ids": [
5657
0
5758
],
59+
"tickets": [{
60+
"ticket_id": "0c04cb99-817a-4935-9d62-137c89a74388",
61+
"created_at": "2017-10-12T15:19:21.010200Z"
62+
}],
5863
"state": "browsing"
5964
}

src/pages/messaging/agent-chat-api/changelog/index.mdx

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,10 @@ The developer preview version provides a preview of the upcoming changes to the
3939

4040
- The **List Customers** method was removed.
4141
- The **Subscribe Customers** ([RTM](/messaging/agent-chat-api/v3.6/rtm-reference/#subscribe_customers)) and **Unsubscribe Customers** ([RTM](/messaging/agent-chat-api/v3.6/rtm-reference/#unsubscribe_customers)) methods along with a [**subscribed_customers_totals_updated**](/messaging/agent-chat-api/v3.6/rtm-pushes/#subscribed_customers_totals_updated) push were added.
42+
- The [**Customer**](/messaging/agent-chat-api/v3.6/data-structures#customer) data structure now contains information about HelpDesk tickets (when available).
43+
- There are new pushes:
44+
- [**ticket_created**](/messaging/agent-chat-api/v3.6/rtm-pushes/#ticket_created)
45+
- [**ticket_deleted**](/messaging/agent-chat-api/v3.6/rtm-pushes/#ticket_deleted)
4246

4347
### Status
4448

src/pages/messaging/agent-chat-api/v3.6/index.mdx

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1894,14 +1894,19 @@ https://api.livechatinc.com/v3.6/agent/action/get_customer \
18941894
"visits_count": 5,
18951895
"page_views_count": 1337,
18961896
"greetings_shown_count": 69,
1897-
"greetings_accepted_count": 42
1897+
"greetings_accepted_count": 42,
1898+
"tickets_count": 12
18981899
},
18991900
"__priv_lc2_customer_id": "test_771305.dafea66e5c", // old customer_id
19001901
"agent_last_event_created_at": "2017-10-12T15:19:21.010200Z",
19011902
"customer_last_event_created_at": "2017-10-12T15:19:21.010200Z",
19021903
"chat_ids": [
19031904
"PWJ8Y4THAV"
1904-
]
1905+
],
1906+
"tickets": [{
1907+
"ticket_id": "0c04cb99-817a-4935-9d62-137c89a74388",
1908+
"created_at": "2017-10-12T15:19:21.010200Z"
1909+
}]
19051910
}
19061911
```
19071912

src/pages/messaging/agent-chat-api/v3.6/rtm-pushes/index.mdx

Lines changed: 32 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ Here's what you need to know about **pushes**:
3535
| **Events** | [`incoming_event`](#incoming_event) [`event_deleted`](#event_deleted) [`event_updated`](#event_updated) [`incoming_rich_message_postback`](#incoming_rich_message_postback) |
3636
| **Properties** | [`chat_properties_updated`](#chat_properties_updated) [`chat_properties_deleted`](#chat_properties_deleted) [`thread_properties_updated`](#thread_properties_updated) [`thread_properties_deleted`](#thread_properties_deleted) [`event_properties_updated`](#event_properties_updated) [`event_properties_deleted`](#event_properties_deleted) |
3737
| **Thread tags** | [`thread_tagged`](#thread_tagged) [`thread_untagged`](#thread_untagged) |
38-
| **Customers** | [`incoming_customers`](#incoming_customers) [`incoming_customer`](#incoming_customer) [`customer_updated`](#customer_updated) [`customer_page_updated`](#customer_page_updated) [`customer_banned`](#customer_banned) [`customer_transferred`](#customer_transferred) [`customer_left`](#customer_left) [`subscribed_customers_totals_updated`](#subscribed_customers_totals_updated) |
38+
| **Customers** | [`incoming_customers`](#incoming_customers) [`incoming_customer`](#incoming_customer) [`customer_updated`](#customer_updated) [`customer_page_updated`](#customer_page_updated) [`customer_banned`](#customer_banned) [`customer_transferred`](#customer_transferred) [`customer_left`](#customer_left) [`subscribed_customers_totals_updated`](#subscribed_customers_totals_updated) [`ticket_created`](#ticket_created) [`ticket_deleted`](#ticket_deleted) |
3939
| **Status** | [`routing_status_set`](#routing_status_set) [`agent_disconnected`](#agent_disconnected) |
4040
| **Configuration** | [`agent_created`](#agent_created) [`agent_approved`](#agent_approved) [`agent_updated`](#agent_updated) [`agent_suspended`](#agent_suspended) [`agent_unsuspended`](#agent_unsuspended) [`agent_deleted`](#agent_deleted) [`auto_accesses_updated`](#auto_accesses_updated) [`bot_created`](#bot_created) [`bot_updated`](#bot_updated) [`bot_deleted`](#bot_deleted) [`group_created`](#group_created) [`group_updated`](#group_updated) [`group_deleted`](#group_deleted) [`tag_created`](#tag_created) [`tag_deleted`](#tag_deleted) [`tag_updated`](#tag_updated) [`groups_status_updated`](#groups_status_updated) [`license_properties_updated`](#license_properties_updated) [`group_properties_updated`](#group_properties_updated) |
4141
| **Other** | [`events_marked_as_seen`](#events_marked_as_seen) [`incoming_sneak_peek`](#incoming_sneak_peek) [`incoming_typing_indicator`](#incoming_typing_indicator) [`incoming_multicast`](#incoming_multicast) [`chat_unfollowed`](#chat_unfollowed) [`queue_positions_updated`](#queue_positions_updated) [`customer_unfollowed`](#customer-unfollowed) |
@@ -709,6 +709,37 @@ Informs that number of customers matching subscription changed. This push is se
709709

710710
</CodeResponse>
711711

712+
### `ticket_created`
713+
714+
Informs that a ticket was created for a tracked customer.
715+
716+
<CodeResponse title={'Sample push payload'}>
717+
718+
```json
719+
{
720+
"customer_id": "b7eff798-f8df-4364-8059-649c35c9ed0c",
721+
"ticket_id": "0c04cb99-817a-4935-9d62-137c89a74388",
722+
"created_at": "2019-12-05T07:27:08.820000Z"
723+
}
724+
```
725+
726+
</CodeResponse>
727+
728+
### `ticket_deleted`
729+
730+
Informs that a ticket was deleted for a tracked customer.
731+
732+
<CodeResponse title={'Sample push payload'}>
733+
734+
```json
735+
{
736+
"customer_id": "b7eff798-f8df-4364-8059-649c35c9ed0c",
737+
"ticket_id": "0c04cb99-817a-4935-9d62-137c89a74388"
738+
}
739+
```
740+
741+
</CodeResponse>
742+
712743
## Status
713744

714745
### `routing_status_set`

src/pages/messaging/agent-chat-api/v3.6/rtm-reference/index.mdx

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2084,14 +2084,19 @@ Returns the info about the Customer with a given `id`.
20842084
"visits_count": 5,
20852085
"page_views_count": 1337,
20862086
"greetings_shown_count": 69,
2087-
"greetings_accepted_count": 42
2087+
"greetings_accepted_count": 42,
2088+
"tickets_count": 12
20882089
},
20892090
"__priv_lc2_customer_id": "test_771305.dafea66e5c", // old customer_id
20902091
"agent_last_event_created_at": "2017-10-12T15:19:21.010200Z",
20912092
"customer_last_event_created_at": "2017-10-12T15:19:21.010200Z",
20922093
"chat_ids": [
20932094
"PWJ8Y4THAV"
2094-
]
2095+
],
2096+
"tickets": [{
2097+
"ticket_id": "0c04cb99-817a-4935-9d62-137c89a74388",
2098+
"created_at": "2017-10-12T15:19:21.010200Z"
2099+
}]
20952100
}
20962101
}
20972102
```

0 commit comments

Comments
 (0)