Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/pages/messaging/agent-chat-api/changelog/index.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ The developer preview version provides a preview of the upcoming changes to the

### Customers

- The **List Customers** method was removed.
- The **Create Customer** and **List Customers** methods were removed.
- 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.
- 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.
- The [**Customer**](/messaging/agent-chat-api/v3.6/data-structures#customer) data structure now contains information about HelpDesk tickets (when available).
Expand Down
61 changes: 1 addition & 60 deletions src/pages/messaging/agent-chat-api/v3.6/index.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,7 @@ curl -X POST \
| **Events** | [`send_event`](#send-event) [`upload_file`](#upload-file) [`send_rich_message_postback`](#send-rich-message-postback) |
| **Properties** | [`update_chat_properties`](#update-chat-properties) [`delete_chat_properties`](#delete-chat-properties) [`update_thread_properties`](#update-thread-properties) [`delete_thread_properties`](#delete-thread-properties) [`update_event_properties`](#update-event-properties) [`delete_event_properties`](#delete-event-properties) |
| **Thread tags** | [`tag_thread`](#tag-thread) [`untag_thread`](#untag-thread) |
| **Customers** | [`get_customer`](#get-customer) [`create_customer`](#create-customer) [`update_customer`](#update-customer) [`ban_customer`](#ban-customer) [`follow_customer`](#follow-customer) [`unfollow_customer`](#unfollow-customer) |
| **Customers** | [`get_customer`](#get-customer) [`update_customer`](#update-customer) [`ban_customer`](#ban-customer) [`follow_customer`](#follow-customer) [`unfollow_customer`](#unfollow-customer) |
| **Status** | [`set_routing_status`](#set-routing-status) [`list_routing_statuses`](#list-routing-statuses) |
| **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) |

Expand Down Expand Up @@ -1919,65 +1919,6 @@ https://api.livechatinc.com/v3.6/agent/action/get_customer \
<Section>
<Text>

### Create Customer

Creates a new [Customer](/messaging/agent-chat-api/v3.6/data-structures/#customer) user type.

#### Specifics

| | |
| ---------------------- | ---------------------------------------------------------------------------------- |
| **Method URL** | `https://api.livechatinc.com/v3.6/agent/action/create_customer` |
| **Required scopes** | `customers:rw` |
| **RTM API equivalent** | [`create_customer`](/messaging/agent-chat-api/v3.6/rtm-reference/#create-customer) |
| **Webhook** | [`incoming_customer`](/management/webhook/v3.6/#incoming_customer) |

#### Request

| Parameter | Required | Data type | Notes |
| ---------------- | -------- | ---------- | ---------------------------------------------------------------------------------- |
| `name` | No | `string` | |
| `email` | No | `string` | |
| `avatar` | No | `string` | URL of the Customer's avatar |
| `session_fields` | No | `[]object` | An array of custom object-enclosed `key:value` pairs. Respects the order of items. |

</Text>
<Code>
<CodeSample path={'REQUEST'}>

```shell
curl -X POST \
https://api.livechatinc.com/v3.6/agent/action/create_customer \
-H 'Authorization: Bearer <your_access_token>' \
-H 'Content-Type: application/json' \
-d '{
"name": "Thomas Anderson",
"email": "t.anderson@example.com",
"avatar": "https://example.com/avatars/1.png",
"session_fields": [{
"custom_key": "custom_value"
}, {
"another_custom_key": "another_custom_value"
}]
}'
```

</CodeSample>
<CodeResponse>

```json
{
"customer_id": "b7eff798-f8df-4364-8059-649c35c9ed0c"
}
```

</CodeResponse>
</Code>
</Section>

<Section>
<Text>

### Update Customer

Updates Customer's properties.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,7 @@ When connecting to the Agent Chat RTM API, clients have to send over the require
| **Events** | [`send_event`](#send-event) [`send_rich_message_postback`](#send-rich-message-postback) |
| **Properties** | [`update_chat_properties`](#update-chat-properties) [`delete_chat_properties`](#delete-chat-properties) [`update_thread_properties`](#update-thread-properties) [`delete_thread_properties`](#delete-thread-properties) [`update_event_properties`](#update-event-properties) [`delete_event_properties`](#delete-event-properties) |
| **Thread tags** | [`tag_thread`](#tag-thread) [`untag_thread`](#untag-thread) |
| **Customers** | [`get_customer`](#get-customer) [`create_customer`](#create-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) |
| **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) |
| **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) |
| **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) |

Expand Down Expand Up @@ -2106,71 +2106,6 @@ Returns the info about the Customer with a given `id`.
<Section>
<Text>

### Create Customer

Creates a new [Customer](/messaging/agent-chat-api/v3.6/data-structures/#customer) user type.

#### Specifics

| | |
| ---------------------- | ----------------------------------------------------------------------------------- |
| **Action** | `create_customer` |
| **Required scopes** | `customers:rw` |
| **Web API equivalent** | [`create_customer`](/messaging/agent-chat-api/v3.6/#create-customer) |
| **Push message** | [`incoming_customer`](/messaging/agent-chat-api/v3.6/rtm-pushes/#incoming_customer) |

#### Request

| Parameter | Required | Data type | Notes |
| ---------------- | -------- | ---------- | ---------------------------------------------------------------------------------- |
| `name` | No | `string` | |
| `email` | No | `string` | |
| `avatar` | No | `string` | URL of the Customer's avatar |
| `session_fields` | No | `[]object` | An array of custom object-enclosed `key:value` pairs. Respects the order of items. |

</Text>
<Code>
<CodeSample path={'REQUEST'}>

```json
{
"action": "create_customer",
"payload": {
"name": "Thomas Anderson",
"email": "t.anderson@example.com",
"avatar": "https://example.com/avatars/1.png",
"session_fields": [{
"custom_key": "custom_value"
}, {
"another_custom_key": "another_custom_value"
}]
}
}
```

</CodeSample>

<CodeResponse>

```json
{
"request_id": "<request_id>", // optional
"action": "create_customer",
"type": "response",
"success": true,
"payload": {
"customer_id": "b7eff798-f8df-4364-8059-649c35c9ed0c"
}
}
```

</CodeResponse>
</Code>
</Section>

<Section>
<Text>

### Update Customer

Updates Customer's properties.
Expand Down