Skip to content

Commit 03f07b8

Browse files
authored
feat: add new system event in v3.6 (#1560)
1 parent 67e4e4e commit 03f07b8

File tree

8 files changed

+97
-3
lines changed

8 files changed

+97
-3
lines changed
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
{
2+
"id": "17f5ac89-e578-4d3f-9ab9-675be6209b00",
3+
"custom_id": "shopify_1744119867",
4+
"source": "cdp",
5+
"type": "system",
6+
"subtype": "store_order_was_created",
7+
"version": 1,
8+
"details": "{\"store\":{\"id\":\"my-store\",\"platform\":\"shopify\",\"uuid\":\"70cb9e59-b639-41c5-81cf-71db11972cff\",\"url\":\"https://my-store.myshopify.com\",\"name\":\"My Store\"},\"order\":{\"id\":\"gid://shopify/Order/1234567890\",\"order_number\":\"#1001\",\"currency\":\"USD\",\"total_price\":123.45,\"line_items\":[{\"title\":\"Product Name\",\"quantity\":2,\"price\":49.99,\"sku\":\"SKU123\",\"variant_id\":\"gid://shopify/ProductVariant/12345678901234\"}]}}",
9+
"created_at": "2017-10-12T15:19:21.010200Z",
10+
"visibility": "all"
11+
}

payloads/messaging/v3.6/agent-chat-api/index.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ export { default as form } from "./events/form.json";
55
export { default as message } from "./events/message.json";
66
export { default as richMessage } from "./events/richMessage.json";
77
export { default as systemMessage } from "./events/systemMessage.json";
8+
export { default as system } from "./events/system.json";
89

910
export { default as agent } from "./users/agent.json";
1011
export { default as myProfile } from "./users/myProfile.json";
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
{
2+
"id": "17f5ac89-e578-4d3f-9ab9-675be6209b00",
3+
"custom_id": "shopify_1744119867",
4+
"source": "cdp",
5+
"type": "system",
6+
"subtype": "store_order_was_created",
7+
"version": 1,
8+
"details": "{\"store\":{\"id\":\"my-store\",\"platform\":\"shopify\",\"uuid\":\"70cb9e59-b639-41c5-81cf-71db11972cff\",\"url\":\"https://my-store.myshopify.com\",\"name\":\"My Store\"},\"order\":{\"id\":\"gid://shopify/Order/1234567890\",\"order_number\":\"#1001\",\"currency\":\"USD\",\"total_price\":123.45,\"line_items\":[{\"title\":\"Product Name\",\"quantity\":2,\"price\":49.99,\"sku\":\"SKU123\",\"variant_id\":\"gid://shopify/ProductVariant/12345678901234\"}]}}",
9+
"created_at": "2017-10-12T15:19:21.010200Z"
10+
}

payloads/messaging/v3.6/customer-chat-api/index.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ export { default as filledForm } from "./events/filledForm.json"
44
export { default as message } from "./events/message.json"
55
export { default as richMessage } from "./events/richMessage.json"
66
export { default as systemMessage } from "./events/systemMessage.json"
7+
export { default as system } from "./events/system.json";
78

89
export { default as agent } from "./users/agent.json"
910
export { default as customer } from "./users/customer.json"

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

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,10 @@ The developer preview version provides a preview of the upcoming changes to the
2828
- The [**Thread**](/messaging/agent-chat-api/v3.6/data-structures/#threads) data structure has a new `customer_visit` field.
2929
- The [**agent_disconnected**](/messaging/agent-chat-api/v3.6/rtm-pushes#agent_disconnected) push has a reason for disconnection, `role_permissions_changed`.
3030

31+
### Events
32+
33+
- A new structure for the [**System**](/messaging/agent-chat-api/v3.6/data-structures/#system) event was added.
34+
3135
### Customers
3236

3337
- The **List Customers** method was removed.
@@ -60,7 +64,7 @@ The developer preview version provides a preview of the upcoming changes to the
6064
- The **Change Push Notifications** method was removed.
6165
- The **Login** ([RTM](/messaging/agent-chat-api/v3.5/rtm-reference/#login)) method no longer accepts the `push_notifications` parameter.
6266
- A new push, [**groups_status_updated**](/messaging/agent-chat-api/v3.5/rtm-pushes/#groups_status_updated) has been added.
63-
- The `incoming_multicast` push is no longer sent when group statuses change.
67+
- The `incoming_multicast` push is no longer sent when group statuses change.
6468

6569
### Configuration
6670

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

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@ These are the available **event types**:
2525
- [Rich message](#rich-message)
2626
- [Custom](#custom)
2727
- [System message](#system-message)
28+
- [System](#system)
2829

2930
## File
3031

@@ -335,6 +336,37 @@ System message event is native system event sent in specific situations.
335336
</Code>
336337
</Section>
337338

339+
## System
340+
341+
<Section>
342+
<Text>
343+
344+
System event is an extension and a future replacement for [System message](#system-message). Similarly, it is a native system event sent in specific situations.
345+
346+
### Request
347+
348+
It is not possible to send a System event in API version 3.6.
349+
350+
### Response
351+
352+
| Field | Returned | Notes |
353+
| ------------ | ---------- | ----------------------------------------------------------------------------------------- |
354+
| `id` | always | Generated server-side |
355+
| `custom_id` | optionally | |
356+
| `source` | always | |
357+
| `type` | always | |
358+
| `subtype` | always | |
359+
| `version` | always | |
360+
| `details` | always | |
361+
| `created_at` | always | Date & time format with a resolution of microseconds, `UTC string`; generated server-side |
362+
| `visibility` | always | |
363+
364+
</Text>
365+
<Code>
366+
<CodeResponse version="v3.6" type="agent" title={'Sample System event in response'} json="system"/>
367+
</Code>
368+
</Section>
369+
338370
# Users
339371

340372
**Users** are another important data structure. Within this data structure type, we can distinguish:

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

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

2626
- The [**Get Dynamic Configuration**](/messaging/customer-chat-api/v3.6/#get-dynamic-configuration) response has a new format to support non-LiveChat widgets as default widgets.
2727

28+
### Events
29+
30+
- A new structure for the [**System**](/messaging/customer-chat-api/v3.6/data-structures/#system) event was added.
31+
2832
### Customers
2933

3034
- The **customer_page_updated** was removed.
@@ -35,7 +39,7 @@ The developer preview version provides a preview of the upcoming changes to the
3539

3640
- The [**customer_disconnected**](/messaging/customer-chat-api/v3.5/rtm-pushes/#customer_disconnected) push has a new reason, `logged_out_remotely`.
3741
- A new push, [**groups_status_updated**](/messaging/customer-chat-api/v3.5/rtm-pushes/#groups_status_updated) has been added.
38-
- The `incoming_multicast` push is no longer sent when group statuses change.
42+
- The `incoming_multicast` push is no longer sent when group statuses change.
3943

4044
### Customers
4145

@@ -110,7 +114,7 @@ The mandatory query string parameter, `license_id`, was replaced with `organiza
110114
- 🛠️ (2024-03-10): The **customer_page_updated** was removed.
111115

112116

113-
### Status
117+
### Status
114118

115119
- The **Login** ([RTM](/messaging/customer-chat-api/v3.3/rtm-reference/#login)) method has a new optional parameter `pushes`- it controls to which pushes the user is subscribed during the current RTM connection.
116120

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

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@ These are the available **event types**:
2525
- [Rich message](#rich-message)
2626
- [Custom](#custom)
2727
- [System message](#system-message)
28+
- [System](#system)
2829

2930
## File
3031

@@ -333,6 +334,36 @@ System message event is a native system event sent in specific situations.
333334
</Code>
334335
</Section>
335336

337+
## System
338+
339+
<Section>
340+
<Text>
341+
342+
System event is an extension and a future replacement for [System message](#system-message). Similarly, it is a native system event sent in specific situations.
343+
344+
### Request
345+
346+
It is not possible to send a System event in API version 3.6.
347+
348+
### Response
349+
350+
| Field | Returned | Notes |
351+
| ------------ | ---------- | ----------------------------------------------------------------------------------------- |
352+
| `id` | always | Generated server-side |
353+
| `custom_id` | optionally | |
354+
| `source` | always | |
355+
| `type` | always | |
356+
| `subtype` | always | |
357+
| `version` | always | |
358+
| `details` | always | |
359+
| `created_at` | always | Date & time format with a resolution of microseconds, `UTC string`; generated server-side |
360+
361+
</Text>
362+
<Code>
363+
<CodeResponse version="v3.6" type="customer" title={'Sample System event in response'} json="system"/>
364+
</Code>
365+
</Section>
366+
336367
# Users
337368

338369
**Users** are another important data structure. Within this data structure type, we can distinguish:

0 commit comments

Comments
 (0)