Service Digital Engagement Channel Configure
Configures and deploys enhanced chat Messaging Channels for Messaging for In-App and Web (MIAW). Use when the user needs to create, deploy, and activate a messaging channel configured with Omni-Channel Flow, Omni-Channel Queue, User, or Agentforce Service Agent routing. Generates MessagingChannel metadata, deploys it to the target org, and activates the channel with User Verification, pre-chat forms, automated responses, consent settings, and all customizable channel options via Metadata API. TRIGGER when the user mentions messaging channel, MIAW, enhanced chat, in-app messaging, web messaging setup, or references a .messagingChannel-meta.xml file. DO NOT TRIGGER when the user is configuring legacy Live Agent chat, Embedded Service deployments without messaging, or standard Omni-Channel routing rules without a messaging channel.
- Skill ID
- forcedotcom/sf-skills/service-digital-engagement-channel-configure
- Publisher
- forcedotcom
- Repository
- sf-skills
- Installs
- 0
- Files
- 8
- Synced
- Sep 23, 2026
Open any RiverX project, open the Skills panel in the chat, and search for this identifier. The files are fetched from the source repository at install time.
forcedotcom/sf-skills/service-digital-engagement-channel-configureInstalls these files- SKILL.md
- assets/messaging_channel_template.xml
- examples/asa_agent_channel.xml
- examples/omni_flow_channel.xml
- examples/omni_queue_channel.xml
- references/channel_settings.md
- scripts/check-api-version.sh
- scripts/normalize-channel-name.sh
What this skill tells the agent
Configuring Enhanced Chat Channel
Creates MessagingChannel metadata XML for Salesforce Messaging for In-App and Web (MIAW). This skill produces a fully configured enhanced chat channel with routing, user verification, pre-chat, and automated response settings ready for Metadata API deployment.
Scope
- In scope: Creating
MessagingChannelmetadata with Omni-Channel Flow routing, Omni-Channel Queue routing, or Agentforce Service Agent (ASA) routing; enabling User Verification; configuring all channel settings (pre-chat forms, automated responses, consent keywords, file attachments, custom parameters) - Out of scope: Creating the referenced Omni-Channel Flow/Queue definitions (use
automation-flow-generate), creating the Embedded Service Deployment (separate metadata type — useservice-digital-engagement-deployment-configure), creating permission sets for messaging (useplatform-permission-set-generate), configuring the Embedded Service Code Snippet
Clarifying Questions
Before generating, ask the user if not already clear:
- What is the channel name / label? (used for
masterLabeland file name) - What routing type? (Omni-Channel Flow, Omni-Channel Queue, User, or Agentforce Service Agent)
- What is the routing target? (Flow API name, Queue developer name, User ID, or ASA bot name)
- For Flow, User, or ASA routing: What is the fallback queue name?
- Should User Verification be enabled? (defaults to
trueper this skill) - Are there pre-chat form fields required? If so, which fields and types?
Required Inputs
Gather or infer before proceeding:
- Channel name: Used for
masterLabeland the file name (<Name>.messagingChannel-meta.xml) - Routing type: One of
Queue,Flow,User, orAgentforceServiceAgent - Routing target: The developer name of the queue, flow, user, or ASA bot
- Fallback queue (Flow, User, and ASA): The developer name of the fallback queue for escalation
- User verification: Whether to require JWT-based identity verification (default:
true)
Defaults unless specified:
messagingChannelType:EmbeddedMessagingauthMode:AuthchatAbandonmentTimeout:5(minutes)endUserIdleTimeOut:5(minutes)isAttachmentUploadEnabled:truemaxFileSize:5(MB)allowedFileTypes:bmp,csv,doc,docx,gif,jpg,pdf,png,tiff,txt,xls,xmlanonymousUserJwtExpirationTime:360(minutes, required for UnAuth, range 60-4320)verifiedUserJwtExpirationTime:60(minutes, required for Auth, range 60-240)isAbandonedChatsEnabled:falseisSaveTranscriptEnabled:falseisFallbackMessageEnabled:falseisEstimatedWaitTimeEnabled:falseisFileAttachmentExtUnrestricted:falseisQueuePositionEnabled:falseisSynchronousChatEnabled:falseisVoiceModeEnabled:false
Workflow
All steps are sequential. Do not skip or reorder.
Phase 1 — Gather Context
- Verify org API version — run
scripts/check-api-version.sh 67.0 <org-alias>and report any errors it returns. If the script fails, generate asfdx-project.jsonin the metadata output folder with"sourceApiVersion": "67.0".
- Collect inputs — confirm the channel label, routing type, routing target, and verification settings from the user per Clarifying Questions above.
- Determine file name — run
scripts/normalize-channel-name.sh "<LABEL>"and surface any errors it returns.
- Verify routing target exists — query the org to confirm the referenced routing target exists:
- For Queue:
sf data query --query "SELECT Id, DeveloperName FROM Group WHERE Type='Queue' AND DeveloperName='<QUEUE_NAME>'" --target-org <org-alias> - For Flow:
sf data query --query "SELECT Id, ApiName FROM FlowDefinitionView WHERE ApiName='<FLOW_NAME>' AND IsActive=true" --target-org <org-alias> - For User:
sf data query --query "SELECT Id, Username FROM User WHERE Id='<USER_ID>' AND IsActive=true" --target-org <org-alias> - For ASA:
sf data query --query "SELECT Id, DeveloperName FROM BotDefinition WHERE DeveloperName='<BOT_NAME>'" --target-org <org-alias> - Also verify the fallback queue exists (required for Flow, User, and ASA routing)
If any target is not found, inform the user and ask whether to create it. If the user confirms:
- For Queue: generate a
.queue-meta.xmlwithMessagingSessionas thequeueSobjecttype and deploy it before the channel. A new queue is unusable for routing without a `QueueRoutingConfig` — a channel deployed against a queue with none fails at session-start with "Agents are not available. Try again later," even though the channel itself deploys and activates cleanly. Immediately after the queue deploys, resolve or create its routing config by followingservice-agentforce-channel-configure'sreferences/queue-resolution.mdStep 4 — do not defer this to a later skill invocation, since this may be the only place a newly created queue is ever touched. - For Flow/User/ASA: inform the user that the flow, user, or bot must be created separately (out of scope for this skill)
- Read the channel settings reference — load
references/channel_settings.mdto understand all available configuration options and their valid values.
Phase 2 — Generate Metadata
- Read the metadata template — load
assets/messaging_channel_template.xmlas the starting structure.
- Apply routing configuration — set
sessionHandlerTypeand the corresponding handler field:
| Routing Type | sessionHandlerType | Required Fields |
|---|---|---|
| Omni-Channel Queue | Queue | sessionHandlerQueue |
| Omni-Channel Flow | Flow | sessionHandlerFlow + sessionHandlerQueue (fallback) |
| User | User | sessionHandlerUser + sessionHandlerQueue (fallback) |
| Agentforce Service Agent | AgentforceServiceAgent | sessionHandlerQueue (fallback) + sessionHandlerAsa (bot dev name — required, see v67 note below) |
v67 note — `<sessionHandlerAsa>` is required in the XML, not rejected. Confirmed on a v67.0 org: omitting<sessionHandlerAsa>causes the deploy to fail with "Missing required Agentforce Service Agent." Include it and the deploy bindsSessionHandlerIdautomatically — no post-deploy Data API PATCH needed. 1. Verify the bot is Active before channel creation. The Metadata API rejects binding with "Only active Agentforce Service Agents are supported." Runsf agent activate -o <org> --api-name <BotDevName>and confirmBotVersion.Status = Activefirst. 2. Deploy the XML with<sessionHandlerType>AgentforceServiceAgent</sessionHandlerType>,<sessionHandlerQueue>(fallback), and<sessionHandlerAsa>{BotDevName}</sessionHandlerAsa>. 3. Verify:sf data query -o <org> -q "SELECT SessionHandlerId, FallbackQueueId FROM MessagingChannel WHERE DeveloperName='<ChannelDevName>'" --json— both must be non-null after the deploy, with no separate PATCH step.
- Apply user verification — if enabled, set
embeddedConfig.authModetoAuthand include<messagingAuthorizations>. If not enabled, setembeddedConfig.authModetoUnAuthand omit<messagingAuthorizations>.
- Configure embedded settings — populate
<embeddedConfig>with:
allowedFileTypes— comma-separated file extensions (no spaces)anonymousUserJwtExpirationTime— JWT expiration in minutes (required for UnAuth)verifiedUserJwtExpirationTime— JWT expiration in minutes (required for Auth)chatAbandonmentTimeout— minutes before abandoned conversation cleanupisAbandonedChatsEnabled— enable abandoned chat detectionisAttachmentUploadEnabled— file upload supportisEstimatedWaitTimeEnabled— show estimated wait timeisFallbackMessageEnabled— fallback when agents unavailableisFileAttachmentExtUnrestricted— allow any file extension
More from forcedotcom
Use this skill in a project
Open any RiverX project, search the Skills panel for forcedotcom/sf-skills/service-digital-engagement-channel-configure, and install it in one click.
