Skip to content

Commit 20fe055

Browse files
committed
ME-883 part 1/3: add request_thread_summary method
1 parent de58617 commit 20fe055

File tree

4 files changed

+230
-4
lines changed

4 files changed

+230
-4
lines changed

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

Lines changed: 53 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,58 @@ 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 for a specific thread.
2598+
This feature is only available for `business` and `enterprise` plans in LiveChat.
2599+
Thread can be only summarized once. A summary can be requested only for inactive threads.
2600+
2601+
#### Specifics
2602+
2603+
| | |
2604+
| ---------------------- | ---------------------------------------------------------------------------------------------------------- |
2605+
| **Method URL** | `https://api.livechatinc.com/v3.6/agent/action/request_thread_summary` |
2606+
| **Required scopes** | `chats--all:rw` **\*** or `chats--access:rw` **\*\*** |
2607+
| **RTM API equivalent** | [`request_thread_summary`](/messaging/agent-chat-api/v3.6/rtm-reference/#request-thread-summary) |
2608+
| **Webhook** | [`thread_summary_set`](/management/webhooks/v3.6/#thread_summary_set) |
2609+
2610+
**\*)** `chats--all:rw` - to request a summary for a thread taking place in any group.
2611+
2612+
**\*\*)** `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.)
2613+
2614+
#### Request
2615+
2616+
| Parameter | Required | Data type | Notes |
2617+
| ----------- | -------- | --------- | ----- |
2618+
| `chat_id` | Yes | `string` | |
2619+
| `thread_id` | Yes | `string` | |
2620+
2621+
#### Response
2622+
2623+
No response payload (`200 OK`).
2624+
2625+
</Text>
2626+
<Code>
2627+
<CodeSample path={'REQUEST'}>
2628+
2629+
```shell
2630+
curl -X POST \
2631+
https://api.livechatinc.com/v3.6/agent/action/request_thread_summary \
2632+
-H 'Authorization: Bearer <your_access_token>' \
2633+
-H 'Content-Type: application/json' \
2634+
-d '{
2635+
"chat_id": "PJ0MRSHTDG",
2636+
"thread_id": "K600PKZON8"
2637+
}'
2638+
```
2639+
2640+
</CodeSample>
2641+
</Code>
2642+
</Section>
2643+
25922644
# Webhooks
25932645

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

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

Lines changed: 62 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,67 @@ 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 for a specific thread.
3338+
This feature is only available for `business` and `enterprise` plans in LiveChat.
3339+
Thread can be only summarized once. A summary can be requested only for inactive threads.
3340+
3341+
#### Specifics
3342+
3343+
| | |
3344+
| ---------------------- | ---------------------------------------------------------------------------------------------------------- |
3345+
| **Action** | `request_thread_summary` |
3346+
| **Required scopes** | `chats--all:rw` **\*** or `chats--access:rw` **\*\*** |
3347+
| **Web API equivalent** | [`request_thread_summary`](/messaging/agent-chat-api/v3.6/#request-thread-summary) |
3348+
| **Push message** | [`thread_summary_set`](/messaging/agent-chat-api/v3.6/rtm-pushes/#thread_summary_set) |
3349+
3350+
**\*)** `chats--all:rw` - to request a summary for a thread taking place in any group.
3351+
3352+
**\*\*)** `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.)
3353+
3354+
#### Request
3355+
3356+
| Parameter | Required | Data type | Notes |
3357+
| ----------- | -------- | --------- | ----- |
3358+
| `chat_id` | Yes | `string` | |
3359+
| `thread_id` | Yes | `string` | |
3360+
3361+
</Text>
3362+
<Code>
3363+
<CodeSample path={'REQUEST'}>
3364+
3365+
```json
3366+
{
3367+
"action": "request_thread_summary",
3368+
"payload": {
3369+
"chat_id": "PJ0MRSHTDG",
3370+
"thread_id": "PJ0MRSHTFG"
3371+
}
3372+
}
3373+
```
3374+
3375+
</CodeSample>
3376+
3377+
<CodeResponse>
3378+
3379+
```json
3380+
{
3381+
"request_id": "<request_id>", // optional
3382+
"action": "request_thread_summary",
3383+
"type": "response",
3384+
"success": true,
3385+
"payload": {}
3386+
}
3387+
```
3388+
3389+
</CodeResponse>
3390+
</Code>
3391+
</Section>
3392+
33323393
<Section>
33333394

