Skip to content

Commit 2efce9d

Browse files
authored
feat(docs): campaign engagement tracking docs (#1604)
1 parent d7a4323 commit 2efce9d

File tree

13 files changed

+260
-30
lines changed

13 files changed

+260
-30
lines changed

payloads/management/v3.6/configuration-api/responses/greetings/getGreeting.json

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,9 @@
2424
{
2525
"text": "Get Support",
2626
"type": "message",
27-
"value": "I need support"
27+
"value": "I need support",
28+
"postback_id": "support_request",
29+
"button_id": "20ff0b3f-fbed-49f4-b13f-788c9ec66f03"
2830
}
2931
]
3032
}

payloads/management/v3.6/configuration-api/responses/greetings/listGreetings.json

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,9 @@
2626
{
2727
"text": "Get Support",
2828
"type": "message",
29-
"value": "I need support"
29+
"value": "I need support",
30+
"postback_id": "support_request",
31+
"button_id": "20ff0b3f-fbed-49f4-b13f-788c9ec66f03"
3032
}
3133
]
3234
}

payloads/management/v3.7/configuration-api/responses/greetings/getGreeting.json

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,9 @@
2424
{
2525
"text": "Get Support",
2626
"type": "message",
27-
"value": "I need support"
27+
"value": "I need support",
28+
"postback_id": "support_request",
29+
"button_id": "20ff0b3f-fbed-49f4-b13f-788c9ec66f03"
2830
}
2931
]
3032
}

payloads/management/v3.7/configuration-api/responses/greetings/listGreetings.json

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,9 @@
2626
{
2727
"text": "Get Support",
2828
"type": "message",
29-
"value": "I need support"
29+
"value": "I need support",
30+
"postback_id": "support_request",
31+
"button_id": "20ff0b3f-fbed-49f4-b13f-788c9ec66f03"
3032
}
3133
]
3234
}

src/pages/management/configuration-api/index.mdx

