We recently set up skill-based routing using Omni-Channel Flow for an automotive client. Their support cases needed to be routed to agents based on skills like Billing, Technical, or language support.
Instead of using Skills-Based Routing Rules, we built an Omni-Channel Flow that dynamically assigns cases to agents based on case fields like type and language. For example, if a case is related to billing and the language is German, the flow will assign the case to the support agent having both skills.
In this tutorial, I will explain how to set up skill-based routing in Salesforce Omni-Channel using flows.
Skill-Based Routing in Salesforce Omni-Channel Via Flow
Earlier, to set skill-based routing via flows, we used to create an Auto-launched flow, and in that, we had to use an action element to configure skill-based routing.
In the Winter ’22 release, Salesforce introduced the Omni-Channel flow, which incorporates all the functionality of Omni-Channel within Flow Builder.
In this example, we will create an Omni-Channel flow that assigns cases to agents based on their skills. Then we will call the Omni-Channel flow in the record-triggered flow as a subflow to execute it.
To set up skill-based routing in Salesforce Omni-Channel, we will cover the following points.
- Enable Skill-Based Routing in Omni-Channel
- Create Service Channel
- Create Routing Configuration
- Create Skills
- Create Service Resource for Agents
- Assign Skills to Service Agents
- Route Workitems with Flows using Skills
In case you have already set up Salesforce Omni Channel with routing, then you have to disable Skills-based routing rules in the Routing Configuration. Then, you can go to the last section, the flow part, to route work items with flows using skills.
Enable Skill-Based Routing in Omni-Channel
To use the feature of skill-based routing, we need to enable it in the Omni-Channel settings.
To enable the skill-based routing, navigate to the Setup -> Omni-Channel Settings, then select the checkbox Enable Skills-Based and Direct-to-Agent Routing.

After this, click Save to apply the changes.
Create Service Channel
In this example, we are assigning the cases through Omni-Channel. For this, we need to create a routing for the Case object via the service channel.
- To create a Service channel, navigate to the Setup -> Service Channel. In the Service Channel setup, click on the New button.

- Enter the Service channel Name, then select the Case object. After this, click on the Save button.

With this, we have created an Omni-Channel routed to the case object.
Create Routing Configuration
Now, to route the work items to the agents, we need to create a routing configuration. In this, we will define the priority and size of work items.
- To create a Routing Configuration, navigate to Setup -> Quick Find ->Routing Configuration.
- In the Routing Configurations window, click on the New button.

- Enter the basic information, Routing Configuration Name, and Developer Name.
- In the Routing Settings, set the Routing Priority. It determines the order in which work items across your Omni-Channel queues get assigned to agents.

- Select the Routing Model, to distribute work items to your agents. Least Active routes to the agent with the fewest number of open work items. Most Available routes to the agent with the most open capacity in proportion to their set capacity.
- After this, select the work capacity and click on the Save button.
Before moving forward, ensure that the Use with Skills-Based Routing Rules checkbox is unchecked. In this setup, we will invoke the routing flows. If routing rules are selected in the Routing Configuration, an error will be thrown due to a contradiction between the flow and the settings in the routing configuration.
Creating Skills
The next requirement to set up skill-based routing in Omni-Channel is to create skills that will be assigned to the agents.
- To create the skills, navigate to the Setup -> Skills. In the skills setup, click New button.
- Enter the Name and Developer Name for the skill and click Save.

Here, we don’t need to assign a user in these settings; we will do that later in Service Resources.
Create Service Resource for Agents
Now, we will create a Service Resource. In Salesforce Omni-Channel, Service Resources represent the entities that perform service work. The entity in the resource can be a user (agent) or a group (queue).
To create a Service Resource, navigate to setup, click on the App Launcher, and select Service Resource.

In the Service Resource, click New and create the resource for the agent as follows.
- Enter the Name for the resource, and keep it the same as the user name. After this, select User from the lookup.
- In the Resource Type, select the picklist option Agent.
- Select the Active checkbox; without this, you won’t be able to assign skills to an agent.
In some cases, the user might not appear in the User lookup field. The reason can be that the user doesn’t have permissions for the Service Cloud. We can give access from the User settings.

At last, click Save, and in the same way, you can create several agents.
Assign Skills to Service Agents
After creating both skills and service agents, we need to assign the created skills to the service agents.
- To assign the skills to agents, navigate to the App Launcher and select Service Resource.
- In the Service resource, click on the Agent resource name to which you have to add skills.
- Now, in the agent resource, click on the Details tab. Scroll down to the section
Service Resource Skills and click New.

- Select the Skills from the available skills. After this, select the date and time from when this skill will be assigned to the agent.

We can also set an End date for the skills. For example, on that particular date, the agent needs to renew the skill.
In the same way, we can assign more skills to an agent. Make sure to add skills to the agent according to their expertise for proper work assignment.
Route Work Items With Flows Using Skills in Omni-Channel
After creating and assigning skills, we will create a flow that will route the work (case) to the agents based on their skills.
Follow the steps below to set up skill-based routing in Omni-Channel using Salesforce Flow.
- Navigate to Setup -> Quick find -> Flows. Then, in the flows setup, click on the New Flow.
- Select the option Omni-Channel flow and click Create.

- In this flow, we are creating rules for skill-based routing. For that, we need to get the skills that we have created. To get the skills, we will add a get record element and define it in the following way:
- Enter the Label and API Name for the get record element.
- Select the Object as Skill.
- I’ve set Condition Requirements to None to get all skill records.
- In the section How Many Records to Store, select All records.
- To store the data, select the ‘Automatically store all fields‘ option.

