System activities
Introduction
The Text ecosystem generates two types of native system activities sent to users as events:
System events are an extension and a future replacement for system messages.
System events
The payload of the system event is a serialized JSON string stored in the details property, and its format depends on the source, subtype, and version.
The sources send the newest available version, but existing chat documents may contain older versions. Later version numbers indicate more recent versions.
Read more about the system event type.
The list of system event subtypes grouped by source:
cdp
CDP stands for Customer Data Platform. It collects customers' data and emits events related to their interactions with the Text ecosystem.
store_order_was_created
Generated when a customer creates an order in an organization's store.
Version 1
| Parameter | Required | Data type | Notes |
|---|
store | Yes | object | |
store.id | Yes | string | The store ID provided by the platform |
store.platform | Yes | string | The platform the store is hosted on |
store.uuid | Yes | string | The store's unique identifier in Text system |
store.url | No | string | The store's URL |
store.name | No | string | The store's name |
order | Yes | object | |
order.id | Yes | string | The order ID provided by the platform |
order.order_number | Yes | string | Visual representation of the order ID provided by the platform |
order.currency | Yes | string | The currency code in ISO 4217 format |
order.total_price | Yes | number | The total price of the order |
order.sales_channel | No | object | |
order.sales_channel.id | Yes | string | The unique identifier of the sales channel |
order.sales_channel.name | Yes | string | Human-readable sales channel name |
order.discounts | No | array | |
order.discounts.code | Yes | string | The discount code |
order.line_items | Yes | array | |
order.line_items.quantity | Yes | number | The quantity of the line item |
order.line_items.price | Yes | number | The price of the line item |
order.line_items.title | No | string | The title of the line item |
order.line_items.sku | No | string | The SKU of the line item |
order.line_items.variant_id | No | string | The variant ID of the line item |
Sample system event payload Version 2
- The
title property in order's line items became mandatory. - A mandatory
product_id property in order's line items was added.
| Parameter | Required | Data type | Notes |
|---|
store | Yes | object | |
store.id | Yes | string | The store ID provided by the platform |
store.platform | Yes | string | The platform the store is hosted on |
store.uuid | Yes | string | The store's unique identifier in Text system |
store.url | No | string | The store's URL |
store.name | No | string | The store's name |
order | Yes | object | |
order.id | Yes | string | The order ID provided by the platform |
order.order_number | Yes | string | Visual representation of the order ID provided by the platform |
order.currency | Yes | string | The currency code in ISO 4217 format |
order.total_price | Yes | number | The total price of the order |
order.sales_channel | No | object | |
order.sales_channel.id | Yes | string | The unique identifier of the sales channel |
order.sales_channel.name | Yes | string | Human-readable sales channel name |
order.discounts | No | array | |
order.discounts.code | Yes | string | The discount code |
order.line_items | Yes | array | |
order.line_items.quantity | Yes | number | The quantity of the line item |
order.line_items.price | Yes | number | The price of the line item |
order.line_items.title | Yes | string | The title of the line item |
order.line_items.product_id | Yes | string | The variant ID of the line item |
order.line_items.sku | No | string | The SKU of the line item |
order.line_items.variant_id | No | string | The variant ID of the line item |
Sample system event payload store_product_added_to_cart
Generated when a customer adds one or more products to their cart in an organization's store.
Version 1
| Parameter | Required | Data type | Notes |
|---|
store | Yes | object | |
store.id | Yes | string | The store ID provided by the platform |
store.platform | Yes | string | The platform the store is hosted on |
store.uuid | Yes | string | The store's unique identifier in Text system |
store.url | No | string | The store's URL |
store.name | No | string | The store's name |
cart_lines | Yes | array | |
cart_lines.total_price | Yes | string | Total price for item accounting for its quantity |
cart_lines.currency | Yes | string | The currency code in ISO 4217 format |
cart_lines.quantity | Yes | string | The quantity of the item |
cart_lines.product | Yes | object | |
cart_lines.product.id | Yes | string | The ID of the product |
cart_lines.product.title | No | string | The title of the item |
cart_lines.product.sku | No | string | The SKU of the item |
cart_lines.product.variant_id | No | string | The variant ID of the item |
Sample system event payload store_product_removed_from_cart
Generated when a customer removes one or more products from their cart in an organization's store.
Version 1
| Parameter | Required | Data type | Notes |
|---|
store | Yes | object | |
store.id | Yes | string | The store ID provided by the platform |
store.platform | Yes | string | The platform the store is hosted on |
store.uuid | Yes | string | The store's unique identifier in Text system |
store.url | No | string | The store's URL |
store.name | No | string | The store's name |
cart_lines | Yes | array | |
cart_lines.total_price | Yes | string | Total price for item accounting for its quantity |
cart_lines.currency | Yes | string | The currency code in ISO 4217 format |
cart_lines.quantity | Yes | string | The quantity of the item |
cart_lines.product | Yes | object | |
cart_lines.product.id | Yes | string | The ID of the product |
cart_lines.product.title | No | string | The title of the item |
cart_lines.product.sku | No | string | The SKU of the item |
cart_lines.product.variant_id | No | string | The variant ID of the item |
Sample system event payload System messages
This section lists the system message types generated in the Text ecosystem. In addition to system messages generated by Text, applications can define their own system messages.
The content of the system message event is a string stored in the text property, and its format depends on the system_message_type. The variables used to generate the text are specified in the text_vars property.
Read more about the system message event type.
Sample system message event body The list of system message types, sorted alphabetically:
agent_added
| Content | Generated when |
|---|
| %initiator% added %agent% to the chat | Agent was added to chat via the Add User to Chat request and is not the first agent in that chat. |
agent_joined
| Content | Generated when |
|---|
| %agent% joined the chat | Agent added themselves to chat via the Add User to Chat request, and is not the first agent in the chat. |
agent_left
| Content | Generated when |
|---|
| %agent% left the chat | Agent removed themselves from chat via the Remove User from Chat request. |
agent_removed
| Content | Generated when |
|---|
| %initiator% removed %agent% from the chat | Agent was removed from chat via the Remove User from Chat request. |
archived_customer_disconnected
| Content | Generated when |
|---|
| %customer% left the chat | Chat ended after customer left the website. |
chat_transferred
| Content | Generated when |
|---|
| %initiator% transferred the chat to %targets% | Chat was transferred via the Transfer Chat request. |
customer_added
| Content | Generated when |
|---|
| %initiator% added %customer% to the chat | Customer was added to chat via the Add User to Chat request. |
customer_banned
| Content | Generated when |
|---|
| Chat archived because customer was banned by %agent% for %duration% day(s) | Chat ended becaus customer was banned via the Ban Customer request. |
customer_removed
| Content | Generated when |
|---|
| %initiator% removed %customer% from the chat | Customer was removed from chat via the Remove User from Chat request. |
customer_updated
| Content | Generated when |
|---|
| %initiator% has changed customer's name to %customer_name% | The customer's name was updated by an agent with the Update Customer request when the chat was active. |
| Customer’s name has been changed to %customer_name% | The same as above, but the change was made by an integration. |
| %initiator% has changed customer's email to %customer_email% | The customer's email was updated by an agent with Update Customer request when the chat was active. |
| Customer’s email has been changed to %customer_email% | The same as above, but the change was made by an integration. |
| %initiator% has changed customer's name and email to %customer_name%, %customers_email% | The customer's name and email were updated by an agent with a single Update Customer request when the chat was active. |
| Customer’s name and email has been changed to %customer_name%, %customer_email% | The same as above, but the change was made by an integration. |
manual_archived_agent
| Content | Generated when |
|---|
| %agent% archived the chat | Agent closed chat via the Deactivate Chat request. |
manual_archived_customer
| Content | Generated when |
|---|
| %customer% archived the chat | Customer closed chat via the Deactivate Chat request. |
rating.chat_commented
| Content | Generated when |
|---|
| %customer% left the following comment: %comment% | Chat was commented by customer. |
rating.chat_rated
| Content | Generated when |
|---|
| %customer% rated the chat as %score% | Chat was rated by customer. |
rating.chat_rating_canceled
| Content | Generated when |
|---|
| %customer% canceled the chat rating | Chat rating was cancelled by customer. |
routing.archived_deleted
| Content | Generated when |
|---|
| The chat was closed because %agent% account had been deleted | Chat was archived after agent was removed from the license. No other agent could be selected, and queues were disabled. |
routing.archived_disconnected
| Content | Generated when |
|---|
| The chat was closed because %agent% had lost internet connection | Chat was archived after agent unexpectedly lost connection. No other agent could be selected, and queues were disabled. |
routing.archived_inactive
| Content | Generated when |
|---|
| Chat archived due to %duration% minutes of inactivity | No new messages were posted for an extended amount of time. |
routing.archived_offline
| Content | Generated when |
|---|
| Chat archived due to no available agents | No agent could be selected after chat was placed in the queue. |
routing.archived_other
| Content | Generated when |
|---|
| The chat was closed | Chat was archived after agent was removed from chat for other reasons. No other agent could be selected, and queues were disabled. |
routing.archived_remotely_signed_out
| Content | Generated when |
|---|
| The chat was closed because %agent% had been remotely signed out | Chat was archived after an agent was logged out. No other agent could be selected and queues were disabled. |
routing.archived_signed_out
| Content | Generated when |
|---|
| The chat was closed because %agent% had signed out | Chat was archived after agent logged out. No other agent could be selected, and queues were disabled. |
routing.assigned_deleted
| Content | Generated when |
|---|
| Chat assigned to %agent_added% because %agent_removed% account had been deleted | Chat was assigned to a new agent after the previous one was removed from the license. |
routing.assigned_disconnected
| Content | Generated when |
|---|
| Chat assigned to %agent_added% because %agent_removed% had lost internet connection | Chat was assigned to a new agent after the previous one unexpectedly lost connection. |
routing.assigned_inactive
| Content | Generated when |
|---|
| Chat assigned to %agent_added% because %agent_removed% hasn't replied in %duration% minutes | Chat was assigned to a new agent after the previous one failed to response in a timely manner. |
routing.assigned_other
| Content | Generated when |
|---|
| The chat was closed | Chat was archived after agent was removed from chat for other reasons. No other agent could be selected, and queues were disabled. |
routing.assigned_remotely_signed_out
| Content | Generated when |
|---|
| Chat assigned to %agent_added% because %agent_removed% had been remotely signed out | Chat was assigned to a new agent after the previous one was logged out. |
routing.assigned_signed_out
| Content | Generated when |
|---|
| Chat assigned to %agent_added% because %agent_removed% had signed out | Chat was assigned to a new agent after the previous one logged out. |
routing.idle
| Content | Generated when |
|---|
| Chat is idle due to %duration% minutes of inactivity | No new messages were posted for an extended amount of time. |
routing.unassigned_deleted
| Content | Generated when |
|---|
| Customer was queued because %agent% account has been deleted | Chat was queued after agent was removed from the license. |
routing.unassigned_disconnected
| Content | Generated when |
|---|
| Customer was queued because %agent% had lost internet connection | Chat was queued after agent unexpectedly lost connection. |
routing.unassigned_other
| Content | Generated when |
|---|
| Chat is unassigned | Chat was queued after agent was removed from chat for other reasons. |
routing.unassigned_remotely_signed_out
| Content | Generated when |
|---|
| Customer was queued because %agent% had been remotely signed out | Chat was queued after agent was logged out. |
routing.unassigned_signed_out
| Content | Generated when |
|---|
| Customer was queued because %agent% had signed out | Chat was queued after agent logged out. |
system_archived
| Content | Generated when |
|---|
| Chat archived | License was moved to another lc_serv instance while there were still active chats. |
transcript_requested
| Content | Generated when |
|---|
| %customer% requested the chat transcript to be sent to %email% | Customer enables transcript. |
transcript_sent
| Content | Generated when |
|---|
| %customer% sent the chat transcript to %email% | Chat ended with the chat transcript enabled by customer. |
Contact us
Your questions and feedback are welcome! Send us an email at developers@text.com.