Lines changed: 14 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -2068,6 +2068,8 @@ Creates a new greeting.
20682068
| `elements[].buttons[].text` | yes | `string` | Button text |
20692069
| `elements[].buttons[].type` | yes | `string` | Defines the behavior after a user clicks the button. Should be used together with `elements.buttons.value`. Possible values: `webview`, `message`, `url`, `phone`. [Read more about rich messages.](/extending-chat-widget/rich-messages/#getting-started) |
20702070
| `elements[].buttons[].value` | yes | `string` | Should be used together with `elements.buttons.type`. You can use this field to give the rich message of a `webview` type (a Moment) a custom title. [Read more about Moments.](/extending-chat-widget/chat-widget-moments/#how-to-start) |
2071+
| `elements[].buttons[].postback_id` | yes | `string` | A unique identifier for this button, sent in postback events. |
2072+
| `elements[].buttons[].button_id` | no | `string` | A button identifier, automatically generated if not provided. |
20712073
| `elements[].buttons[].role` | no | `string` | Button role, one of: `default`, `primary`, or `danger` |
20722074

20732075
#### Response
@@ -2150,17 +2152,18 @@ Updates the properties of a greeting.
21502152

21512153
#### Request
21522154

2153-
| Parameter | Required | Data type | Notes |
2154-
| -------------- | -------- | ---------- | ---------------------------------------------------------------------------------------------------- |
2155-
| `id` | Yes | `int` | ID of the greeting to update |
2156-
| `type` | No | `string` | Greeting type |
2157-
| `active` | No | `bool` | Greeting status |
2158-
| `active_from` | No | `string` | RFC 3339 date-time format; when the greeting becomes active |
2159-
| `active_until` | No | `string` | RFC 3339 date-time format; when the greeting stops being active |
2160-
| `name` | No | `string` | Greeting name |
2161-
| `rules` | No | `object[]` | Array of action rules; see [Create Greeting](#create-greeting) for detailed structure and validation |
2162-
| `properties` | No | `object` | Additional properties; see [Create Greeting](#create-greeting) for allowed keys |
2163-
| `rich_message` | No | `object` | Rich message content; see [Create Greeting](#create-greeting) for complete structure |
2155+
| Parameter | Required | Data type | Notes |
2156+
| ---------------------------------------------- | -------- | ---------- | ---------------------------------------------------------------------------------------------------- |
2157+
| `id` | Yes | `int` | ID of the greeting to update |
2158+
| `type` | No | `string` | Greeting type |
2159+
| `active` | No | `bool` | Greeting status |
2160+
| `active_from` | No | `string` | RFC 3339 date-time format; when the greeting becomes active |
2161+
| `active_until` | No | `string` | RFC 3339 date-time format; when the greeting stops being active |
2162+
| `name` | No | `string` | Greeting name |
2163+
| `rules` | No | `object[]` | Array of action rules; see [Create Greeting](#create-greeting) for detailed structure and validation |
2164+
| `properties` | No | `object` | Additional properties; see [Create Greeting](#create-greeting) for allowed keys |
2165+
| `rich_message` | No | `object` | Rich message content; see [Create Greeting](#create-greeting) for complete structure |
2166+
| `rich_message.elements[].buttons[].button_id` | No | `string` | Pass the existing ID if you want to preserve it |
21642167

21652168
#### Response
21662169

src/pages/management/configuration-api/v3.7/index.mdx

Lines changed: 15 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -2222,6 +2222,8 @@ Creates a new greeting.
22222222
| `elements[].buttons[].text` | yes | `string` | Button text |
22232223
| `elements[].buttons[].type` | yes | `string` | Defines the behavior after a user clicks the button. Should be used together with `elements.buttons.value`. Possible values: `webview`, `message`, `url`, `phone`. [Read more about rich messages.](/extending-chat-widget/rich-messages/#getting-started) |
22242224
| `elements[].buttons[].value` | yes | `string` | Should be used together with `elements.buttons.type`. You can use this field to give the rich message of a `webview` type (a Moment) a custom title. [Read more about Moments.](/extending-chat-widget/chat-widget-moments/#how-to-start) |
2225+
| `elements[].buttons[].postback_id` | yes | `string` | A unique identifier for this button, sent in postback events. |
2226+
| `elements[].buttons[].button_id` | no | `string` | A button identifier, automatically generated if not provided. |
22252227
| `elements[].buttons[].role` | no | `string` | Button role, one of: `default`, `primary`, or `danger` |
22262228

22272229
#### Response
@@ -2304,17 +2306,19 @@ Updates the properties of a greeting.
23042306

23052307
#### Request
23062308

2307-
| Parameter | Required | Data type | Notes |
2308-
| -------------- | -------- | ---------- | ---------------------------------------------------------------------------------------------------- |
2309-
| `id` | Yes | `int` | ID of the greeting to update |
2310-
| `type` | No | `string` | Greeting type |
2311-
| `active` | No | `bool` | Greeting status |
2312-
| `active_from` | No | `string` | RFC 3339 date-time format; when the greeting becomes active |
2313-
| `active_until` | No | `string` | RFC 3339 date-time format; when the greeting stops being active |
2314-
| `name` | No | `string` | Greeting name |
2315-
| `rules` | No | `object[]` | Array of action rules; see [Create Greeting](#create-greeting) for detailed structure and validation |
2316-
| `properties` | No | `object` | Additional properties; see [Create Greeting](#create-greeting) for allowed keys |
2317-
| `rich_message` | No | `object` | Rich message content; see [Create Greeting](#create-greeting) for complete structure |
2309+
| Parameter | Required | Data type | Notes |
2310+
| ---------------------------------------------- | -------- | ---------- | ---------------------------------------------------------------------------------------------------- |
2311+
| `id` | Yes | `int` | ID of the greeting to update |
2312+
| `type` | No | `string` | Greeting type |
2313+
| `active` | No | `bool` | Greeting status |
2314+
| `active_from` | No | `string` | RFC 3339 date-time format; when the greeting becomes active |
2315+
| `active_until` | No | `string` | RFC 3339 date-time format; when the greeting stops being active |
2316+
| `name` | No | `string` | Greeting name |
2317+
| `rules` | No | `object[]` | Array of action rules; see [Create Greeting](#create-greeting) for detailed structure and validation |
2318+
| `properties` | No | `object` | Additional properties; see [Create Greeting](#create-greeting) for allowed keys |
2319+
| `rich_message` | No | `object` | Rich message content; see [Create Greeting](#create-greeting) for complete structure |
2320+
| `rich_message.elements[].buttons[].button_id` | No | `string` | Pass the existing ID if you want to preserve it |
2321+
23182322

23192323
#### Response
23202324

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

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

3838
- The **customer_page_updated** was removed.
3939

40+
4041
### Other
4142

43+
- There's a new method, [**Send Greeting Button Clicked**](/messaging/customer-chat-api/#send-greeting-button-clicked).
4244
- There's a new push, [**incoming_thinking_indicator**](/messaging/customer-chat-api/rtm-pushes/#incoming_thinking_indicator).
4345

4446
## [v3.5] - 2022-11-23

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

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -252,6 +252,7 @@ Rich message event contains rich message data structure. [Read more](/extending-
252252
| `elements.buttons.value` | always | |
253253
| `elements.buttons.webview_height` | always | Unless button `type` is different than `webview`. |
254254
| `elements.buttons.postback_id` | always | |
255+
| `elements.buttons.button_id` | optionally | Returned only for greetings. |
255256
| `elements.buttons.user_ids` | always | |
256257
| `elements.buttons.target` | optionally | |
257258

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

Lines changed: 48 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -106,7 +106,7 @@ curl -X POST \
106106
| **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) [`list_license_properties`](#list-license-properties) [`list_group_properties`](#list-group-properties) |
107107
| **Customers** | [`update_customer`](#update-customer) [`set_customer_session_fields`](#set-customer-session-fields) [`get_customer`](#get-customer) |
108108
| **Status** | [`list_group_statuses`](#list-group-statuses) |
109-
| **Other** | [`check_goals`](#check-goals) [`get_form`](#get-form) [`get_predicted_agent`](#get-predicted-agent) [`get_url_info`](#get-url-info) [`mark_events_as_seen`](#mark-events-as-seen) [`accept_greeting`](#accept-greeting) [`cancel_greeting`](#cancel-greeting) [`request_email_verification`](#request-email-verification) |
109+
| **Other** | [`check_goals`](#check-goals) [`get_form`](#get-form) [`get_predicted_agent`](#get-predicted-agent) [`get_url_info`](#get-url-info) [`mark_events_as_seen`](#mark-events-as-seen) [`accept_greeting`](#accept-greeting) [`cancel_greeting`](#cancel-greeting) [`request_email_verification`](#request-email-verification) [`send_greeting_button_clicked`](#send-greeting-button-clicked) |
110110

111111
## Chats
112112

@@ -2184,6 +2184,53 @@ curl -X POST \
21842184

21852185
<Text>
21862186

2187+
### Send Greeting Button Clicked
2188+
2189+
#### Specifics
2190+
2191+
| | |
2192+
| ---------------------- | --------------------------------------------------------------------------------------------------- |
2193+
| **Method URL** | `https://api.livechatinc.com/v3.6/customer/action/send_greeting_button_clicked` |
2194+
| **RTM API equivalent** | [`send_greeting_button_clicked`](/messaging/customer-chat-api/v3.6/rtm-reference/#send-greeting-button-clicked) |
2195+
| **Webhook** | - |
2196+
2197+
#### Request
2198+
2199+
| Parameter | Required | Data type | Notes |
2200+
| ------------------------------- | -------- | --------- | --------------------------------------------------- |
2201+
| `greeting_unique_id` | Yes | `string` | A unique greeting ID. You can get it from the [`incoming_greeting`](/messaging/customer-chat-api/rtm-pushes/#incoming_greeting) push. |
2202+
| `button_id` | Yes | `string` | Greeting button ID |
2203+
2204+
#### Response
2205+
2206+
No response payload (`200 OK`).
2207+
2208+
</Text>
2209+
2210+
<Code>
2211+
2212+
<CodeSample path={'REQUEST'}>
2213+
2214+
```shell
2215+
curl -X POST \
2216+
'https://api.livechatinc.com/v3.6/customer/action/send_greeting_button_clicked?organization_id=<organization_id>' \
2217+
-H 'Content-Type: application/json' \
2218+
-H 'Authorization: Bearer <customer_access_token>' \
2219+
-d '{
2220+
"greeting_unique_id": "Q10X0W041P",
2221+
"button_id": "20ff0b3f-fbed-49f4-b13f-788c9ec66f03"
2222+
}'
2223+
```
2224+
2225+
</CodeSample>
2226+
2227+
</Code>
2228+
2229+
</Section>
2230+
2231+
<Section>
2232+
2233+
<Text>
21872234

21882235
### Request Email Verification
21892236

0 commit comments

Comments
 (0)