Skip to content

Commit c3c5246

Browse files
authored
feat: agent-api: change field name from last_visit to visit in customer object v3.6 (#1575)
1 parent 9605d46 commit c3c5246

File tree

7 files changed

+12
-11
lines changed

7 files changed

+12
-11
lines changed

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@
6464
"type": "customer",
6565
"present": true,
6666
"created_at": "2019-11-02T19:19:50.625101Z",
67-
"last_visit": {
67+
"visit": {
6868
"started_at": "2020-05-12T11:32:03.497479Z",
6969
"ended_at": "2020-05-12T11:33:33.497000Z",
7070
"ip": "<customer_ip>",

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@
3232
"type": "customer",
3333
"present": true,
3434
"created_at": "2019-11-02T19:19:50.625101Z",
35-
"last_visit": {
35+
"visit": {
3636
"started_at": "2020-05-12T11:32:03.497479Z",
3737
"ended_at": "2020-05-12T11:33:33.497000Z",
3838
"ip": "<customer_ip>",

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
"email": "[email protected]",
66
"email_verified": false,
77
"avatar": "https://example.com/avatars/1.png",
8-
"last_visit": {
8+
"visit": {
99
"started_at": "2017-10-12T15:19:21.010200Z",
1010
"ended_at": "2017-10-12T15:21:01.000000Z",
1111
"referrer": "http://www.google.com/",

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

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,8 +40,9 @@ The developer preview version provides a preview of the upcoming changes to the
4040

4141
- The **List Customers** method was removed.
4242
- 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.
43+
- The name of the `last_visit` field was changed to `visit` in the [**Customer**](/messaging/agent-chat-api/v3.6/data-structures#customer) data structure.
4344
- The [**Customer**](/messaging/agent-chat-api/v3.6/data-structures#customer) data structure now contains information about HelpDesk tickets (when available).
44-
- There are new pushes:
45+
- There are new pushes:
4546
- [**ticket_created**](/messaging/agent-chat-api/v3.6/rtm-pushes/#ticket_created)
4647
- [**ticket_deleted**](/messaging/agent-chat-api/v3.6/rtm-pushes/#ticket_deleted)
4748

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -413,7 +413,7 @@ It is not possible to send a System event in API version 3.6.
413413
| `session_fields` | optional | An array of custom object-enclosed `key:value` pairs. Expires along with the session. |
414414
| `name` | optional | |
415415
| `events_seen_up_to` | optional | RFC 3339 datetime string |
416-
| `last_visit` | optional | |
416+
| `visit` | optional | |
417417
| `present` | optional | |
418418
| `statistics` | optional | |
419419

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1832,7 +1832,7 @@ Returns the info about the Customer with a given `id`.
18321832
| `created_at` | string | Specifies when the customer's identity was created. |
18331833
| `session_fields` | []object | An array of custom object-enclosed `key:value` pairs. Returned only if set. Available for the session duration. |
18341834
| `statistics` | object | Counters for started threads, opened pages, etc. |
1835-
| `last_visit` | object | Geolocation and opened pages from the customer's most recent online visit. Returned only if the customer logged in at least once. |
1835+
| `visit` | object | Geolocation and opened pages from the customer's most recent online visit. Returned only if the customer logged in at least once. |
18361836
| `chat_ids` | []string | IDs of a customer's chats. Returned only if the customer had at least one chat. |
18371837

18381838
</Text>
@@ -1865,7 +1865,7 @@ https://api.livechatinc.com/v3.6/agent/action/get_customer \
18651865
}, {
18661866
"another_custom_key": "another_custom_value"
18671867
}],
1868-
"last_visit": {
1868+
"visit": {
18691869
"started_at": "2017-10-12T15:19:21.010200Z",
18701870
"ended_at": "2017-10-12T15:20:22.010200Z",
18711871
"referrer": "http://www.google.com/",

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

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -85,7 +85,7 @@ The `filters`, `limit`, and `sort_order` parameters can't be provided along with
8585

8686
## Calling the API as a bot
8787

88-
Sometimes, you want to [send an event as a bot](#send-event). To do it, you need to have a token that allows you to send it. The token can be easily generated for an agent, but you cannot generate a token for a bot. The other time you want to [add a user to your chat](#add-user-to-chat), and this user happens to be a bot in the group with no access to this chat, so you cannot add it.
88+
Sometimes, you want to [send an event as a bot](#send-event). To do it, you need to have a token that allows you to send it. The token can be easily generated for an agent, but you cannot generate a token for a bot. The other time you want to [add a user to your chat](#add-user-to-chat), and this user happens to be a bot in the group with no access to this chat, so you cannot add it.
8989

9090
In both situations, the `Author-Id` header is what you need to include in your request. With it, you can authorize using the agent’s token and send the event as a bot or add a bot to a chat even if the bot belongs to the group that has no access to this chat.
9191

@@ -2018,7 +2018,7 @@ Returns the info about the Customer with a given `id`.
20182018
| `created_at` | string | Specifies when the customer's identity was created. |
20192019
| `session_fields` | []object | An array of custom object-enclosed `key:value` pairs. Returned only if set. Available for the session duration. |
20202020
| `statistics` | object | Counters for started threads, opened pages, etc. |
2021-
| `last_visit` | object | Geolocation and opened pages from the customer's most recent online visit. Returned only if the customer logged in at least once. |
2021+
| `visit` | object | Geolocation and opened pages from the customer's most recent online visit. Returned only if the customer logged in at least once. |
20222022
| `chat_ids` | []string | IDs of a customer's chats. Returned only if the customer had at least one chat. |
20232023

20242024
</Text>
@@ -2055,7 +2055,7 @@ Returns the info about the Customer with a given `id`.
20552055
}, {
20562056
"another_custom_key": "another_custom_value"
20572057
}],
2058-
"last_visit": {
2058+
"visit": {
20592059
"started_at": "2017-10-12T15:19:21.010200Z",
20602060
"ended_at": "2017-10-12T15:20:22.010200Z",
20612061
"referrer": "http://www.google.com/",
@@ -2422,7 +2422,7 @@ Removes the agent from the list of customer's followers. Calling this method on
24222422

24232423
### Subscribe Customers
24242424

2425-
Creates a subscription for tracking customers based on the group they belong to. The response will contain customers currently matching the criteria. After a successful subscription, the agent will receive pushes about tracked customers on this RTM connection.
2425+
Creates a subscription for tracking customers based on the group they belong to. The response will contain customers currently matching the criteria. After a successful subscription, the agent will receive pushes about tracked customers on this RTM connection.
24262426

24272427
If the number of tracked customers exceeds the limit, the `subscribed_customers_totals_updated` push will be periodically sent to indicate the total number of customers matching the criteria at the given moment.
24282428

0 commit comments

Comments
 (0)