This document explains prices, discounts and campaigns in general and the use of the XTND API Extend Commerce API endpoint CustomerOrderCampaignProcessor
...
- Get price for an order row
- If price is specified that price will be used. This is prefered.
- If no price is specified XTND will Extend Commerce will use the minimum price from the price list/discount lists available for the customer
- If no price is specified and a PromotionCode is set, XTND will Extend Commerce will try to find minimum price from discount list using the specified PromotionCode. A discount list with promotion code does not need to be connected to the customer.
- Expand any bill of materials product. If the product is bill of materials, its child products will be added as new order rows referring to their parent using the property billOfMaterialsParentRowPosition. For API preview/campaign validation, the price of the bill of materials will be kept on parent. The added child rows will get price=0.
- Campains are applied if the campaigns are connected to the Customer. Campaigns can have an additional condition of needing a PromotionCode. Order rows added by a campaign will have output isResultOfPromotion=true and promotionName=’Name of promotion in use’. A campaign can result in an added order row with negative price, eg “10% discount when total amount is greater than 100”
- “Product auto order” (eg buy two get one for free) is applied for all customers. Order rows added by “Product auto order” will have output isResultOfPromotion=true and promotionName=null. Additional info is placed in CustomerOrderRow.product.productNotes = ‘Auto ordered, triggered by product {TriggerProductName}’
- Campaigns for freight discounts are applied last.
...
When placing an order using XTND API Extend Commerce API (endpoint CustomerOrders) the following is expected:
...