Price matching
Was this helpful?
Was this helpful?
Finds the best price based on specified criteria.
In simplification, the price matching algorithm is made up of the following steps:
All prices that match the specified criteria are fetched.
A unified originalValue
is calculated for each price.
The price with the lowest effectiveValue
is returned.
To use the price matching functionality, you need to define appropriate tax classes in the Tax Service and then assign them to products for which prices will be matched through the Product Service.
Special cases:
If the matched price currency is different than the requested currency, the price is calculated based on exchange rates.
Note: To calculate prices in different currencies, you need to define their exchange rates in the Currency Service.
If the matched price location is different than the requested location, the price is calculated based on tax classes.
Note: To calculate prices for different locations, you need to assign their tax classes to the product for which the price is matched. Tax classes need to be defined in the Tax Service and then assigned to the product through the Product Service.
The includesTax
setting, defined at the site or price model level, determines if the algorithm returns net or gross prices. The endpoint returns the best price as a gross or net depending on the following cases:
If requested site's includesTax
field is specified (through the Site Settings Service):
If the includesTax
field is set to true
, the matched price is returned as a gross value.
If the includesTax
field is set to false
, the matched price is returned as a net value.
If requested site's includesTax
field is not specified:
If the includesTax
field in the price model associated with the price is set to true
, the matched price is returned as a gross value.
If the includesTax
field in the price model associated with the price is set to false
, the matched price is returned as a net value.
price.price_manage
price.price_read
Your Emporix tenant's name.
Note: The tenant should always be written in lowercase.
^[a-z][a-z0-9]+$
Code of the currency in which the prices should be matched, as defined in the Currency Service.
Note: If the matched price is defined in another currency, a currency exchange algorithm will be used, but only if exchange rates between the two currencies have been defined.
Code of the site to which the matched prices should apply.
If no price that matches the criteria is found for the specified site, the price matching functionality will try to find the best price for the main
site. To enable this option, this field needs to be set to true
.
Note: Using the fallback mechanism may impact the performance as the price matching has to run a second time. If the fallback mechanism is used, the response's siteCode
field will be set to main
.
Finds the best price based on information retrieved from the session context.
The behavior of the logic is the same as of the price/{tenant}/match-prices (function/mechanism?). The only exception is that the criteria are created based on the information retrieved from the session details assigned to the access-token in the Session-context Service`.
The list of items is also needed as body parameter (similar to the other endpoint).
Your Emporix tenant's name.
Note: The tenant should always be written in lowercase.
^[a-z][a-z0-9]+$