Send Inbound Message Interactions

Sends inbound messaging-related interactions from external end-user clients to Salesforce. Sample interactions include static content messages, typing start and stop indicators, message send failures, and file attachments.

This API applies to the following products:

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

This API is available in version 61.0 and later.

Configure Interactions APIs to send inbound messaging-related interactions to Salesforce. The Interactions API supports inbound messages, inbound file attachments, start and stop typing indicators, and failure notifications. For example, call the Interactions API whenever an end user sends a message or file attachment to Salesforce.

The Interactions API request payload includes details about the conversation channel that’s associated with the interaction, the end user that sent the interaction, the interaction type (interactionType), and the entry type (entryType), if applicable, along with its details.

When an interaction is initiated, call the Interactions API to notify Salesforce of the interaction, passing in the conversation channel address identifier (to) and end user client identifier (from). For example, call the Interactions API when an end user sends a message or file attachment to Salesforce.

If a conversation corresponding to the passed-in conversation channel address identifier and end user client identifier exists, the interaction is associated with the conversation and the existing conversationIdentifier value is returned. If a conversation corresponding to the passed-in conversation channel address identifier and end user client identifier doesn’t exist, a conversation is created, a MessagingSession record is created, a MessagingEndUser record is created, and a new conversationIdentifier value is returned.

A workItemId value is also returned. The workItemId represents the ID of the new or existing MessagingSession record that's associated with the conversation.

For Bring You Own Channel for CCaaS, message routing is handled based on how it's configured:

  • If message routing is Salesforce-owned and routing is Omni-Flow based (Routing Type is Omni-Flow), the specified Omni-Channel flow definition is used to route inbound messages and file attachments to the next available rep or queue. If routing fails, Salesforce uses the specified fallback queue.
  • If message routing is Salesforce-owned and routing is queue-based (Routing Type is Omni-Queue), the specified queue is used to route inbound messages and file attachments.
  • If message routing is handled by the partner system, subscribe to the Pub/Sub API to listen to the routingRequested event.

The Interactions APIs support start and stop typing indicators, which are used to notify reps when an end user starts and stops typing during a conversation.

If any of the interactions fail, ignore the failure or forward failures by sending the Interactions API request with entry type MessageDeliveryFailed, along with recipient, and optional error code (errorCode) and error message (errorMessage) details.

The interaction type determines whether the interaction is a message-related entry (EntryInteraction) or a file attachment (AttachmentInteraction). If the interaction type is EntryInteraction, the entry type determines the kind of message entry, such as Message, TypingStartedIndicator, TypingStoppedIndicator, or MessageDeliveryFailed.

InteractionInteraction Type (interactionType)Entry Type (entryType)Description
MessageEntryInteractionMessageSends a message from the external end user on the client side to Salesforce.
File AttachmentAttachmentInteractionn/aSends a file attachment from the end user on the client side to Salesforce.
Typing Started IndicatorEntryInteractionTypingStartedIndicatorSends a typing started indicator from the end user on the client side to Salesforce.
Typing Stopped IndicatorEntryInteractionTypingStoppedIndicatorSends a typing stopped indicator from the end user on the client side to Salesforce.
Message Delivery FailedEntryInteractionMessageDeliveryFailedNotifies Salesforce when an inbound message interaction request fails.