Defining distribution rules
Summarize
Summary of Defining Distribution Rules
Distribution rules in ServiceNow Financial Management enable you to allocate distribution costs based on specified criteria. These rules help you view and manage how costs are distributed across records, either evenly or using custom logic. Defining these rules ensures accurate financial cost allocation according to your business needs.
Show less
Key Features
- Rule Definition: Create new distribution rules via Financial Management > Admin > Distribution Cost Rules, providing a unique name, description, and activating the rule.
- Distribution Logic: Choose between two modes:
- Standard Mode: Use table and condition filters to evenly distribute costs across matching records. The Condition Count Widget previews affected records.
- Advanced Mode (Scripted Distribution): Enable the advanced checkbox to use custom scripts, allowing tailored distribution amounts instead of even splits.
- Scripted Distribution: When advanced is enabled, scripts can query target records and calculate custom allocation amounts using the ExpenseLine API. Key variables such as
distCostanddistCostAmountare available for scripting logic. - Post-Definition: Once a distribution rule is saved, the related Distribution Costs list displays the costs allocated according to the rule.
- Automated Processing: A scheduled job named Process FM Costs runs daily to process all distribution costs automatically, ensuring up-to-date financial allocations.
Practical Use for ServiceNow Customers
By defining distribution rules, you can automate and customize how financial costs are allocated within your organization. Use standard rules for straightforward even distribution or scripted rules when you require complex allocation logic. The automated daily processing ensures that your financial data remains current without manual intervention, supporting accurate budgeting and cost tracking.
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.