Skip to content

Commit dd30751

Browse files
authored
Merge pull request #1599 from livechat/ME-883-add-request_thread_summary
feat(docs): add `request_thread_summary method` (ME-883 part 1/3)
2 parents 9d0b1d5 + fd25a68 commit dd30751

File tree

4 files changed

+222
-4
lines changed

4 files changed

+222
-4
lines changed

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

Lines changed: 51 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -112,7 +112,7 @@ curl -X POST \
112112
| **Thread tags** | [`tag_thread`](#tag-thread) [`untag_thread`](#untag-thread) |
113113
| **Customers** | [`get_customer`](#get-customer) [`update_customer`](#update-customer) [`ban_customer`](#ban-customer) [`follow_customer`](#follow-customer) [`unfollow_customer`](#unfollow-customer) |
114114
| **Status** | [`set_routing_status`](#set-routing-status) [`list_routing_statuses`](#list-routing-statuses) |
115-
| **Other** | [`mark_events_as_seen`](#mark-events-as-seen) [`send_thinking_indicator`](#send-thinking-indicator) [`send_typing_indicator`](#send-typing-indicator) [`multicast`](#multicast) [`list_agents_for_transfer`](#list-agents-for-transfer) |
115+
| **Other** | [`mark_events_as_seen`](#mark-events-as-seen) [`send_thinking_indicator`](#send-thinking-indicator) [`send_typing_indicator`](#send-typing-indicator) [`multicast`](#multicast) [`list_agents_for_transfer`](#list-agents-for-transfer) [`request_thread_summary`](#request-thread-summary) |
116116

117117
## Chats
118118

@@ -2589,6 +2589,56 @@ https://api.livechatinc.com/v3.6/agent/action/list_agents_for_transfer \
25892589
</Code>
25902590
</Section>
25912591

2592+
<Section>
2593+
<Text>
2594+
2595+
### Request Thread Summary
2596+
2597+
Requests an AI-generated summary of a specific thread. A thread can be summarized only once, and the summary can be requested only for inactive threads.
2598+
2599+
#### Specifics
2600+
2601+
| | |
2602+
| ---------------------- | ---------------------------------------------------------------------------------------------------------- |
2603+
| **Method URL** | `https://api.livechatinc.com/v3.6/agent/action/request_thread_summary` |
2604+
| **Required scopes** | `chats--all:rw` **\*** or `chats--access:rw` **\*\*** |
2605+
| **RTM API equivalent** | [`request_thread_summary`](/messaging/agent-chat-api/v3.6/rtm-reference/#request-thread-summary) |
2606+
| **Webhook** | [`thread_summary_set`](/management/webhooks/v3.6/#thread_summary_set) |
2607+
2608+
**\*)** `chats--all:rw` - to request a summary for a thread taking place in any group.
2609+
2610+
**\*\*)** `chats--access:rw` - to request a summary for a thread taking place in groups that the requester (related to the token) is a member of. The agent groups and the chat groups must overlap - at least one group must be in common.
2611+
2612+
#### Request
2613+
2614+
| Parameter | Required | Data type | Notes |
2615+
| ----------- | -------- | --------- | ----- |
2616+
| `chat_id` | Yes | `string` | |
2617+
| `thread_id` | Yes | `string` | |
2618+
2619+
#### Response
2620+
2621+
No response payload (`200 OK`).
2622+
2623+
</Text>
2624+
<Code>
2625+
<CodeSample path={'REQUEST'}>
2626+
2627+
```shell
2628+
curl -X POST \
2629+
https://api.livechatinc.com/v3.6/agent/action/request_thread_summary \
2630+
-H 'Authorization: Bearer <your_access_token>' \
2631+
-H 'Content-Type: application/json' \
2632+
-d '{
2633+
"chat_id": "PJ0MRSHTDG",
2634+
"thread_id": "K600PKZON8"
2635+
}'
2636+
```
2637+
2638+
</CodeSample>
2639+
</Code>
2640+
</Section>
2641+
25922642
# Webhooks
25932643

25942644
Here's what you need to know about **webhooks**:

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

Lines changed: 60 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -118,7 +118,7 @@ When connecting to the Agent Chat RTM API, clients have to send over the require
118118
| **Thread tags** | [`tag_thread`](#tag-thread) [`untag_thread`](#untag-thread) |
119119
| **Customers** | [`get_customer`](#get-customer) [`update_customer`](#update-customer) [`ban_customer`](#ban-customer) [`follow_customer`](#follow-customer) [`unfollow_customer`](#unfollow-customer) [`subscribe_customers`](#subscribe_customers) [`unsubscribe_customers`](#unsubscribe_customers) |
120120
| **Status** | [`login`](#login) [`set_routing_status`](#set-routing-status) [`set_away_status`](#set-away-status) [`logout`](#logout) [`list_routing_statuses`](#list-routing-statuses) [`update_session`](#update-session) |
121-
| **Other** | [`mark_events_as_seen`](#mark-events-as-seen) [`send_thinking_indicator`](#send-thinking-indicator) [`send_typing_indicator`](#send-typing-indicator) [`multicast`](#multicast) [`list_agents_for_transfer`](#list-agents-for-transfer) |
121+
| **Other** | [`mark_events_as_seen`](#mark-events-as-seen) [`send_thinking_indicator`](#send-thinking-indicator) [`send_typing_indicator`](#send-typing-indicator) [`multicast`](#multicast) [`list_agents_for_transfer`](#list-agents-for-transfer) [`request_thread_summary`](#request-thread-summary) |
122122

123123
</Text>
124124
<Code>
@@ -3329,6 +3329,65 @@ It returns the Agents you can transfer a chat to. Agents are sorted ascendingly
33293329
</Code>
33303330
</Section>
33313331

3332+
<Section>
3333+
<Text>
3334+
3335+
### Request Thread Summary
3336+
3337+
Requests an AI-generated summary of a specific thread. A thread can be summarized only once, and the summary can be requested only for inactive threads.
3338+
3339+
#### Specifics
3340+
3341+
| | |
3342+
| ---------------------- | ---------------------------------------------------------------------------------------------------------- |
3343+
| **Action** | `request_thread_summary` |
3344+
| **Required scopes** | `chats--all:rw` **\*** or `chats--access:rw` **\*\*** |
3345+
| **Web API equivalent** | [`request_thread_summary`](/messaging/agent-chat-api/v3.6/#request-thread-summary) |
3346+
| **Push message** | [`thread_summary_set`](/messaging/agent-chat-api/v3.6/rtm-pushes/#thread_summary_set) |
3347+
3348+
**\*)** `chats--all:rw` - to request a summary for a thread taking place in any group.
3349+
3350+
**\*\*)** `chats--access:rw` - to request a summary for a thread taking place in groups that the requester (related to the token) is a member of. The agent groups and the chat groups must overlap - at least one group must be in common.
3351+
3352+
#### Request
3353+
3354+
| Parameter | Required | Data type | Notes |
3355+
| ----------- | -------- | --------- | ----- |
3356+
| `chat_id` | Yes | `string` | |
3357+
| `thread_id` | Yes | `string` | |
3358+
3359+
</Text>
3360+
<Code>
3361+
<CodeSample path={'REQUEST'}>
3362+
3363+
```json
3364+
{
3365+
"action": "request_thread_summary",
3366+
"payload": {
3367+
"chat_id": "PJ0MRSHTDG",
3368+
"thread_id": "PJ0MRSHTFG"
3369+
}
3370+
}
3371+
```
3372+
3373+
</CodeSample>
3374+
3375+
<CodeResponse>
3376+
3377+
```json
3378+
{
3379+
"request_id": "<request_id>", // optional
3380+
"action": "request_thread_summary",
3381+
"type": "response",
3382+
"success": true,
3383+
"payload": {}
3384+
}
3385+
```
3386+
3387+
</CodeResponse>
3388+
</Code>
3389+
</Section>
3390+
33323391
<Section>
33333392

33343393
<Text>

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

Lines changed: 51 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -112,7 +112,7 @@ curl -X POST \
112112
| **Thread tags** | [`tag_thread`](#tag-thread) [`untag_thread`](#untag-thread) |
113113
| **Customers** | [`get_customer`](#get-customer) [`update_customer`](#update-customer) [`ban_customer`](#ban-customer) [`follow_customer`](#follow-customer) [`unfollow_customer`](#unfollow-customer) |
114114
| **Status** | [`set_routing_status`](#set-routing-status) [`list_routing_statuses`](#list-routing-statuses) |
115-
| **Other** | [`mark_events_as_seen`](#mark-events-as-seen) [`send_thinking_indicator`](#send-thinking-indicator) [`send_typing_indicator`](#send-typing-indicator) [`multicast`](#multicast) [`list_agents_for_transfer`](#list-agents-for-transfer) |
115+
| **Other** | [`mark_events_as_seen`](#mark-events-as-seen) [`send_thinking_indicator`](#send-thinking-indicator) [`send_typing_indicator`](#send-typing-indicator) [`multicast`](#multicast) [`list_agents_for_transfer`](#list-agents-for-transfer) [`request_thread_summary`](#request-thread-summary) |
116116

117117
## Chats
118118

@@ -2589,6 +2589,56 @@ https://api.livechatinc.com/v3.7/agent/action/list_agents_for_transfer \
25892589
</Code>
25902590
</Section>
25912591

2592+
<Section>
2593+
<Text>
2594+
2595+
### Request Thread Summary
2596+
2597+
Requests an AI-generated summary of a specific thread. A thread can be summarized only once, and the summary can be requested only for inactive threads.
2598+
2599+
#### Specifics
2600+
2601+
| | |
2602+
| ---------------------- | ---------------------------------------------------------------------------------------------------------- |
2603+
| **Method URL** | `https://api.livechatinc.com/v3.7/agent/action/request_thread_summary` |
2604+
| **Required scopes** | `chats--all:rw` **\*** or `chats--access:rw` **\*\*** |
2605+
| **RTM API equivalent** | [`request_thread_summary`](/messaging/agent-chat-api/v3.7/rtm-reference/#request-thread-summary) |
2606+
| **Webhook** | [`thread_summary_set`](/management/webhooks/v3.7/#thread_summary_set) |
2607+
2608+
**\*)** `chats--all:rw` - to request a summary for a thread taking place in any group.
2609+
2610+
**\*\*)** `chats--access:rw` - to request a summary for a thread taking place in groups that the requester (related to the token) is a member of. The agent groups and the chat groups must overlap - at least one group must be in common.
2611+
2612+
#### Request
2613+
2614+
| Parameter | Required | Data type | Notes |
2615+
| ----------- | -------- | --------- | ----- |
2616+
| `chat_id` | Yes | `string` | |
2617+
| `thread_id` | Yes | `string` | |
2618+
2619+
#### Response
2620+
2621+
No response payload (`200 OK`).
2622+
2623+
</Text>
2624+
<Code>
2625+
<CodeSample path={'REQUEST'}>
2626+
2627+
```shell
2628+
curl -X POST \
2629+
https://api.livechatinc.com/v3.7/agent/action/request_thread_summary \
2630+
-H 'Authorization: Bearer <your_access_token>' \
2631+
-H 'Content-Type: application/json' \
2632+
-d '{
2633+
"chat_id": "PJ0MRSHTDG",
2634+
"thread_id": "K600PKZON8"
2635+
}'
2636+
```
2637+
2638+
</CodeSample>
2639+
</Code>
2640+
</Section>
2641+
25922642
# Webhooks
25932643

25942644
Here's what you need to know about **webhooks**:

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

Lines changed: 60 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -118,7 +118,7 @@ When connecting to the Agent Chat RTM API, clients have to send over the require
118118
| **Thread tags** | [`tag_thread`](#tag-thread) [`untag_thread`](#untag-thread) |
119119
| **Customers** | [`get_customer`](#get-customer) [`update_customer`](#update-customer) [`ban_customer`](#ban-customer) [`follow_customer`](#follow-customer) [`unfollow_customer`](#unfollow-customer) [`subscribe_customers`](#subscribe_customers) [`unsubscribe_customers`](#unsubscribe_customers) |
120120
| **Status** | [`login`](#login) [`set_routing_status`](#set-routing-status) [`set_away_status`](#set-away-status) [`logout`](#logout) [`list_routing_statuses`](#list-routing-statuses) [`update_session`](#update-session) |
121-
| **Other** | [`mark_events_as_seen`](#mark-events-as-seen) [`send_thinking_indicator`](#send-thinking-indicator) [`send_typing_indicator`](#send-typing-indicator) [`multicast`](#multicast) [`list_agents_for_transfer`](#list-agents-for-transfer) |
121+
| **Other** | [`mark_events_as_seen`](#mark-events-as-seen) [`send_thinking_indicator`](#send-thinking-indicator) [`send_typing_indicator`](#send-typing-indicator) [`multicast`](#multicast) [`list_agents_for_transfer`](#list-agents-for-transfer) [`request_thread_summary`](#request-thread-summary) |
122122

123123
</Text>
124124
<Code>
@@ -3329,6 +3329,65 @@ It returns the Agents you can transfer a chat to. Agents are sorted ascendingly
33293329
</Code>
33303330
</Section>
33313331

3332+
<Section>
3333+
<Text>
3334+
3335+
### Request Thread Summary
3336+
3337+
Requests an AI-generated summary of a specific thread. A thread can be summarized only once, and the summary can be requested only for inactive threads.
3338+
3339+
#### Specifics
3340+
3341+
| | |
3342+
| ---------------------- | ---------------------------------------------------------------------------------------------------------- |
3343+
| **Action** | `request_thread_summary` |
3344+
| **Required scopes** | `chats--all:rw` **\*** or `chats--access:rw` **\*\*** |
3345+
| **Web API equivalent** | [`request_thread_summary`](/messaging/agent-chat-api/v3.7/#request-thread-summary) |
3346+
| **Push message** | [`thread_summary_set`](/messaging/agent-chat-api/v3.7/rtm-pushes/#thread_summary_set) |
3347+
3348+
**\*)** `chats--all:rw` - to request a summary for a thread taking place in any group.
3349+
3350+
**\*\*)** `chats--access:rw` - to request a summary for a thread taking place in groups that the requester (related to the token) is a member of. The agent groups and the chat groups must overlap - at least one group must be in common.
3351+
3352+
#### Request
3353+
3354+
| Parameter | Required | Data type | Notes |
3355+
| ----------- | -------- | --------- | ----- |
3356+
| `chat_id` | Yes | `string` | |
3357+
| `thread_id` | Yes | `string` | |
3358+
3359+
</Text>
3360+
<Code>
3361+
<CodeSample path={'REQUEST'}>
3362+
3363+
```json
3364+
{
3365+
"action": "request_thread_summary",
3366+
"payload": {
3367+
"chat_id": "PJ0MRSHTDG",
3368+
"thread_id": "PJ0MRSHTFG"
3369+
}
3370+
}
3371+
```
3372+
3373+
</CodeSample>
3374+
3375+
<CodeResponse>
3376+
3377+
```json
3378+
{
3379+
"request_id": "<request_id>", // optional
3380+
"action": "request_thread_summary",
3381+
"type": "response",
3382+
"success": true,
3383+
"payload": {}
3384+
}
3385+
```
3386+
3387+
</CodeResponse>
3388+
</Code>
3389+
</Section>
3390+
33323391
<Section>
33333392

33343393
<Text>

0 commit comments

Comments
 (0)