Sample Integration

How you can use the data from the ESW Pricing Advisor v4.0 to calculate product prices in the shopper currency

Calculate shopper prices

The following use cases describe how you can use the data from the ESW Pricing Advisor v4.0 to calculate product prices in the shopper currency from the retailer currency using ESW’s pricing calculation formula.


API Use Case 1

In this example:

  • Retailer Base Price: 1500 USD
  • Shopper Currency: JPY
  • API Response Fields:
    • currencyExponent: 0
    • direction: None
    • model: none.none

Request

Request
GET api/4.0/ StandardAdvice /ABCABC/KW

Response

Response
{
  "id": "ABCABC_JP",
  "countryIso": "JP",
  "tenantIdentifier": "ABCABC",
  "version": "6fbebf7a-a5a3-9871-Ac6a-b79bcfbc7a51",
  "categories": [
    {
      "id": "default",
      "estimatedTax": 8.00,
      "estimatedDuty": 3.00,
      "estimatedFee": 0.00,
      "retailerAdjustment": 4.00,
      "roundingConfigurations": [
        {
          "currencyIso": "JPY",
          "currencyExponent": 0,
          "direction": "None",
          "model": "none.none"
        }
      ],
      "currencyDisplays": [
        {
          "currencyIso": "JPY",
          "currencySymbol": "¥",
          "currencyExponent": 0,
          "decimalSeparator": "",
          "thousandSeparator": ",",
          "showTrailingZeros": true,
          "configurationString": "[CurrencySymbol][Number][DecimalSeparator][Exponent]"
        }
      ]
    }
  ],
  "fxRates": [
    {
      "from": "USD",
      "to": "JPY",
      "rate": 111.37
    }
  ]
}

When the pricing formula and rounding are applied, the final price in the shopper currency will be 193,265 YEN, which is derived from the following calculation:

(((USD 1,500.00 × (1 + 4.00%)) × (1 + 3.00%)) × (1 + 8.00%)) × 111.37 = JPY 193,265JPY 193,265

Formula

((((Product base price × (1 + retailerAdjustment / 100)) × (1 + estimatedDuty / 100)) × (1 + taxPercentage / 100)) × (1 + feePercentage / 100)) × fxRate = Price in the shopper currency → apply rounding = Final product price