Establish a Conversation

Establishes a conversation and generates a conversation ID (conversationIdentifier).

The conversation channel address identifier (channelAddressIdentifier) combined with the end user client identifier (participants.subject) creates a new conversation.

If the API request doesn’t find a conversation corresponding to the passed in conversation channel and end user client identifier, a new conversation is created and a new conversationIdentifier value is returned.

If the API request finds a conversation corresponding to the conversation channel address identifier and end user client identifier that’s passed in, the existing conversationIdentifier value is returned.

The conversationIdentifier value is used by other Interaction Service APIs to perform tasks, such as route conversations, create AgentWork records, and send historical conversation entries.

This API applies to the following products:

  • Bring Your Own Channel for Messaging
  • Bring Your Own Channel for Contact Center as a Service

This API is available in version 61.0 and later.

v1/conversation

POST

Authorization: Bearer <Salesforce access token>
String. Standard header. The authorization token, where \<token\> is the JSON Web Token (JWT). Required.

Content-Type: <Request body format>
String. Standard header. The format of the request body. Valid format is multipart/form-data. Required.

OrgId: <Salesforce Org Id>
String. Standard header. The 15-character Org ID of the Salesforce org. Required.

AuthorizationContext: <ConversationChannel Definition developer name>
String. Standard header. The ConversationChannelDefinition developer name in the format {prefix}_{ConversationChannelDefinitionName}. The prefix must match the developer name prefix of the corresponding connected app. For example, Partner1_ChannelDefinition1. Required.

RequestId: <GUID>
String. Standard header. A globally unique ID (GUID). Required.

For example,

Property NameTypeDescriptionRequired
channelAddressIdentifierstringThe globally unique ID for the conversation channel (MessagingChannel.ChannelAddressIdentifier).Yes
participantsstringA list of end user and rep participants in the conversation.Yes
participants.subjectstringThe end user client identifier.Yes
participants.rolestringThe role within the conversation. Set this value to EndUser.Yes
participants.appTypestringThe app type used for the conversation. Set this value to custom to represent a custom channel.Yes