---
schema_version: "1"
id: b9b6f2375cfece53b7f0c63aee0526163003cff91ad1897f82652cdc20924aac
title: Send Inbound Message Interactions
collection: developer
version: current
locale: en-us
portal_url: https://docs.salesforce.com/developer/current/en-us/service-cloud/interaction-service-api/references/api-interaction-api.md
canonical_url: https://developer.salesforce.com/docs/service/interaction-service-api/references/interaction-service-reference/api-interaction-api.html
source_site: developer.salesforce.com
content_type: documentation
content_hash: a3380e971cd97ba7e928b7171c8bf9e92b59da425dfac729118b18d965a17669
products:
  - Interaction Service API
  - Service Cloud Developer Content
---
# 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.

## Interaction Types and Entry Types

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`.

| Interaction                                                            | Interaction Type (interactionType) | Entry Type (entryType) | Description                                                                          |
| :--------------------------------------------------------------------- | :--------------------------------- | :--------------------- | ------------------------------------------------------------------------------------ |
| [Message](https://developer.salesforce.com/docs/service/interaction-service-api/references/interaction-service-reference/interaction-type-message.md)                                 | EntryInteraction                   | Message                | Sends a message from the external end user on the client side to Salesforce.         |
| [File Attachment](https://developer.salesforce.com/docs/service/interaction-service-api/references/interaction-service-reference/interaction-type-file-attachment.md)                 | AttachmentInteraction              | n/a                    | Sends a file attachment from the end user on the client side to Salesforce.          |
| [Typing Started Indicator](https://developer.salesforce.com/docs/service/interaction-service-api/references/interaction-service-reference/interaction-type-message-typing-started.md) | EntryInteraction                   | TypingStartedIndicator | Sends a typing started indicator from the end user on the client side to Salesforce. |
| [Typing Stopped Indicator](https://developer.salesforce.com/docs/service/interaction-service-api/references/interaction-service-reference/interaction-type-message-typing-stopped.md) | EntryInteraction                   | TypingStoppedIndicator | Sends a typing stopped indicator from the end user on the client side to Salesforce. |
| [Message Delivery Failed](https://developer.salesforce.com/docs/service/interaction-service-api/references/interaction-service-reference/interaction-type-message-delivery-failed.md) | EntryInteraction                   | MessageDeliveryFailed  | Notifies Salesforce when an inbound message interaction request fails.               |

## See Also

- _GitHub_: [Interaction Service APIs](https://github.com/salesforce-misc/interaction-service-apis)
- [Pub\/Sub API](https://developer.salesforce.com/docs/platform/pub-sub-api/overview)