- To find out the skills based on the Case fields input, we will add a Loop element to the flow.
In the Collection Variable, select Skills from Get skills ( get record element). Here, we don’t need to define this; it will be created automatically.
For the direction of iteration in the loop, select First item to last item.

- To find whether the case field value contains the skill name matching the skill names loop, we will add a decision element under the loop element.
- Enter the Label and API Name for the Decision element.
- After this, enter the Label and API Name for the Decision outcome.
- In the condition requirements, create a New Resource.

- In the new resource, select the resource type as Variable and enter the details below.
- Enter the API Name as CaseSubject.
- Select the Data Type as Text.
- Select the checkbox available for input and click Save.

- In the conditions requirement, check if the input values contain the skills from the skill loop.
For this, select the Operator as Contains, and select the value as loop through skills > Name.
In the older versions of Salesforce, the Name will appear as Master Label.

Now, if the decision is satisfied and the skill matches, then we need to add that skill to a list. The routing action in the Omni-Channel flow doesn’t take a list; it takes strings instead. The string should have all the string IDs separated with commas.
For this, we will use an assignment element.
- Before creating the Assignment element, we will define a variable for it. Click on the New Resource in the Manager tab and enter the details in the new resource.
- Select the resource type as a variable.
- Enter the API Name as AllSkillsInString.
- Select the Data Type as Text and click Save.

- Add the Assignment element inside the Decision element. Enter the Name of the component. In the section Set Variable Values, select the variable AllSkillsInString, then select the Operator as Equals.
To get the string values separated by a comma in an assignment, we need to create a Formula resource. Select New Resource in the value.

- Define the new formula resource as follows.
- Select the resource type as Formula.
- Enter the API Name as ConcatenatedString.
- Select the Data Type as Text.
- In the formula editor, enter the following formula and click Done.
{!AllSkillsInString}+','+{!Loop_through_all_skills.Id}
Now, the variable will be mapped with the formula resource, which will get the string from the loop, separated by a comma.

- Once the loop is done, we need to call our action to route. In the Omni-Channel flow, instead of adding the action, we can directly add the Route Work element.
Add the Route work element to the flow and enter the Label and API Name.

- In the field Record Id Variable, create a New Resource and define it in the following way.
- Select the Resource Type as Variable.
- Enter the API Name as caseIdFromRecordTrigger.
- Select the Data type as Text and select the checkbox Available for input.
- At last, click on the Done button.

- In the Service Channel, select the service channel that you have created for the specific work object. In this example, I have chosen the ServiceCase channel that is created for the Case object.
In the field Route to, select the option Skills.

- In the Skills Requirements, select the option Run Skills-Based Routing Rules. For the Routing Configuration, select the option Variable.
For the variable, we need to define the new resource in the following way.
- Select the resource type as Variable.
- Enter the API Name as RoutingId.
- Select the Data Type as Text.
- In the Default value, enter the ID of the Routing Configuration that we have created. You can get the ID from the URL of the routing configuration.
- At last, click on the Done button.

With this configured, the routing of work will be assigned to the agent based on their skills.
At last, save and activate the flow.

Now, we have created and activated the flow. Since the Omni-Channel flow doesn’t have a trigger to run so we will add this flow as a sub-flow in another Record-Trigger flow.
Create a Record-Trigger Flow to Call Omni-Channel Flow
In the steps below, we will create a record-triggered flow that calls the Omni-Channel flow.
- In the flows setup, click New, then select the option Record-Triggered flow, and click Create.
- In the start configuration, select the Case object. In the trigger condition, select the option when a record is created.

- Now, add a sub-flow element in the flow. Enter the Label and API Name for the sub-flow element. From the Referenced Flow, select the Omni-Channel flow that we have created.
Here, you will see the resource variable caseIdFromRecordTrigger that we have defined in the Omni-Channel flow. Here, select its value as Triggering Case > Case ID.

With this, we have defined the trigger for the Omni-Channel Flow. At last, save and activate the Record-Triggered flow.
Test Omni-Channel Flow Work Assignment
After activating the flows, we will test whether the flow is assigning work to the agent based on the skill routing that we have defined.
Navigate to the Service Console from the App Launcher. From the case tab, create a new case and enter the field values that were mapped with skills.
Change the case ownership from the current user to the Queue that is configured in Omni-channel.

Now, ensure that the Omni-Channel presence status is online, and then you will see that the created case is assigned to the agent in the queue.

To ensure that work is assigned to the correct user, we can check the Agent Summary. For this, click on the App Launcher and search for Omni Supervisor.
In the Service Reps tab of the Omni Supervisor, you will be able to see the task assigned to the agent in Agent Summary.
Check out: Skills-Based Routing Using Apex in Salesforce Omni-Channel

This way, we can set up skill-based routing in Salesforce Omni-Channel by using the Omni-Channel flow.
I hope this helped you understand how to set up skill-based routing using Omni-Channel Flow in Salesforce.
Instead of using standard routing rules, we built a flow-based solution that assigns cases to agents based on specific skills like language or case type. With this setup, routing becomes easier to maintain.
You can now apply this routing in your own org to ensure the right work reaches the right agents.

Abhijeet is a skilled Salesforce developer with experience in developing and integrating dashboards, data reports, and Salesforce applications. He is also skilled at optimizing processes and flow automation processes, coding, and executing complex project architecture. Read more about us | LinkedIn Profile.