replicating-omnichannel-routing-flows
Replicating Omni-Channel Routing Flows Across Orgs
What this skill is for
An Omni-Channel escalation RoutingFlow is the flow an Agentforce (or bot) agent invokes via @utils.escalate to hand a live conversation off to a human. It is a tiny flow:
Start (input variable: recordId (String); NO triggerType — a bare Start with just a connector)
→ recordUpdate: set Escalated_to_Human__c = true on the conversation record (filter Id = recordId)
→ routeWork: route the record to a queue on a service channel
To build one from scratch, see § Build an escalation RoutingFlow from scratch below — it has the complete, verified XML for both channels and ready-to-edit templates in assets/.
These flows cannot be blindly copied between orgs because they embed org-specific queue Ids (a Group.Id, which differs in every org). A straight metadata copy deploys a flow that routes to a queue Id that doesn't exist in the target org — it validates, deploys, and then silently fails to route at runtime. This skill is the procedure to port one correctly.
There is one flow per channel: a Messaging variant (updates MessagingSession, routes on sfdc_livemessage) and a Voice variant (updates VoiceCall, routes on sfdc_phone).
Escalation (this skill) vs. inbound-to-ASA (a different skill). This skill covers
routeWorkwithroutingType=QueueBased— routing to a human queue. To route the other direction — an inbound VoiceCall/MessagingSession to an Agentforce Service Agent (copilot) — use therouting-inbound-conversations-to-asaskill: that one usesroutingType=CopilotwithcopilotId/copilotLabelplus a REQUIRED fallbackqueueId+queueLabel(a copilotrouteWorkstill mandates a fallback queue). Don't conflate the tworoutingTypes.