Newer Version Available

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

MessagingChannel

Represents the metadata associated with an Embedded Service Messaging channel.

Where possible, we changed noninclusive terms to align with our company value of Equality. We maintained certain terms to avoid any effect on customer implementations.

Important

Parent Type

This type extends the Metadata metadata type and inherits its fullName field.

File Suffix and Directory Location

MessagingChannel components have the suffix messagingChannel and are stored in the messagingChannels folder.

Version

MessagingChannel components are available in API version 55.0 and later.

Special Access Rules

This type is available if your org has the “Configure Messaging” and “View Setup and Configuration” permissions for Messaging enabled.

Fields

Field Name Description
automatedResponses
Field Type
MessagingAutoResponse[]
Description
The auto-responses associated with the messaging channel.
customParameters
Field Type
MessagingChannelCustomParameter[]
Description
The custom parameters associated with the messaging channel.
description
Field Type
string
Description
The channel description.
masterLabel
Field Type
string
Description

Required. The channel label.

messagingChannelType
Field Type
MessagingChannelType (enumeration of type string)
Description

Required. Values are:

  • EmbeddedMessaging
  • Voice—Available in API version 58.0 and later.
Salesforce’s third-party Messaging channels, such as WhatsApp and Facebook Messenger, don’t use this metadata type.
sessionHandlerFlow
Field Type
string
Description
The Omni-Channel flow used to route the channel’s messaging sessions.
sessionHandlerQueue
Field Type
string
Description

Required. The queue used to route messages. If a sessionHandlerFlow is also selected, sessionHandlerQueue is the fallback queue used if a message can’t be routed using the selected flow.

sessionHandlerType
Field Type
MessagingSessionHandlerType (enumeration of type string)
Description

Required. The method used to route messages in the channel. Values are:

  • Flow
  • Queue
standardParameters
Field Type
MessagingChannelStandardParameter[]
Description
Parameters added to the messaging channel.

MessagingAutoResponse

Represents an automatic response used in a channel.

Field Name Description
response
Field Type
string
Description

Required. The text of the response.

type
Field Type
MessagingAutoResponseType (enumeration of type string)
Description

Required. The type of response, which affects when it’s used in a messaging session. Values are:

  • AgentEndEngagementResponse
  • AgentEngagedResponse
  • InitialResponse

MessagingChannelCustomParameter

Represent a custom parameter added to a channel.

Field Name Description
actionParameterMappings
Field Type
MessagingChannelActionParameterMapping[]
Description
The mapping used to map the parameter value to a flow or task.
externalParameterName
Field Type
string
Description

Required. The external name of the parameter.

masterLabel
Field Type
string
Description

Required. The label of the parameter.

maxLength
Field Type
int
Description
The maximum length of the parameter value.
name
Field Type
string
Description

Required. The name of the parameter.

parameterDataType
Field Type
FlowDataType (enumeration of type string)
Description

Required. The format of the parameter. Values are:

  • Apex
  • Boolean
  • Currency
  • Date
  • DateTime
  • Multipicklist
  • Number
  • Picklist
  • SObject
  • String

MessagingChannelActionParameterMapping

Represents a mapping between a parameter and an Omni-Channel flow or agent task.

Field Name Description
actionParameterName
Field Type
string
Description

Required. The name of the flow that the custom or standard parameters are mapped to.

MessagingChannelStandardParameter

Represents a standard parameter used to pass information into a channel.

Field Name Description
actionParameterMappings
Field Type
MessagingChannelActionParameterMapping[]
Description
The mapping associated with the parameter.
externalInteractionId
Field Type
MessagingChannelStandardParameterType (enumeration of type string)
Description
An ID assigned to the external interaction, such as a campaign ID.
externalInteractionName
Field Type
MessagingChannelStandardParameterType (enumeration of type string)
Description
The name of the external interaction, such as a campaign name.
externalInteractionType
Field Type
MessagingChannelStandardParameterType (enumeration of type string)
Description
The type of external interaction, such as MarketingCampaign.
parameterType
Field Type
MessagingChannelStandardParameterType (enumeration of type string)
Description

Required. The type of parameter. Values are:

  • Email
  • FirstName
  • LastName
  • Subject

Declarative Metadata Sample Definition

The following is an example of a MessagingChannel component. This messaging channel passes custom and standard parameters from the messaging channel to a flow, and it routes to a flow with a fallback queue.

1<?xml version="1.0" encoding="UTF-8"?>
2<MessagingChannel xmlns="http://soap.sforce.com/2006/04/metadata">
3    <automatedResponses>
4        <response>Hello there!</response>
5        <type>InitialResponse</type>
6    </automatedResponses>
7    <automatedResponses>
8        <response>Your agent is looking into the issue now.</response>
9        <type>AgentEngagedResponse</type>
10    </automatedResponses>
11    <automatedResponses>
12        <response>Bye!</response>
13        <type>AgentEndEngagementResponse</type>
14    </automatedResponses>
15    <customParameters>
16        <actionParameterMappings>
17            <actionParameterName>Flow_PhoneNumber</actionParameterName>
18        </actionParameterMappings>
19        <externalParameterName>PhoneNumber</externalParameterName>
20        <masterLabel>Phone Number</masterLabel>
21        <name>PhoneNumber</name>
22        <parameterDataType>Number</parameterDataType>
23    </customParameters>
24    <masterLabel>Initial Message</masterLabel>
25    <messagingChannelType>EmbeddedMessaging</messagingChannelType>
26    <sessionHandlerFlow>FlowName</sessionHandlerFlow>
27    <sessionHandlerQueue>FallbackQueueName</sessionHandlerQueue>
28    <sessionHandlerType>Flow</sessionHandlerType>
29    <standardParameters>
30        <actionParameterMappings>
31            <actionParameterName>Flow_LastName</actionParameterName>
32        </actionParameterMappings>
33        <parameterType>LastName</parameterType>
34    </standardParameters>
35    <standardParameters>
36        <actionParameterMappings>
37            <actionParameterName>Flow_FirstName</actionParameterName>
38        </actionParameterMappings>
39        <parameterType>FirstName</parameterType>
40    </standardParameters>
41    <standardParameters>
42        <actionParameterMappings>
43            <actionParameterName>Flow_Email</actionParameterName>
44        </actionParameterMappings>
45        <parameterType>Email</parameterType>
46    </standardParameters>
47    <standardParameters>
48        <actionParameterMappings>
49            <actionParameterName>Flow_Subject</actionParameterName>
50        </actionParameterMappings>
51        <parameterType>Subject</parameterType>
52    </standardParameters>
53</MessagingChannel>

If you route the messaging channel to a queue, there’s no fallback flow.

1<?xml version="1.0" encoding="UTF-8"?>
2<MessagingChannel xmlns="http://soap.sforce.com/2006/04/metadata">
3    <masterLabel>EmbeddedChannel2</masterLabel>
4    <messagingChannelType>EmbeddedMessaging</messagingChannelType>
5    <sessionHandlerQueue>DemoQueueName</sessionHandlerQueue>
6    <sessionHandlerType>Queue</sessionHandlerType>
7</MessagingChannel>

The following is an example package.xml that references the previous definition.

1<?xml version="1.0" encoding="UTF-8"?>
2<Package xmlns="http://soap.sforce.com/2006/04/metadata">
3    <types>
4        <members>*</members>
5        <name>MessagingChannel</name>
6    </types>
7    <version>55.0</version>
8</Package>

Wildcard Support in the Manifest File

This metadata type supports the wildcard character * (asterisk) in the package.xml manifest file. For information about using the manifest file, see Deploying and Retrieving Metadata with the Zip File.