...
- Price Records are NOT defined for a specific product and customer but rather for a group of products and a group of customers.
- Potentially more Price Records can be valid at the same time for the same product and customer – so you need to figure out which conditions to use. (Here, for example, the Priority field can be used. But that is not a universal solution.)
- Price Records are not valid foreverindefinitely, but only for a limited time period.
...
The trickiest part is the filter for products and customer customers – that's what we show in the example below. The You need to provide here the other filters (for Date and Priority, etc.) you need to provide here as well.
Code Block | ||
---|---|---|
| ||
def productFilter = api.productToRelatedObjectsFilter("PR", api.product("sku")) def customerFilter = api.customerToRelatedObjectsFilter("PR", api.customer("customerId")) def priceRecordRows = api.find("PR", productFilter, customerFilter) |
...