How do I create unique rules?

Here are some pointers for creating unique rules:

  • You must create unique rules in such a way that two different rules don't match the same work item. If multiple rules match the same work item, the Assignment Manager randomly picks one of those matching rules.

  • You must also ensure that you don't have duplicate or identical rules. Duplicate or identical rules doesn't mean identical conditions. It means that multiple rules match the same incoming work item, even if the rules are defined on different fields or a combination of fields.

  • If you can't create unique rules, you must put the rules in the same rule set and use scoring to determine which queue is picked by the Assignment Manager. You have the option to select or deselect the Use Score option on a rule set. If you select Use Score, then for every rule in the rule set, you must indicate the amount to increase the score when the rule is true. You must also set Filter as Top X and Number of candidates as 1. All the rules in a rule set are executed, and the queue with the highest total score is selected.

    For more information, see Manage Service Assignment Rules.

    Note: Scoring applies only inside a rule set. But you may have scenarios where identical rules are present in different rule sets, and multiple rules from different rule sets match a work item. In such cases, the Assignment Manager randomly picks one of those identical rules.

Let's see a few examples of how you can make a rule unique:

Example 1 for Making a Rule Unique

Let's say you write the following rules:

  • Rule 1: Variable A=1 and Variable B=2 (Action: Assign work item to Q1)

  • Rule 2: Variable A=1, Variable B=2, and Variable C=3 (Action: Assign work item to Q2)

Then the Variable A=1 and Variable B=2 part is common in both the rules. When an incoming work item satisfies Rule 2, it also satisfies Rule 1. And the Assignment Manager randomly picks one of the two.

To make these two rules unique, you can add a condition about variable C in Rule 1. For example, you can add the following condition to Rule 1: C isn't equal to 3.

Note: Rule 1 and Rule 2 are identical if you get a work item with all 3 variables and both rules are matching.

Example 2 for Making a Rule Unique

Let's consider the following example involving different rule sets. In Rule Set 1, you have a rule with the condition C1=A. In Rule Set 2, you have a rule with the condition C2=B. Here, C1 and C2 are different fields.

Now let's say you have a work item where C1=A and C2=B. These two rules aren't unique, and they both match the work item. In such a scenario, any one of the rules is randomly picked, and a queue is selected. But suppose you want the work item to be assigned only to a queue called Q1 because it has C1, and you want C2 to be ignored. Then you must make the rules unique by setting conditions such as the following:

  • Rule 1: If C1 equals A and C2 isn't equal to B, then assign to Q1.

  • Rule 2: If C1 equals A and C2 equals B, then assign to Q2.

Note: If the matching rules are in different rule sets, you can't apply scoring. If the matching rules were in the same rule set, scoring would help. For example: You set the scoring of Rule 1 to 10 and Rule 2 to 5.