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 Messaging
- Bring Your Own Channel for Contact Center as a Service
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.
If message routing is Salesforce-owned, Salesforce uses the Omni-Channel flows to route inbound messages and file attachments to the next available rep. If message routing is handled by a 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, you can notify Salesforce to log the failures, which the partner can choose to ignore or configure to send delivery failed messages.
The interaction type combined with the entry type determines the type of messaging interaction that’s sent to Salesforce. The interaction type (interactionType
) determines whether the interaction is a message entry or action (EntryInteraction
) or a file attachment (AttachmentInteraction
). If the interaction type is EntryInteraction
, the entry type (entryType
) determines the kind of message entry or action.
Interaction | Interaction Type (interactionType) | Entry Type (entryType) | Description |
---|---|---|---|
Message | EntryInteraction | Message | Sends a message from the external end user on the client side to Salesforce. |
File Attachment | AttachmentInteraction | n/a | Sends a file attachment from the end user on the client side to Salesforce. |
Typing Started Indicator | EntryInteraction | TypingStartedIndicator | Sends a typing started indicator from the end user on the client side to Salesforce. |
Typing Stopped Indicator | EntryInteraction | TypingStoppedIndicator | Sends a typing stopped indicator from the end user on the client side to Salesforce. |
Message Delivery Failed | EntryInteraction | MessageDeliveryFailed | Notifies Salesforce when an inbound message interaction event fails. |
- GitHub: Interaction Service APIs
- Pub/Sub API