Skip to content

forcedotcom/sf-skills / plugins/builder/service-omni/skills/service-omni-routing-flow-deploy

service-omni-routing-flow-deploy

Verified

Use to deploy an Omni-Channel routing Flow for Case or VoiceCall and verify it routes work items to a queue or by skill. Supports the Case and VoiceCall steel thread with an autolaunched dryRun-gated variant and record-triggered QueueBased and SkillsBased variants. --trigger deploys a record-triggered variant; --routing-type SkillsBased evaluates WorkSkillRouting rules with a non-null skillOption; --runtime-proof checks routing evidence and, for SkillsBased, SkillRequirement rows. Triggers: deploy Omni routing flow for Case, deploy Omni routing flow for VoiceCall, wire VoiceCall routing, create a record-triggered Omni routing flow, verify a Case routing flow, deploy skills-based routing flow. Do not use for screen flows, platform-event-triggered flows, or Flow Tests.

assets/force-app/main/default/flows/Omni_Route_Case_Trigger.SkillsBased.flow-meta.xml

View on GitHub
<?xml version="1.0" encoding="UTF-8"?>
<Flow xmlns="http://soap.sforce.com/2006/04/metadata">
    <apiVersion>66.0</apiVersion>
    <actionCalls>
        <name>Route_Case_Work_Item</name>
        <label>Route Case Work Item</label>
        <locationX>176</locationX>
        <locationY>276</locationY>
        <actionName>routeWork</actionName>
        <actionType>routeWork</actionType>
        <flowTransactionModel>CurrentTransaction</flowTransactionModel>
        <inputParameters>
            <name>recordId</name>
            <value>
                <elementReference>$Record.Id</elementReference>
            </value>
        </inputParameters>
        <inputParameters>
            <name>serviceChannelId</name>
            <value>
                <stringValue>__SERVICE_CHANNEL_ID__</stringValue>
            </value>
        </inputParameters>
        <inputParameters>
            <name>serviceChannelDevName</name>
            <value>
                <stringValue>__SERVICE_CHANNEL_DEVNAME__</stringValue>
            </value>
        </inputParameters>
        <inputParameters>
            <name>serviceChannelLabel</name>
            <value>
                <stringValue>__SERVICE_CHANNEL_LABEL__</stringValue>
            </value>
        </inputParameters>
        <inputParameters>
            <name>routingType</name>
            <value>
                <stringValue>SkillsBased</stringValue>
            </value>
        </inputParameters>
        <inputParameters>
            <name>skillOption</name>
            <value>
                <stringValue>__SKILL_OPTION__</stringValue>
            </value>
        </inputParameters>
        <inputParameters>
            <name>routingConfigId</name>
            <value>
                <stringValue>__ROUTING_CONFIG_ID__</stringValue>
            </value>
        </inputParameters>
        <inputParameters>
            <name>queueId</name>
            <value>
                <stringValue>__QUEUE_ID__</stringValue>
            </value>
        </inputParameters>
    </actionCalls>
    <description>Record-triggered Omni-Channel SKILLS-BASED routing flow. Fires on Case insert and calls the standard routeWork invocable action with routingType=SkillsBased and a non-null skillOption to create a PendingServiceRouting for the new Case, then routes by skill. With skillOption=RunSBRRules (default) the platform evaluates the org's WorkSkillRouting (skills-based routing) rules server-side and attaches the matching SkillRequirement rows to the PSR; skillOption is REQUIRED here (a null skillOption makes the platform routeWork action NPE and roll back the Case insert - W-24069761), so this asset always carries it. The org-specific IDs (serviceChannelId, queueId, routingConfigId) and the skillOption are tokenized and resolved at deploy time so the asset is portable across orgs. Deployed by service-omni-routing-flow-deploy with --routing-type SkillsBased. This is the skills-based production routing variant; Omni_Route_Case_Trigger is the queue-based variant.</description>
    <interviewLabel>Omni Route Case Trigger {!$Flow.CurrentDateTime}</interviewLabel>
    <label>Omni Route Case Trigger</label>
    <processMetadataValues>
        <name>BuilderType</name>
        <value>
            <stringValue>LightningFlowBuilder</stringValue>
        </value>
    </processMetadataValues>
    <processMetadataValues>
        <name>CanvasMode</name>
        <value>
            <stringValue>AUTO_LAYOUT_CANVAS</stringValue>
        </value>
    </processMetadataValues>
    <processMetadataValues>
        <name>OriginBuilderType</name>
        <value>
            <stringValue>LightningFlowBuilder</stringValue>
        </value>
    </processMetadataValues>
    <processType>AutoLaunchedFlow</processType>
    <start>
        <locationX>176</locationX>
        <locationY>0</locationY>
        <connector>
            <targetReference>Route_Case_Work_Item</targetReference>
        </connector>
        <object>Case</object>
        <recordTriggerType>Create</recordTriggerType>
        <triggerType>RecordAfterSave</triggerType>
    </start>
    <status>Active</status>
</Flow>
finishing-a-development-branchobra/superpowersUse when implementation is complete, all tests pass, and you need to decide how to integrate the workStars: 322kUpdated Claude CodeCodexVerifiedInstall
systematic-debuggingobra/superpowersUse when encountering any bug, test failure, or unexpected behavior, before proposing fixesStars: 322kUpdated Claude CodeCodexVerifiedInstall
test-driven-developmentobra/superpowersUse when implementing any feature or bugfix, before writing implementation codeStars: 322kUpdated Claude CodeCodexVerifiedInstall
skill-creatoranthropics/skillsCreate new skills, modify and improve existing skills, and measure skill performance. Use when users want to create a skill from scratch, edit, or optimize an existing skill, run evals to test a skill, benchmark skill performance with variance analysis, or optimize a skill's description for better triggering accuracy.Stars: 198kUpdated Claude CodeCodexVerifiedInstall