Route trigger for entity records
Omnichannel for Customer Service offers a suite of capabilities that extend the power of Dynamics 365 Customer Service Enterprise to enable organizations to instantly connect and engage with their customers across digital messaging channels. An additional license is required to access Omnichannel for Customer service. For more information, see the Dynamics 365 Customer Service pricing overview and Dynamics 365 Customer Service pricing plan pages.
After you set up and enable an entity for routing, you can manually trigger the routing for these records using the save and route button on the entity record forms. As an administrator, you can also setup automatic triggers to route these entity records using Power Automate. Let us look at the triggers in detail in the following sections:
- Manual trigger using Save & Route and Apply Routing Rules
- Automatic trigger using custom Flow
After you enable an entity for routing, you see the Save & Route in the entity form ribbon command bar and Apply Routing rules in the entity view ribbon command bar. You can use these commands to route the record.
Sign in to your model-driven app.
Select an entity record for your administrator has enabled routing.
For example, in this procedure, Leads entity is enabled for routing, and hence, you can see the button in the Leads form command bar.
Select Leads in the sitemap, and you can view the Apply Routing rules in the entity view ribbon command bar. Selecting the Apply Routing rules button also routes the record.
Select a lead record from the My Open Leads view.
Select Save & Route the command bar. The Route Case dialog box appears.
The entity record will be routed based on the active routing rule set.
Verify your permissions
Ensure that your users have the below-mentioned permissions for Routing Rule Instance entity, to trigger routing of entity records using the Save & Route or Apply Routing Rules buttons.
You can setup a custom flow, to trigger routing for records based on conditions such as when a record is created, updated, and so on. Let's see how to setup a custom flow for create condition.
To enable automatic trigger to route the entity records, create a custom Flow.
Sign in to Power Automate.
Select the environment for which you want to update the Flow.
Select My Flows in the sitemap.
Select + New and select the Automated-from blank option. Select Skip in the Build an automated flow dialog.
Type Common Data Service, and select it from the list. The Common Data Service connector enables you to connect to the Common Data Service environment.
Type When a record is created, updated or deleted in the search box, and select it from the list. When a record is created, updated or deleted is the trigger condition step.
Specify the following in the When a record is created, updated or deleted trigger.
Field Description Example Value Trigger condition Specify the condition to fire the trigger. That is, when you select a trigger condition, based on this state, the entity record will be routed automatically.
The list of possible values are:
- Create or Delete
- Create or Update
- Create or Update or Delete
- Update or Delete
Create The entity name Specify the entity collection name for which you want to fire the trigger. Leads Scope Specify where this trigger must be applied. Organization
Select + New step. The Choose an action step appears.
Type Perform an unbound action in the search box, and select the action from the list. The Perform an unbound action step appears.
Type msdyn_ApplyRoutingRuleEntityRecord in the Action Name field.
Type the entity collection name and unique identifier of the entity in the specified format against the Target field:
<entity collection name>(unique identifier of the entity)Example: leads(Lead)
- Open your browser and go to
- Search for
LogicalCollectionName, and you can view the entity collection name for a particular entity. For example:
leadsis the entity collection name.
- Open your browser and go to
Select Save to save the Flow.
Now, based the Flow that is defined, whenever an entity record, say lead, is created, the Flow applies the ApplyRoutingRuleRecord action on the entity record. Similarly, you can create a custom Flow based on your business scenarios.
- For case entity record, an out-of-the-box trigger is shipped to route the cases automatically. The routing is based on the Route Case field value in the case entity record.
- If Route Case is set to Yes, the record will be routed upon creation.
- If Route Case is set to No, the record will not be routed upon creation.
- By default, for all the cases created from user interface, the Route Case field is set to No. Hence, the routing for these is not triggered.
- You can also build a custom flow to automatically trigger routing for cases using any other field per your business scenario, as explained in the above-mentioned section.