---
schema_version: "1"
id: 1f414d96b0d1c2d08d1543e937be614471ff5c710562970fccfaec48f688dd05
title: MessagingChannel
collection: legacydeveloper
version: current
locale: en-us
portal_url: https://docs.salesforce.com/legacydeveloper/current/en-us/api_meta/meta_messagingchannel.md
canonical_url: https://developer.salesforce.com/docs/atlas.en-us.api_meta.meta/api_meta/meta_messagingchannel.htm
source_site: developer.salesforce.com
content_type: documentation
content_hash: 510cce890ff961f57667d6b53427418f14b5d401c4a2c874c95f471e14170e4f
description: Represents the metadata associated with an Embedded Service Messaging channel.
---
# MessagingChannel

Represents the metadata associated with an Embedded Service Messaging channel.

![Important](https://developer.salesforce.com/docs/atlas.en-us.api_meta.meta/api_meta/images/icon_note_important.png)

#### Important

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.

## Parent Type

This type extends the [Metadata](https://developer.salesforce.com/docs/atlas.en-us.api_meta.meta/api_meta/metadata.htm "The base class for all metadata types. You can’t edit this object. A component is an instance of a metadata type.") 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\[\]](#MessagingAutoResponse)

Description

The auto-responses associated with the messaging channel.



 |
| channelUsages | 

Field Type

[MessagingChannelUsage\[\]](#MessagingChannelUsage)

Description

The deployment types and consent configuration for the messaging channel. Available in API version 62.0 and later.



 |
| countryCode | 

Field Type

string

Description

The ISO country code for the messaging channel. Available in API version 62.0 and later.



 |
| customParameters | 

Field Type

[MessagingChannelCustomParameter\[\]](#MessagingChannelCustomParameter)

Description

The custom parameters associated with the messaging channel.



 |
| description | 

Field Type

string

Description

The channel description.



 |
| embeddedConfig | 

Field Type

[EmbeddedConfig\[\]](#EmbeddedConfig)

Description

The settings associated with the messaging channel.



 |
| endUserIdleTimeout | 

Type

int

Properties

Create, Filter, Group, Nillable, Sort, Update

Description

The number of minutes of end-user inactivity until the conversation is automatically marked inactive. Valid values are from 5 through 30. Available in API version 66.0 and later.



 |
| externalAccountId | 

Field Type

string

Description

The external account identifier for the messaging channel. Available in API version 62.0 and later.



 |
| masterLabel | 

Field Type

string

Description

Required. The channel label.





 |
| messagingChannelType | 

Field Type

MessagingChannelType (enumeration of type string)

Description

Required. Values are:

- AppleMessagesForBusiness—Apple Messages for Business. Available in API version 65.0 and later.
- Custom—Bring Your Own Channel for Messaging or Bring Your Own Channel for CCaaS. Available in API version 61.0 and later.
- EmbeddedMessaging—Enhanced Chat.
- Facebook—Facebook Messenger. Available in API version 65.0 and later.
- Line—Line. Available in API version 65.0 and later.
- PstnVoice—Agentforce Voice (PSTN). Available in API version 65.0 and later.
- Text—SMS. Available in API version 65.0 and later.
- SipVoice—Represents an Agentforce Voice channel that uses SIP. Available in API version 65.0 and later.
- Voice—Service Cloud Voice. Available in API version 58.0 and later.
- WhatsApp—WhatsApp. Available in API version 65.0 and later.
- WhatsAppVoice—Available in API version 65.0 and later.

Third-party Messaging channels in Salesforce, such as WhatsApp and Facebook Messenger, don’t use this metadata type.



 |
| messagingKeywords | 

Field Type

[MessagingKeyword\[\]](#MessagingKeyword)

Description

Keywords associated with the messaging channel.



 |
| platformKey | 

Field Type

string

Description

The platform key for the messaging channel. Available in API version 62.0 and later.



 |
| queueRoutingConfig | 

Field Type

string

Description

The queue routing configuration for the messaging channel. Available in API version 64.0 and later.



 |
| 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:

- AgentforceServiceAgent
- Flow
- Queue
- User





 |
| sessionHandlerUser | 

Field Type

string

Description

The user to handle routing for the messaging channel. Available in API version 62.0 and later.



 |
| standardParameters | 

Field Type

[MessagingChannelStandardParameter\[\]](#MessagingChannelStandardParameter)

Description

Parameters added to the messaging channel.



 |

## EmbeddedConfig

Represents settings specific to an embedded messaging channel.

| Field Name | Description |
| --- | --- |
| isEstimatedWaitTimeEnabled | 
Field Type

Boolean

Description

Indicates whether estimated wait time is enabled. The default value is false.



 |
| authMode | 

Field Type

EmbeddedServiceAuthModeType (enumeration of type string)

Description

Required. Auth/UnAuth Mode Types For Embedded Chat. Valid values are:

- Auth
- UnAuth





 |
| verifiedUserJwtExpirationTime | 

Field Type

Integer

Description

If authMode is set to true, this value represents the JWT expiry value in minutes.



 |
| anonymousUserJwtExpirationTime | 

Field Type

Integer

Description

If authMode is set to false, this value represents the JWT expiry value in minutes.



 |
| isAttachmentUploadEnabled | 

Field Type

Boolean

Description

Indicates whether inbound file attachments are allowed. The default value is false.



 |
| isSaveTranscriptEnabled | 

Field Type

Boolean

Description

Indicates whether transcripts can be downloaded. The default value is false.



 |
| messagingAuthorizations | 

Field Type

MessagingAuthorization

Description

Represents authorization settings specific to a given MessagingChannel.



 |

## MessagingAuthorization

This junction entity stores the messaging channel authorization for a Messaging Channel (Embedded Messaging Channel). On this entity, we configure different authorization methods supported by the Messaging for In-App and Web \`(Embedded Messaging) channel. This entity is available in API version 62.0 or later.

| Field Name | Description |
| --- | --- |
| authIdentifier | 
Field Type

String

Description

Required. Represents an identifier for the MessagingAuthorization entity. The value must begin with a letter. Only alphanumeric characters and \_ are allowed.



 |
| authProviderName | 

Field Type

String

Description

This field should never be set. Although this field is exposed, it isn't supported. The field represents the name of the AuthProvider that’s referenced in the MessagingAuthorization. It’s a required field if authorizationType is set to AuthProvider.



 |
| authorizationType | 

Field Type

MessagingAuthorizationType (enumeration of type string)

Description

Required. Indicates whether MessagingAuthorization has been configured to reference a PublicKeyCertificateSet or an AuthProvider. Valid values are:

- PublicKeyCertificateSet - Indicates that a PublicKeyCertificateSet is referenced in the MessagingAuthorization entity. This is the only option that will lead to a fully functional User Verification setup.
- AuthProvider - This option should never be selected. It indicates that an AuthProvider is referenced in the MessagingAuthorization, but we don’t support it.





 |
| enabled | 

Field Type

Boolean

Description

Indicates whether messaging authorization is enabled. Defaults to false.



 |
| publicKeyCertificateSetName | 

Field Type

String

Description

Name of the public key certificate set that's referenced in the MessagingAuthorization entity. This is a required field if authorizationType is set to PublicKeyCertificateSet.



 |

## MessagingAutoResponse

Represents an automated response used in a channel.

| Field Name | Description |
| --- | --- |
| autoResponseContentType | 
Field Type

string

Description

The content type of the auto-response: TextResponse or MessageDefinition.



 |
| language | 

Field Type

string

Description

The language of the auto response.



 |
| messageDefinitionName | 

Field Type

string

Description

The name of the messaging component.



 |
| response | 

Field Type

string

Description

The text of the auto response.



 |
| responseTimeoutInMins | 

Field Type

integer

Description

The number of minutes after which a response can no longer be sent. The value can range from 5 to 60.



 |
| type | 

Field Type

MessagingAutoResponseType (enumeration of type string)

Description

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

- AgentEndEngagementResponse
- AgentEngagedResponse
- CustomResponse (Available in API version 65.0 and later.)
- DoubleOptInPrompt (Available in API version 65.0 and later.)
- EndUserIdleResponse (Available in API version 65.0 and later.)
- EndUserInactiveResponse (Available in API version 65.0 and later.)
- HelpResponse (Available in API version 65.0 and later.)
- InitialResponse
- OptInConfirmation (Available in API version 65.0 and later.)
- OptInPrompt (Available in API version 65.0 and later.)
- OptOutConfirmation (Available in API version 65.0 and later.)
- RerouteResponse (Available in API version 68.0 and later.)





 |

## MessagingChannelCustomParameter

Represent a custom parameter added to a channel.

| Field Name | Description |
| --- | --- |
| actionParameterMappings | 
Field Type

[MessagingChannelActionParameterMapping\[\]](#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
- Time





 |

## 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\[\]](#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





 |

## MessagingChannelUsage

Represents the deployment type and consent configuration for a messaging channel. Available in API version 62.0 and later.

| Field Name | Description |
| --- | --- |
| channelConsentType | 
Field Type

MessagingChannelConsentType (enumeration of type string)

Description

Optional. The consent type for the messaging channel. Values are:

- ImplicitOptIn
- ExplicitOptIn
- DoubleOptIn





 |
| deploymentType | 

Field Type

MessagingChannelUsageDeploymentType (enumeration of type string)

Description

Required. The deployment type for the messaging channel. Values are:

- DigitalEngagementConversation
- UnifiedConversation
- MessagingEngagement
- MarketingJourneyBuilder





 |

## MessagingKeyword

Represents settings specific to an EmbeddedMessaging MessagingChannel. Available in API version 62 or later.

| Field Name | Description |
| --- | --- |
| keywordType | 
Field Type

MessagingKeywordType (enumeration of type string)

Description

Required. The type of messaging keyword for the auto response. Valid values are:

- OptIn
- DoubleOptIn
- OptOut
- Help
- Custom





 |
| language | 

Field Type

String

Description

Required. The language of the messaging keyword



 |
| keyword | 

Field Type

String

Description

The messaging keyword value.



 |

## 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.

<?xml version="1.0" encoding="UTF-8"?>
<MessagingChannel xmlns="http://soap.sforce.com/2006/04/metadata">
    <description\>Test in-app messaging channel</description\>
    <masterLabel\>TestInAppChannel</masterLabel\>
    <messagingChannelType\>EmbeddedMessaging</messagingChannelType\>
    <sessionHandlerQueue\>Demo\_Queue</sessionHandlerQueue\>
    <sessionHandlerType\>Queue</sessionHandlerType\>
    <embeddedConfig\>
        <authMode\>Auth</authMode\>
        <isAttachmentUploadEnabled\>true</isAttachmentUploadEnabled\>
        <isSaveTranscriptEnabled\>false</isSaveTranscriptEnabled\>
        <isEstimatedWaitTimeEnabled\>false</isEstimatedWaitTimeEnabled\>
        <verifiedUserJwtExpirationTime\>360</verifiedUserJwtExpirationTime\>
        <messagingAuthorizations\>
            <authorizationType\>PublicKeyCertificateSet</authorizationType\>
            <authProviderName\></authProviderName\>
            <publicKeyCertificateSetName\>pcks1</publicKeyCertificateSetName\>
            <enabled\>false</enabled\>
            <authIdentifier\>auth\_identifier\_one</authIdentifier\>
        </messagingAuthorizations\>
    </embeddedConfig\>
    <automatedResponses\>
        <autoResponseContentType\>MessageDefinition</autoResponseContentType\>
        <messageDefinitionName\>Sample</messageDefinitionName\>
        <type\>EndUserInactiveResponse</type\>
        <responseTimeoutInMins\>10</responseTimeoutInMins\>
    </automatedResponses\>
    <automatedResponses\>
        <autoResponseContentType\>MessageDefinition</autoResponseContentType\>
        <messageDefinitionName\>Sample</messageDefinitionName\>
        <type\>InitialResponse</type\>
    </automatedResponses\>
    <automatedResponses\>
        <autoResponseContentType\>MessageDefinition</autoResponseContentType\>
        <messageDefinitionName\>Sample</messageDefinitionName\>
        <type\>AgentEndEngagementResponse</type\>
    </automatedResponses\>
    <automatedResponses\>
        <autoResponseContentType\>MessageDefinition</autoResponseContentType\>
        <messageDefinitionName\>Sample</messageDefinitionName\>
        <type\>AgentEngagedResponse</type\>
    </automatedResponses\>
    <automatedResponses\>
        <autoResponseContentType\>TextResponse</autoResponseContentType\>
        <language\>en\_US</language\>
        <response\>You've opted out of receiving messages from us, so we won't contact you again.</response\>
        <type\>OptOutConfirmation</type\>
    </automatedResponses\>
    <automatedResponses\>
        <autoResponseContentType\>TextResponse</autoResponseContentType\>
        <language\>en\_US</language\>
        <response\>Custom response1</response\>
        <type\>CustomResponse</type\>
    </automatedResponses\>
    <automatedResponses\>
        <autoResponseContentType\>TextResponse</autoResponseContentType\>
        <language\>en\_US</language\>
        <response\>Opt In Confirmation response</response\>
        <type\>OptInConfirmation</type\>
    </automatedResponses\>
    <automatedResponses\>
        <autoResponseContentType\>TextResponse</autoResponseContentType\>
        <language\>en\_US</language\>
        <response\>Text STOP to opt out of further messages.</response\>
        <type\>HelpResponse</type\>
    </automatedResponses\>
    <messagingKeywords\>
        <keyword\>stopall</keyword\>
        <keyword\>cancel</keyword\>
        <keyword\>stop</keyword\>
        <keyword\>unsubscribe</keyword\>
        <keyword\>end</keyword\>
        <keyword\>quit</keyword\>
        <keywordType\>OptOut</keywordType\>
        <language\>en\_US</language\>
    </messagingKeywords\>
    <messagingKeywords\>
        <keyword\>help</keyword\>
        <keywordType\>Help</keywordType\>
        <language\>en\_US</language\>
    </messagingKeywords\>
    <messagingKeywords\>
        <keyword\>customkeyword1</keyword\>
        <keywordType\>Custom</keywordType\>
        <language\>en\_US</language\>
    </messagingKeywords\>
    <messagingKeywords\>
        <keyword\>OptInkeyword1</keyword\>
        <keywordType\>OptIn</keywordType\>
        <language\>en\_US</language\>
    </messagingKeywords\>
</MessagingChannel\>

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

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

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

<?xml version="1.0" encoding="UTF-8"?>
<Package xmlns="http://soap.sforce.com/2006/04/metadata">
    <types\>
        <members\>\*</members\>
        <name\>MessagingChannel</name\>
    </types\>
    <version\>55.0</version\>
</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](https://developer.salesforce.com/docs/atlas.en-us.api_meta.meta/api_meta/file_based_zip_file.htm "The deploy() and retrieve() calls are used to deploy and retrieve a .zip file. Within the .zip file is a project manifest (package.xml) that lists what to retrieve or deploy, and one or more XML components that are organized into folders.").