Service Digital Engagement Channel Configure

作者 forcedotcome5164d94d751無授權條款1K 個星標收錄於 2026年10月8日更新於 2026年10月8日儲存庫昨天更新

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.

包含腳本DevOps & Cloud
AI 產生的概覽

產生、部署並啟用 Salesforce MIAW 訊息頻道中介資料,包含路由與驗證設定。

功能
此技能為 Salesforce 應用程式內與網頁訊息(MIAW)建立 MessagingChannel 中介資料 XML,支援透過 Omni-Channel 流程、Omni-Channel 佇列、使用者或 Agentforce Service Agent 進行路由。它會設定使用者驗證、預先交談參數、自動回覆、同意關鍵字與附件設定,接著使用 Salesforce CLI 部署檔案並啟用頻道。部署前也會檢查目標組織中是否存在路由目標與備援佇列。
適用情境
當使用者需要為 MIAW 建立、部署或啟用增強交談訊息頻道,或提到 .messagingChannel-meta.xml 檔案時使用。不適用於舊版 Live Agent 交談、不含訊息功能的 Embedded Service 部署,或一般 Omni-Channel 路由規則。
執行需求
需要 Salesforce CLI(sf)2.0.0 或更新版本、python3 3.8 或更新版本、已通過驗證且 API 版本為 67.0 或更高的目標組織,以及對該組織的網路存取。技能附帶兩個可執行 shell 指令碼,用於檢查 API 版本與標準化頻道名稱,另含 XML 範本與參考文件。

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 MessagingChannel metadata 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 — use service-digital-engagement-deployment-configure), creating permission sets for messaging (use platform-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 masterLabel and 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 true per 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 masterLabel and the file name (<Name>.messagingChannel-meta.xml)
  • Routing type: One of Queue, Flow, User, or AgentforceServiceAgent
  • 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: EmbeddedMessaging
  • authMode: Auth
  • chatAbandonmentTimeout: 5 (minutes)
  • endUserIdleTimeOut: 5 (minutes)
  • isAttachmentUploadEnabled: true
  • maxFileSize: 5 (MB)
  • allowedFileTypes: bmp,csv,doc,docx,gif,jpg,pdf,png,tiff,txt,xls,xml
  • anonymousUserJwtExpirationTime: 360 (minutes, required for UnAuth, range 60-4320)
  • verifiedUserJwtExpirationTime: 60 (minutes, required for Auth, range 60-240)
  • isAbandonedChatsEnabled: false
  • isSaveTranscriptEnabled: false
  • isFallbackMessageEnabled: false
  • isEstimatedWaitTimeEnabled: false
  • isFileAttachmentExtUnrestricted: false
  • isQueuePositionEnabled: false
  • isSynchronousChatEnabled: false
  • isVoiceModeEnabled: false

Workflow

All steps are sequential. Do not skip or reorder.

Phase 1 — Gather Context

  1. 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 a sfdx-project.json in the metadata output folder with "sourceApiVersion": "67.0".

  2. Collect inputs — confirm the channel label, routing type, routing target, and verification settings from the user per Clarifying Questions above.

  3. Determine file name — run scripts/normalize-channel-name.sh "<LABEL>" and surface any errors it returns.

  4. 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.xml with MessagingSession as the queueSobject type 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 following service-agentforce-channel-configure's references/queue-resolution.md Step 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)
  5. Read the channel settings reference — load references/channel_settings.md to understand all available configuration options and their valid values.

Phase 2 — Generate Metadata

  1. Read the metadata template — load assets/messaging_channel_template.xml as the starting structure.

  2. Apply routing configuration — set sessionHandlerType and the corresponding handler field:

    Routing TypesessionHandlerTypeRequired Fields
    Omni-Channel QueueQueuesessionHandlerQueue
    Omni-Channel FlowFlowsessionHandlerFlow + sessionHandlerQueue (fallback)
    UserUsersessionHandlerUser + sessionHandlerQueue (fallback)
    Agentforce Service AgentAgentforceServiceAgentsessionHandlerQueue (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 binds SessionHandlerId automatically — 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." Run sf agent activate -o <org> --api-name <BotDevName> and confirm BotVersion.Status = Active first.
    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.
  3. Apply user verification — if enabled, set embeddedConfig.authMode to Auth and include <messagingAuthorizations>. If not enabled, set embeddedConfig.authMode to UnAuth and omit <messagingAuthorizations>.

  4. 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 cleanup
    • isAbandonedChatsEnabled — enable abandoned chat detection
    • isAttachmentUploadEnabled — file upload support
    • isEstimatedWaitTimeEnabled — show estimated wait time
    • isFallbackMessageEnabled — fallback when agents unavailable
    • isFileAttachmentExtUnrestricted — allow any file extension
    • isSaveTranscriptEnabled — save conversation transcripts
    • maxFileSize — maximum attachment size in MB
  5. Configure messaging keywords — generate <messagingKeywords> elements:

    • OptOut type with individual <keyword> elements: cancel, end, quit, stop, stopall, unsubscribe
    • Help type with <keyword>: help
  6. Apply standard parameters — if the user needs standard pre-chat fields, generate <standardParameters> elements with parameterType. If the channel uses Flow-based routing and the user specifies flow variable mappings, include <actionParameterMappings> with actionParameterName to map each parameter to a flow input variable.

  7. Apply custom parameters — if the user needs pre-chat data collection, generate <customParameters> elements with name, masterLabel, parameterDataType, externalParameterName, and maxLength. If the channel uses Flow-based routing and the user specifies flow variable mappings, include <actionParameterMappings> with actionParameterName to map each parameter to a flow input variable.

  8. Generate the file — produce the .messagingChannel-meta.xml file following the template structure. Place at the path the user specifies, or default to the project's metadata source path under messagingChannels/.

Phase 3 — Deploy and Activate

  1. Deploy the channel — deploy the generated .messagingChannel-meta.xml file to the target org:
    bash
    sf project deploy start --source-dir <path-to-messagingChannels-folder> --target-org <org-alias>

15a. ASA routing only — verify the bind landed. Skip this step for Queue, Flow, and User routing types. Because <sessionHandlerAsa> was included in the deployed XML (step 7), the deploy itself binds SessionHandlerId — no separate Data API PATCH is needed.

```bashsf data query -o <org> --json \  -q "SELECT SessionHandlerId, FallbackQueueId FROM MessagingChannel WHERE DeveloperName='<CHANNEL_DEV_NAME>'"```
Both `SessionHandlerId` and `FallbackQueueId` must be non-null. If either is null, confirm `<sessionHandlerAsa>` and `<sessionHandlerQueue>` were both present in the deployed XML and that the bot was Active before the deploy.

15. Activate the channel — after successful deployment, activate the messaging channel: bash sf data update record --sobject MessagingChannel --where "DeveloperName='<CHANNEL_NAME>'" --values "IsActive=true" --target-org <org-alias>

Phase 4 — Validate

  1. Verify against checklist — confirm all items in the Verification Checklist below pass before presenting output.

  2. Present output — show the generated file to the user with a summary of configured settings and confirm activation status. Offer next steps:

    • Automated responses — ask if the user wants to configure <automatedResponses> (OptOutConfirmation, HelpResponse). If yes, generate elements with autoResponseContentType: TextResponse, language, and XML-escaped response text, then redeploy.

Rules / Constraints

ConstraintRationale
File name serves as the channel API nameNo channelPlatformKey field in the XML body
sessionHandlerType must match the handler fields presentSetting Queue but populating sessionHandlerFlow causes deployment error
Flow routing requires both sessionHandlerFlow and sessionHandlerQueueQueue is the mandatory fallback for human escalation
User routing requires both sessionHandlerUser and sessionHandlerQueueQueue is the mandatory fallback when user is unavailable
ASA routing: include both sessionHandlerQueue and sessionHandlerAsa in the XMLsessionHandlerAsa is required at v67 — the deploy fails with "Missing required Agentforce Service Agent" if omitted; the deploy itself binds SessionHandlerId, no PATCH needed
Bot must be Active before the metadata deploy that binds SessionHandlerIdAPI rejects with "Only active Agentforce Service Agents are supported" if the bot is inactive
masterLabel max 40 charactersPlatform limit on channel labels
File name must match ^[a-zA-Z][a-zA-Z0-9_]*$API name format enforced by Metadata API
allowedFileTypes is a comma-separated string with no spacesNot a nested list or array
keyword elements are individual — one per trigger wordNot a comma-separated list
customParameters need name, masterLabel, parameterDataType, and externalParameterNameIncomplete parameters fail silently
File extension is .messagingChannel-meta.xmlMetadata API uses this specific extension
Do not hardcode file paths — respect sfdx-project.json package directoriesCustomer orgs customize source paths
Channel must be activated after deploymentChannels are inactive by default — messages won't route until activated
isSynchronousChatEnabled defaults to false; can only be true for UnAuth channels upon user requestPlatform rejects "You can't enable Session-Based Chat for verified users" for Auth channels

Gotchas

IssueResolution
Channel name conflicts with existing channelCheck org for existing channels; file name must be unique
Queue not found on deployEnsure the referenced queue exists and has MessagingSession as a queueSobject type
Channel deploys and activates fine, but widget shows "Agents are not available. Try again later." at session startThe queue has no QueueRoutingConfig — this is silent at deploy time. Check SELECT QueueRoutingConfigId FROM Group WHERE Id='<QUEUE_ID>'; if null, resolve/create one per queue-resolution.md Step 4
Omni-Channel Flow not found on deployEnsure the referenced flow exists and is active before deploying the channel
ASA bot reference invalidBot must be published and active; use exact developer name from BotDefinition metadata
ASA channel deploy fails with "Missing required Agentforce Service Agent"<sessionHandlerAsa>{BotDevName}</sessionHandlerAsa> is missing from the XML — it's required at v67, not optional
ASA channel deployed but SessionHandlerId is null after deployBot was not Active at deploy time — run sf agent activate, confirm BotVersion.Status = Active, then redeploy
"Only active Agentforce Service Agents are supported" on deployBot is inactive — run sf agent activate before deploying
Flow or ASA routing fails without fallback queuesessionHandlerQueue is mandatory when sessionHandlerType is Flow or AgentforceServiceAgent
JWT verification not workingConnected app and certificate must be configured for the org
Custom parameters not collectedname must be unique per channel; parameterDataType defaults to Text
Automated responses not showingUse exact type values (OptOutConfirmation, HelpResponse); XML-escape special characters
Channel deployed but messages not routingChannel must be activated after deployment — it defaults to inactive
"You can't enable Session-Based Chat for verified users"Set isSynchronousChatEnabled to false for Auth channels — session-based chat is only valid for UnAuth

Verification Checklist

Universal Checks

  • Does the file name match ^[a-zA-Z][a-zA-Z0-9_]*$?
  • Is masterLabel 40 characters or fewer?
  • Is messagingChannelType set to EmbeddedMessaging?

Routing Checks

  • Is exactly one sessionHandlerType value set (Queue, Flow, User, or AgentforceServiceAgent)?
  • For Queue routing: is sessionHandlerQueue in the XML?
  • For Flow routing: is sessionHandlerFlow in the XML, plus sessionHandlerQueue as fallback?
  • For User routing: is sessionHandlerUser in the XML, plus sessionHandlerQueue as fallback?
  • For ASA routing: are both sessionHandlerQueue and sessionHandlerAsa in the XML?
  • For ASA routing: was step 15a run? Are SessionHandlerId and FallbackQueueId non-null after the deploy?
  • Does the routing target reference an existing entity in the org?

User Verification Checks

  • If verification is enabled, is embeddedConfig.authMode set to Auth?
  • If verification is disabled, is embeddedConfig.authMode set to UnAuth?

Embedded Config Checks

  • Is chatAbandonmentTimeout a positive integer (minutes)?
  • Is allowedFileTypes a comma-separated string with no spaces?
  • Is maxFileSize a value between 1-5 MB?
  • If UnAuth, is anonymousUserJwtExpirationTime set (default 360, range 60-4320)?
  • If Auth, is verifiedUserJwtExpirationTime set (default 60, range 60-240)?

Automated Response Checks (only if user requested)

  • Do all type values use valid IDs (OptOutConfirmation, HelpResponse)?
  • Are special characters XML-escaped in response text?

Keyword Checks

  • Is there at least an OptOut keyword type defined?
  • Are keywords individual <keyword> elements (not comma-separated)?
  • Is language set on each keyword block?

Activation Checks

  • Was the channel deployed successfully?
  • Was the channel activated after deployment (IsActive=true)?

Output Expectations

Deliverables:

  • Messaging Channel metadata: <source-path>/messagingChannels/<ChannelName>.messagingChannel-meta.xml

File structure follows the template in assets/messaging_channel_template.xml.


Cross-Skill Integration

NeedDelegate to
Creating the Omni-Channel Flow for routingautomation-flow-generate skill
Creating permission sets for messaging agentsplatform-permission-set-generate skill
Creating the Embedded Service Deploymentservice-digital-engagement-deployment-configure skill

Reference File Index

FileWhen to read
assets/messaging_channel_template.xmlBefore generating — use as the starting structure
references/channel_settings.mdWhen configuring channel options beyond defaults
scripts/check-api-version.shPhase 1 — verify org API version meets the passed minimum (67.0)
scripts/normalize-channel-name.shPhase 1 — derive file API name from channel label
examples/omni_flow_channel.xmlTo verify output for Omni-Channel Flow routing
examples/omni_queue_channel.xmlTo verify output for Omni-Channel Queue routing
examples/asa_agent_channel.xmlTo verify output for Agentforce Service Agent routing

來源與署名

來源:forcedotcom/sf-skills位於skills/service-digital-engagement-channel-configure提交e5164d9

授權條款: 無授權條款

內容歸原作者所有。SourceWeft 從公開儲存庫中收錄這些內容。

檢舉或申請下架

更多來自 forcedotcom/sf-skills 的技能

Service Itsm Teams Itservice Configure

forcedotcom

Configure the "Set Up Salesforce IT Service" checklist for Microsoft Teams Employee Service (ITSM) — the employee side, covering app enablement, marketplace install guidance, user access assignment, and Digital Experience Site selection. Use this for: 'turn on Salesforce IT Service', 'set up IT Service on Teams', 'assign Teams for Employee permission set', 'give employees access to Teams for Employee Service', 'manage user access for Teams ITSM', 'grant users the permission sets needed for Teams Employee Service', 'select a digital experience site for Teams', 'install Salesforce IT Service app on Teams', or any request to complete the IT Service half of the Teams ITSM Go page checklist (including the Manage User Access step). DO NOT TRIGGER for the base Teams Salesforce Go page toggle or Azure/Entra app setup (service-itsm-teams-configure) or for the IT Desk/fulfiller half of the checklist (service-itsm-teams-itdesk-configure).

待分類1K昨天更新

Service Itsm Teams Coordinate

forcedotcom

End-to-end autopilot orchestrator for setting up Microsoft Teams integration in Salesforce Service Cloud ITSM — runs the whole flow (enable the Teams for Employee Service Go feature, register the Microsoft Entra app, populate Named Credentials, configure the IT Desk and IT Service checklists, turn on Swarming, and optionally embed the Agentforce agent) in one continuous pass, stopping only at the points a human must act. Use when the user asks to set up Microsoft Teams for ITSM end to end, 'set up teams for it service', 'do the whole teams itsm setup', 'configure microsoft teams for employee service', or wants a guided Teams ITSM walkthrough. Delegates each stage to a specialized child skill while driving the sequence itself. DO NOT TRIGGER when the user asks to enable Teams alone, configure just the IT Desk or IT Service checklist alone, or enable Swarming alone — delegate directly to the specific child skill in those cases.

待分類1K昨天更新

Service Itsm Teams Itdesk Configure

forcedotcom

Configure the "Set Up Salesforce IT Desk" checklist for Microsoft Teams Employee Service (ITSM) — the fulfiller/agent side, covering app enablement, marketplace install guidance, user access assignment, and Swarming collaboration-tool setup. Use this for: 'turn on Salesforce IT Desk', 'set up IT Desk on Teams', 'assign Teams for IT Desk permission set', 'set Teams as collaboration tool for swarming', 'install Salesforce IT Desk app on Teams', or any request to complete the IT Desk half of the Teams ITSM Go page checklist. DO NOT TRIGGER for the base Teams Salesforce Go page toggle or Azure/Entra app setup (service-itsm-teams-configure) or for the IT Service/employee half of the checklist (service-itsm-teams-itservice-configure).

待分類1K昨天更新

Service Itsm Teams Debug

forcedotcom

透過對 Salesforce 組織執行通過/失敗設定檢查清單,診斷 Microsoft Teams 員工服務(ITSM)設定失敗問題。

DevOps & Cloud1K昨天更新

Service Itsm Teams Employee Agent Configure

forcedotcom

Configure the embedded Agentforce Employee Agent so it replies inside the Microsoft Teams ITSM custom client ('Salesforce Employee Assist' / 'Ask AI Agent'). Use this for: 'set up employee agent in Teams', 'embed Agentforce agent in Teams', 'make the IT Service Employee Agent reply in Teams', 'Teams Ask AI Agent not responding', 'agent joins then leaves without replying', 'configure MIAW deployment for Teams employee agent', 'Teams embedded messaging agent setup'. Builds the whole stack headlessly (zero Setup-UI clicks): the Web messaging channel with User Verification ON, the Enhanced Chat User Verification Key Set (JWKS_URL) it requires, the Teams_AgentForce custom-client deployment, the routing flow to the agent, and the Agent Access permission set that lets the portal user reach the agent. DO NOT TRIGGER for enabling the Teams feature Salesforce Go page toggle (service-itsm-teams-configure) or for configuring notification preferences.

待分類1K昨天更新

Service Itsm Swarming Configure

forcedotcom

透過 Connect API 呼叫啟用 Salesforce Swarming ITSM 功能,並將協作工具設為 Teams。

DevOps & Cloud1K昨天更新