Price and Discount

In this article

Discounts

Before prices and discount can be replicated, a COMMERCE_xxxx Scheduler Job in LS Central must be executed.

Job Description
COMMERCE_INIT Generates best price and gets discounts and other information for the current day for all items.
COMMERCE_UPDATE Updates this data for items that have been updated since the last COMMERCE_UPDATE was scheduled. Should be scheduled to run frequently. COMMERCE_INIT is just needed for first time and in case of new store or if whole data needs to be replicated again for all stores.
COMMERCE_INVENTORY Updates current inventory status for all items assigned to a Store that has the Web Store check box selected.

Prices

Prices are replicated with either of these two functions:

  • ReplEcommPrices

    These are the “best prices” for today, based on the price engine that LS Central has in place. The data for this function comes from WI Prices table in LS Central.

    Note: Only Price with VAT is included in this data.

  • ReplEcommBasePrices

    Gets data directly from the Sales Price table in LS Central. These prices can be found in the Retail Item Card in LS Central, in the Pricing FastTab.

The main difference between these two functions is that Best price must be generated by running the COMMERCE_xxxx Job in LS Central and the data must be replicated daily to get the best price for today. There is no start or end date for those prices.

Sales Price is taken “as is” from LS Central so it can be set up for the item in the Retail Item Card, in the Pricing FastTab with a start and an end date. These prices do not take into account any price modification that could be in place in LS Central.

Only Periodic Offers which consist of Discount Offers, Multibuy Discounts, and Mix & Match are available for replication with Commerce Service.

Discounts

Discounts are replicated with these two functions:

  • ReplEcommDiscounts

    Gets Periodic Discount Offers and Multibuy Discounts, including the discount Percent and minimum quantity for Multibuy Discounts. Use this function to calculate discounts from Price replication functions.

  • ReplEcommMixAndMatch

    Gets Mix & Match Offers information, no setup for the Mix & Match is delivered, only what items are involved and descriptions of the offer. Use this function only to display that an item is part of some offer. To be able to get the discounted value, the basket must be sent in for calculation and LS Central will then return the price for the basket based on the Mix & Match offer.

Both these functions return offers with a start and end date, so it is possible to see the validation dates for the offers. A Priority value is also included, which tells which offer would be taken first, if an item is part of more than one offer. In both cases, the Basket Calculation will always return the real price and discount based on the LS Central Price and Discount engine, and should always be displayed prior to the user confirming the final order.

DiscountsGet can be used to send in a list of items to get all available offers for those items, based on the Loyalty Scheme code, if it is sent in with the request. This function can be used in the Item List, by sending in all the item codes for that page or when displaying the shopping basket.

The data returned is the Offer Code and a description of the offer that can be used to display information about what offers are available for the items. No discount values or percents are delivered.

ItemsGetByPublishedOfferId is a function that returns a list of all items that belong to a published offer.