Using attached data
Attached data is a feature in Sinch Contact Pro that enables you to add and process attached data within all channels: voice, email and chat.
The data can be used, for example, for identifying a customer in a CRM or pinpointing a web page from which the customer started the chat.
The form of data is typically a key-value pair, for example customerId:"1234567", customerType:"gold", which is shown in a user-friendly format in Communication Panel.
Terminology
Several terms are used to refer to the data added to a conversation: CAD
, contact/call
attached data
, attached data
, and extra data
. Communication Panel uses
Attached Data. In System Configurator, the settings to
configure attached data in the channel settings is Extra Data
whereas IVR, reporting, and Visitor Intermediate Client API use Call
Attached Data and CAD. Sinch Conversation API
uses metadata
.
Voice channel
Typically attached data in the voice channel is with an IVR (interactive voice response) service. The purpose is to collect data from customers, for example a CRM account and customer ID. For attached data in the IVR, see the topic IVR Management > IVR Examples > Example: Passing Call Attached Data (CAD) from IVR to Queue. in the System Configurator (SC) document.
Email channel
Email conversations via an email server don’t support adding or storing attached data. However, you can generate tasks that use the email channel via a restful interface which supports attached data. For more information, see Sinch Contact Center Restful Task Interface (RTI) API documentation.
Chat channel
Attached Data via Sinch Conversation API
Conversation API metadata feature is the same as attached data in Sinch Contact Pro. The metadata feature is available for all Conversation API channels and enables you to add data when posting a conversation or posting a new message to a conversation. For more information, see Conversation API documents.
When adding the key-value pair, use metadata instead of message_metadata. However, for backward compatibility reasons message_metadata works as well. For more information, see Inbound message in Conversation API.
Attached Data via Web Chat (Visitor Intermediate Client CVC)
A name and an email address are automatically part of attached data. You can either configure the visitor chat so that customers have to enter them or insert them automatically with the cvc.setUser("test","test@test.com") command. You can also insert any attached data to a web chat conversation via the Visitor Intermediate Client (CVC) API. The CVC API can be used with web chat and launchpad widgets.
Note that in case of a web chat, the attached data should be inserted before chat session is started. Updating attached data during a web chat conversation is not supported.
Saving attached data
You can configure Sinch Contact Pro to save attached data in history. Stored attached data can be used, for example, for reporting or machine learning purposes. Saving attached data in the database is supported with phone and chat channels but by default nothing is saved to avoid storing sensitive information. Before enabling storing in , check your local legal requirements regarding data protection and privacy.
Example
A conversation has the following attached data: customerId:"1234567", customerType:"gold"
The Extra Data Included in Statistics setting has the value: customerType.
- A Communication Panel agent sees both customerId and customerType in the Conversation Details view when handling an active conversation. CustomerId will disappear from the system when the agent ends the conversation in Communication Panel.
- If the same conversation is viewed via the History view after the conversation has ended, only the history stored data (in this case customerType) is shown. The volume report Contact Log will have the customerType information once the reporting job has successfully run.
For information about storing attached data, see Saving Extra Data in the System Configurator (SC) document.
CMI/contactData
The restful interface (RI) resource CMI/contactData enables you to run GET and POST commands for attached data per conversation. To use the contactData resource, you need the rights to manage contacts for the queue.
With the GET commands you can fetch attached data that is stored in the database. If the data is not stored as explained in the previous section, it’s not available over the RI.
The POST command is limited for updating data for conversations that are in the wrap-up or handled state. The data posted via RI will be available for reporting purposes as data can be saved only for ended conversations. The data is available only in the History view of Communication Panel.
SAP Service Cloud (C4C)
Sinch Contact Pro is able to pass attached data as is to SAP Service Cloud (C4C) version 1 for further use. For more information, see SAP documentation Phone Events and Payload.
All the attached data is passed but to consume attached data parameters in SAP Service Cloud (C4C) version 1 as per their documentation, define key-value pairs as custom_1 to custom_4, for example:
Key | Value |
---|---|
Custom_1 | red |
Custom_2 | blue |
Custom_3 | green |
Custom_4 | yellow |
Otherwise handling of attached data, such as saving data in Sinch Contact Pro, follows the logic presented in this documentation.