Defining distribution rules
Summarize
Summary of Defining Distribution Rules
Distribution rules in ServiceNow Financial Management enable customers to allocate and view distribution costs based on defined criteria. These rules specify how costs are distributed across records, either through simple conditions or advanced scripting, ensuring accurate financial tracking and reporting.
Show less
Key Features
- Rule Configuration: Create new distribution rules by navigating to Financial Management > Admin > Distribution Cost Rules and filling out fields such as Name, Active status, Description, and distribution logic.
- Basic Distribution: When the Advanced option is unchecked, distribution costs are evenly divided among records identified by a specific table and conditions. The Condition Count Widget helps preview matched records before applying the rule.
- Scripted Distribution: Enabling the Advanced option allows custom distribution logic via scripting. Scripts can query target records and calculate allocation amounts precisely, offering flexibility beyond even splits.
- Script Variables: During scripted processing, variables like distCost (the distribution cost GlideRecord) and distCostAmount (the cost amount in system currency) are available for use within scripts.
- Expense Line API: Scripts use the ExpenseLine API to create expense line records, facilitating detailed cost allocations.
- Automated Processing: Distribution costs are processed daily by a scheduled job named Process FM Costs, ensuring up-to-date cost distribution without manual intervention.
Practical Application
ServiceNow customers can utilize distribution rules to manage how costs are allocated across various records or entities within their financial management system. For straightforward cases, even cost splits based on table and condition filters suffice. For more complex scenarios requiring customized cost allocation, customers can leverage scripted distribution rules with access to key data and APIs.
By properly defining these rules, customers ensure that cost distribution aligns with organizational policies and reporting needs, improving financial accuracy and transparency.
Define distribution rules to view distribution costs that are distributed according to the rules.
| Field | Input Value |
|---|---|
| Name | A unique name for the rule. |
| Active | Determines if the rule is actively used. |
| Advanced | If checked, the distribution rule will be determined by script. If not checked, it will be determined by table and conditions. |
| Description | A description of the rules and any notes on its use. |
| Script | If Advanced is true, the script which will determine the rule's behavior. |
| Table | If Advanced is false, a list list of tables to find the records to distribute the cost to. |
| Condition | If Advanced is false, a condition builder to determine which records will receive the distributed cost, on the table determined by the Table field. Cost amount will be distributed evenly across the records identified by the table and condition values. This field uses the Condition Count Widget to preview what records would be returned by the conditions. |
Once submitted, the Distribution Costs related list is displated, which helps determine which costs will be distributed according to the rules.
Scripted distribution
Scripted distributions allow for custom distribution amounts, versus the evenly split distributions when using table and condition filters.
- Check the advanced field check box, this will display the script field.
- Build the script using the following concepts:
- Query for target records and data to use for calculating the allocation amount.
- Create expense line records using the ExpenseLine API.
For more information, see ExpenseLine.
- distCost - GlideRecord for the distribution cost, allowing access to all fields.
- distCostAmount - cost amount in the system currency.
Processing Distribution Costs
A scheduled job called Process FM Costs automatically processes distribution costs daily.