Rounding Rules
Configure rounding rules per country through the SFCC Business Manager.
Rounding Prices
The ESW-SFCC cartridge enables merchants to control how prices are displayed across the storefront, shopping cart, and ESW Checkout by configuring the ESW Rounding Rules.
These rules apply only to countries and currencies that use the Calculated Pricing Model.
Implement Rounding Rules
Rounding behavior is configured within Salesforce B2C Commerce Business Manager. To define or modify rounding rules:
Navigate to Merchant Tools → Custom Objects → Custom Object Editor → ESW_PA_DATA → ESW Rounding Rules
Once configured, these rules will be applied automatically to all prices calculated via the ESW Pricing Advisor, ensuring consistent price presentation across the shopper journey.
How Rounding Rules Are Applied
The ESW Rounding Rules are automatically applied to the appropriate country and currency after the retailerPricingFeed job is executed.
Below is a sample payload structure illustrating how rounding rules are assigned per country and currency:
GBP, JPY 2 for GBP Up, Down, Nearest Fixed, Multiple, and None. For the multiple1000.none or none.fixed99 rounding models, the rounding methods are Fixed, Multiple and None Multiple Currency Rounding Rules per Country
Model Rules
The following model rules govern how price values are adjusted based on the relationship between the currency exponent and the number of digits defined in the rounding model:
Truncate
If the number of digits in the rounding model exceeds the number of digits allowed by the currency exponent, the extra digits are truncated.
Extend
If the currency exponent allows more digits than the rounding model specifies, the model is extended with trailing zeros.
Parameters and Values
| Parameter | Value |
|---|---|
| Shipping country | France |
| Base currency | EUR |
| Price book currency | EUR |
| Shopper currency | GBP |
| Product price in the price book | EUR 100 |
| Uplift | 3% |
| Duty | 7% |
| Tax | 20% |
| FX Rate (EUR – GBP) | 0.8313 |
Based on these values, the calculated price will be 109.9410876 GBP.
Calculated as: Price of product in price book x Uplift x Duty x Tax x FX rate
= 100 x 1.03 x 1.07 x 1.2 x 0.8313
= 109.9410876.
ESW rounding rules applied to the calculated price.
Rounding rules and examples
Rounding Method: none
Based on this, 109.9410876 GBP is displayed as 109.94 GBP on the storefront.
Rounding Method: fixed
Based on this, 109.9410876 GBP is displayed as 110.25 GBP on the storefront, and the shipping cost 27.49 is displayed as 28.25 GBP in the cart.
Rounding Method: multiple
When the multiple1000 rounding logic is applied, 14713/1000 = 14.7 > Nearest > 15 > 15 x 1000
= 15000
The difference in product prices before and after the rounding model is applied is recorded at the order product line item level as the ESW Delta Rounding Value.
ESW Rounding Rules Matrix
| Currency Exponent | Direction | Exponent Rounding (Fixed) | Exponent Rounding (Multiple) | Exponent Rounding (None) | Whole Number Rounding (Fixed) | Whole Number Rounding (Multiple) | Whole Number Rounding (None) |
|---|---|---|---|---|---|---|---|
| 0 | Up | N/A | N/A | N/A | Supported | Supported | Supported |
| 0 | Down | N/A | N/A | N/A | Supported | Supported | Supported |
| 0 | Nearest | N/A | N/A | N/A | Supported | Supported | Supported |
| 2 | Up | Supported | Supported | Supported | Supported | Supported | Supported |
| 2 | Down | Supported | Supported | Supported | Supported | Supported | Supported |
| 2 | Nearest | Supported | Supported | Supported | Supported | Supported | Supported |