Calculating the order priority
Summarize
Summary of Calculating the order priority
Order priority in ServiceNow's Order Management for Telecommunications is determined by combining ranks and weightages assigned via decision tables. These values range from 0 to 100 and translate into priority levels categorized as Critical, High, Medium, or Low. The priority set at the order line item level influences the overall customer order priority and propagates to domain orders and order tasks.
Show less
Priority Calculation
The priority is calculated using the formula:
Priority = (sum of rank × weight) / (sum of weight)
For example, given multiple decision tables with assigned ranks and weights, the weighted average determines the final priority score. This score aligns with the predefined priority levels:
- Critical: 80 - 100
- High: 60 - 80
- Medium: 40 - 60
- Low: below 40
Customers can adjust these values by editing the snindtmtorm.PriorityManagement extension script, which overrides decision table values when modified.
Customizing Priority Rules
Customers can add new priority rules by creating additional decision tables and implementing a new extension point script. The process includes:
- Creating a decision table with defined inputs, conditions, and rank values.
- Implementing or updating the
snindtmtorm.PriorityManagementscript by overriding thegetRank()andgetWeightage()methods to incorporate custom logic for rank and weightage calculation.
This approach provides flexibility to tailor priority rules to specific business needs beyond the base system's configuration.
Priority Handling for External Orders
For orders originating from external systems:
- If a valid priority is provided externally, it is used for order line items.
- If the external priority is missing or invalid, the system calculates the priority using the standard decision table categories.
- For customer orders, the system-calculated priority overrides any external value to ensure consistency.
Order priority is calculated based on the rank defined in the decision table and the weightage assigned to each table.
- Critical: 80 - 100
- High: 60 - 80
- Medium: 40 - 60
- Low: <40
Priority is calculated as follows:
sum of (rank * weight)/sum of weight
For example, if the rank and weight for each decision table is defined as follows:
| Decision table | Rank | Weight |
|---|---|---|
| Customer | 100 | 10 |
| Specification | 80 | 25 |
| Order type | 80 | 35 |
| Urgency | 60 | 30 |
In this example, priority is calculated as:
Priority = (100 * 10 + 80 * 25 + 80 * 35 + 60 * 30) / (10 + 25 + 35 + 30) = (7600)/100 = 76
Adding a priority rule
- Navigate to.
- Click New and select Decision table.
- Enter a name for the decision table, select the application and application scope for the decision table and click Build decision table.
- Define the inputs and conditions for the decision table.
- Add the Rank in the Result column and click Save.
- Navigate to .
- Click the sn_ind_tmt_orm.PriorityManagement script.
- Click Create implementation in the Related Links section.
- Enter a name for the new script (implementation) and edit the getRank() and getWeightage() methods in the script to return the rank and weightage values and click Update. A sample implementation script is shown below:
var PriorityManagement = Class.create();
PriorityManagement.prototype = {
initialize: function() {},
getRank: function(customerOrderItemGr) {
/*
get rank from decision policy or scripting
return rank;
*/
return getRankFromNewDecisionTable(customerOrderItemGr);
},
getWeightage: function(){
/*
get weightage to calculate priority
weight should be an integer value, and range is from 0 to 100.
return weight;
*/
return weight_value_for_this_decision_policy;
},
type: 'PriorityManagement'
};
Calculating the priority for external orders
Orders created by external order capture systems can also be processed by Order Management for Telecommunications. In this case, for
- Order line items:
- If a valid priority value has been defined for the external order, this value is used to calculate the priority.
- If a priority value has not been defined or is invalid, the order priority is calculated by the Order Management for Telecommunications system.
- Customer orders: The priority value is calculated based on the categories defined in the decision tables and this value overrides the value specified in the external order.