Routing rules are not triggered by postal code as expected - this can happen for Routing Rules for Tickets, for Territory Routing Rules, etc.
SAP Cloud for Customer
Reproducing the Issue
In our example, we look at Ticket Routing Rules.
Prerequisite: You have already set up the conditions in the Ticket Routing Rules by Organization or Territory including Postal code as condition.
- Go to the Service work center.
- Select the Tickets view.
- Click the New button.
- Fill in the mandatory fields including Postal Code field.
- Click the Save and Open button.
You can see that the rules were not determined according to the set-up condition, even though the postal code is maintained.
Postal code is not maintained correctly.
You need to maintain the postal code with their full allowed length.
- If a postal code contains 5 digits then maintain all 5 digits: 0 – 999 as 00000 to 00999.
- If a postal code is one alphabet with four digits maintain all 5 characters: z0 – z999 as z0000 to z0999.
The postal-code is technically not a number but a string --> string comparison is applied and not a numeric comparison.
(This is required because in some country/regions we have letters and not only digits in the field, an example is e.g. could be a postal-code A12 A123).
Note that we will not and cannot change the type of the postal-code.
We take another example:
An account ABC (ABC represents the account name) has an example postal code 12345 in a country/region that allows 5 digits.
In your Rules (Ticket Routing, or Territory Routing, etc.) we have an example rule: 1000 to 1999 --> the string "12345" is between "1000" and "1999"
While you expect a different rule to be triggered, where you set: 10000 to 10999 --> the string "12345" is between "10000" and "10999", the first rule will apply as it satisfies the postal code string condition.
In order to solve this, we recommend that you change those rules with ranges for the 4-digits postal-code conditions (in a country/region that has 5 digits) in a way that the rule states: between "01000" and "01999"
This way the rule with 1000 to 1999 will no longer match for your postal-code 12345.
--> the rule you intended to have triggered originally (10000 to 10999) will be applied - which is what you intend
It would mean you have to store e.g. the postal code "1077" as "01077" within the customer-instance (master data/ address data).
(Because 01077 is between 01000 and 01999, but 1077 is NOT between 01000 and 01999).
- KBA 2525648 - Upper Limit for Postal Code Range in Territory Rules
- KBA 2870989 - 'No items found' is shown when using the condition Postal Code in a workflow rule
- KBA 2676825 - Error in Territory Rules Activation: 'Invalid Range Parameters Defined for 'Is ( Not ) Between' Comparison'
- KBA 2541702 - Change of Territory Is Not Visible In Changes Facet of Account
- KBA 3247828 - Account(s) Missing In Realignment Run - Explanation of Realignment Run Results
Ticket Routing Rules, Ticket, Territory, Organization, postal code, string, territory realignment rules, territory, rules , KBA , string , LOD-CRM-SRP , Service Request Processing , Problem