PSP Rounding Rules Module

The Rounding module allows users to round prices to business-friendly values. Rounding is done by using a defined set of rules. This set can be expanded if needed.

Note:

  • Values from PSP Exception Module will not be rounded (manually overridden prices and Exception Prices).

     

  • Default Manual Override of Pricefx will be rounded.

     

  • Only List Price is rounded for each calculated strategy. So when using the Net Calculation Level, it only rounds the Gross Price.

Mechanism

This module rounds prices to business-friendly targets. Manually overridden prices and Exception Prices will not be rounded.

Targets

  • To49Cents: XXX.YYY => XXX.49

  • To50Cents: XXX.YYY => XXX.50

  • To95Cents: XXX.YYY => XXX.95

  • To99Cents: XXX.YYY => XXX.99

  • ToWhole: XXX.YYY => XXX

  • To5Whole: XXX.YYY => XX5

  • To49Whole: XXX.YYY => X49

  • To99Whole: XXX.YYY => X99

  • RawPrice*: XXX.YYY => XXX.YY

  • NoRounding: do not round

Modes

  • UP – Round away from zero.

  • DOWN – Round towards zero.

  • HALF_UP – Round towards "nearest neighbor" unless both neighbors are equidistant, in which case round up.

  • HALF_DOWN – Round towards "nearest neighbor" unless both neighbors are equidistant, in which case round down.

More information about rounding mode definitions and examples can be found at Rounding Modes.

Configure Rules

In the rounding rules configuration table, specify these fields:

  • From (must be PP key1) – The price to be rounded should be greater than or equal to this field value.

  • To (must be PP key2) – The price to be rounded should be less than this field value.

  • Dependency Mapping Field – The value to be used for dependency mapping. Not required if using the table mapping mode.

  • Rounding Rule – The target to be applied.

  • Rounding Mode – The mode to be applied.

  • Valid From – Valid start date. Optional.

  • Valid To – Valid end date. Optional.

Examples:

Rule Data Source

Lookup

  1. Search for records of the current dependency level in the selected source table. If none is found, use the dependency fallback mechanism.

  2. Filter records with current valid time configuration.

Configuration

Set Module Status

Set the status in the PriceSettingModules PP table which the module name is PSP_ROUNDING_RULES_MODULE

Set Rule Data Source

  1. Set the data source configuration in the PriceSettingConfig PP table with the key Rounding Rules. Details can be found at https://pricefx.atlassian.net/wiki/spaces/ACCDEV/pages/2595946594.

  2. Set the dependency mapping in the DependencyMapping PP table with the key Rounding. Details can be found at DependencyMappingConfig PP.