Newer Version Available

This content describes an older version of this product. View Latest

Send Conversation Messages Actions

Send a messaging component to users in enhanced WhatsApp, enhanced Apple Messages for Business, or Messaging for In-App channels when the targeted channel has bandwidth. Each Send Conversation Messages action corresponds to a supported messaging component.

This object is available in API version 59.0 and later.

On invocation, this action inserts and enqueues a message for handling the request and sending out the messages async. The request record can be used to track the progress.

Typical use cases include:

  • Confirmation of a purchase or booking
  • Shipping or delivery updates
  • Password reset requests
  • Account verification messages
  • Payment reminders
  • Abandoned cart reminders

Currently, 200 invocations of the Send Conversation Messages action can be in progress at the same time. If this limit is reached, additional requests are queued and sent when the number of in-progress requests falls below 200. For queued requests, the messaging session owner for automated messages is the Platform Integration User. Otherwise, it’s the user triggering the action.

Supported REST HTTP Methods

URI
/services/data/v59.0/actions/standard/sendConversationMessages
Formats
JSON, XML
HTTP Methods
GET, HEAD, POST
Authentication
Authorization: Bearer token

Inputs

Input Details
messageDefinitionName
Type
string
Description
The API name of a ConversationMessageDefinition record that's used to render the messages.
messagingDefinitionInputParameters
Type
list
Description
Optional. A collection of Apex richmessaging__MessageDefinitionInputParameter records that contain messaging component details to use when rendering messages.
requestType
Type
string
Description
Specifies the type of the request. Valid values are: SendNotificationMessages.
isEnforceMessagingChannelConsent
Type
boolean
Description
Indicates whether messaging consent must be verified after messages are queued for sending.
allowedSessionStatus
Type
string
Description
Limits the time when the message can be sent. Valid values are:
  • Any—Send the message whether the messaging user is engaged in a messaging session with the business or not.
  • NonActive—Send the message unless the messaging user is engaged in a messaging session with a status of Active. The message is sent after the session’s status changes.
  • Closed—Send the message unless the messaging user is engaged in a messaging session. The message is sent after the session is closed.
messagingEndUserIds
Type
list
Description
A collection of up to 100 messaging end user record IDs to use as recipients of the messages. To send more than 100 messages, divide your end user recipients into batches of 100 or fewer and repeat the action invocation for each batch.

Outputs

Input Details
requestId
Type
string
Description
The ID of the ConvMessageSendActionRequest record created by the request that's used to track the message progress.
messageIdentifiers
Type
list
Description
A collection of generated message UUIDs with one entry for each recipient specified in messagingUserIds.

Usage

Sample Input

The following sample input attempts to create a ConvMessageSendRequest record using a Messaging Component (messageDefinitionName), the request for the type of component being sent (requestType), the consent preferences (isEnforceMessagingChannelConsent), when the message can be sent (allowedSessionStatus), and the message recipients (messagingEndUserIds). Additionally, the request contains a list of custom parameters (messagingDefinitionInputParameters). These parameters are mapped to parameters configured in the messaging component, which can be optional. Applicable data types for parameters are textValue, recordIdValue, dateValue, dateTimeValue, numberValue, and booleanValue.

Sample Output

The following sample output illustrates a response after a successful request.

For more information about this action, see Flow Core Actions: Send Conversation Messages and Send Automated Messages in Enhanced Messaging Channels in Salesforce Help.