33343395
<Text>

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

Lines changed: 53 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,58 @@ 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 for a specific thread.
2598+
This feature is only available for `business` and `enterprise` plans in LiveChat.
2599+
Thread can be only summarized once. A summary can be requested only for inactive threads.
2600+
2601+
#### Specifics
2602+
2603+
| | |
2604+
| ---------------------- | ---------------------------------------------------------------------------------------------------------- |
2605+
| **Method URL** | `https://api.livechatinc.com/v3.7/agent/action/request_thread_summary` |
2606+
| **Required scopes** | `chats--all:rw` **\*** or `chats--access:rw` **\*\*** |
2607+
| **RTM API equivalent** | [`request_thread_summary`](/messaging/agent-chat-api/v3.7/rtm-reference/#request-thread-summary) |
2608+
| **Webhook** | [`thread_summary_set`](/management/webhooks/v3.7/#thread_summary_set) |
2609+
2610+
**\*)** `chats--all:rw` - to request a summary for a thread taking place in any group.
2611+
2612+
**\*\*)** `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.)
2613+
2614+
#### Request
2615+
2616+
| Parameter | Required | Data type | Notes |
2617+
| ----------- | -------- | --------- | ----- |
2618+
| `chat_id` | Yes | `string` | |
2619+
| `thread_id` | Yes | `string` | |
2620+
2621+
#### Response
2622+
2623+
No response payload (`200 OK`).
2624+
2625+
</Text>
2626+
<Code>
2627+
<CodeSample path={'REQUEST'}>
2628+
2629+
```shell
2630+
curl -X POST \
2631+
https://api.livechatinc.com/v3.7/agent/action/request_thread_summary \
2632+
-H 'Authorization: Bearer <your_access_token>' \
2633+
-H 'Content-Type: application/json' \
2634+
-d '{
2635+
"chat_id": "PJ0MRSHTDG",
2636+
"thread_id": "K600PKZON8"
2637+
}'
2638+
```
2639+
2640+
</CodeSample>
2641+
</Code>
2642+
</Section>
2643+
25922644
# Webhooks
25932645

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

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

Lines changed: 62 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,67 @@ 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 for a specific thread.
3338+
This feature is only available for `business` and `enterprise` plans in LiveChat.
3339+
Thread can be only summarized once. A summary can be requested only for inactive threads.
3340+
3341+
#### Specifics
3342+
3343+
| | |
3344+
| ---------------------- | ---------------------------------------------------------------------------------------------------------- |
3345+
| **Action** | `request_thread_summary` |
3346+
| **Required scopes** | `chats--all:rw` **\*** or `chats--access:rw` **\*\*** |
3347+
| **Web API equivalent** | [`request_thread_summary`](/messaging/agent-chat-api/v3.7/#request-thread-summary) |
3348+
| **Push message** | [`thread_summary_set`](/messaging/agent-chat-api/v3.7/rtm-pushes/#thread_summary_set) |
3349+
3350+
**\*)** `chats--all:rw` - to request a summary for a thread taking place in any group.
3351+
3352+
**\*\*)** `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.)
3353+
3354+
#### Request
3355+
3356+
| Parameter | Required | Data type | Notes |
3357+
| ----------- | -------- | --------- | ----- |
3358+
| `chat_id` | Yes | `string` | |
3359+
| `thread_id` | Yes | `string` | |
3360+
3361+
</Text>
3362+
<Code>
3363+
<CodeSample path={'REQUEST'}>
3364+
3365+
```json
3366+
{
3367+
"action": "request_thread_summary",
3368+
"payload": {
3369+
"chat_id": "PJ0MRSHTDG",
3370+
"thread_id": "PJ0MRSHTFG"
3371+
}
3372+
}
3373+
```
3374+
3375+
</CodeSample>
3376+
3377+
<CodeResponse>
3378+
3379+
```json
3380+
{
3381+
"request_id": "<request_id>", // optional
3382+
"action": "request_thread_summary",
3383+
"type": "response",
3384+
"success": true,
3385+
"payload": {}
3386+
}
3387+
```
3388+
3389+
</CodeResponse>
3390+
</Code>
3391+
</Section>
3392+
33323393
<Section>
33333394

33343395
<Text>

0 commit comments

Comments
 (0)