How to set up a product to be on sale
Introduction
SCAYLE offers several out of the box capabilities to show products in sale. You can use the features to show a batch of products in sale or you can show categories that include sale products only.
How is a product variant in Sale defined in SCAYLE?
The current price
of a product variant needs to be lower than the old price
. If this applies, the SCAYLE system automatically calculates the reduction between price in relation to old price and provides the opportunity to show a Sale batch. The relative and absolut reduction is exposed via Storefront API in appliedReductions
object.
Additionally, you have the opportunity to schedule SCAYLE price campaigns that are short term reductions or promotions that will reduce the price on top. We will concentrate on regular reductions provided via third party tenant’s system and SCAYLE campaigns in the tutorial. For more information on Promotions you can have a look here.
This is one example for a shoe product in a campaign:
regular reduction (prices in cents)
Price: 8000
Old Price: 10000
Leads to a reduction of 20%.
SCAYLE Campaign on top (prices in cents)
20% on shoe products
(Campaign) Price: 6400
Price: 8000
Old Price: 10000
Use Case
We would like to showcase five interesting use cases in regard to “Products in Sale” in this tutorial:
- define a relative sale threshold in order to avoid products with a price different of e.g. 1 cent to be shown as sale products.
- set the recommended retail prices as calculation basis (old price).
- show a sale flag on the PDP and PLP for each product on sale.
- enable a sale filter on the PLP (toggle).
- enable a “Sale” shop category including all products under clothing in Sale.
- create a shop category e.g. “Crazy Campaign Sale”, including only products reduced by a specific campaign for example a “crazy reductions - everything must go” campaign.
Prerequisites
Before you tackle this topic, you should have a basic understanding of how prices are handled in SCAYLE and how shop management works in SCAYLE. Please read the following chapters:
- Add prices to your products
- Configurations
- Create shop
- Understanding Your Shop Structure
- Default Filter
- Price Campaigns
Define Sale Thresholds
You can define an absolute or a relative sale threshold.
In case you would like to define a sale threshold of 15 % that would mean the following:
- product variant 1, sale threshold set to 15 %
- price: 1800
- old price: 2000
Price would be 1800 and no sale shown as the relative price difference is only 10 % which is below 15.
- product variant 2, sale threshold set to 15 %
- price: 1600
- old price: 2000
Price would be 1600 and sale shown as the relative price difference above 15 %.
The Sale threshold can only be configured by SCAYLE, please reach out to your SCAYLE Account Manager.
Define Recommended Retail Price (RRP) as old price calculation base
You have the possibility to add a recommended retail price as part of the price creation/ update of a product variant. In case you would like to adapt and apply the sale logic and calculation on this RRP instead of the old price, you can use the setting under Settings ➜ Configuration ➜ Old Price in the SCAYLE Panel:

Just type in rrp
instead of old_price
into the field old_price_base and click on the save icon:

Show Sale Flag on your Frontend
The Sale Flag will flag products in sale or in a campaign. In order to show a Sale flag, you would need to apply the following logic in your Storefront:
- In case you would like to check if the product variant has any entry (campaign or sale reduction) in appliedReductions object using the products endpoint you need to use price range in order to see min and max prices for that product across the different variants:
Example call for products with price range:
https://{{tenant-space}}.storefront.api.scayle.cloud/v1/products?shopId={{shop_id}}&with=priceRange
In case your company is called Fashion Cloud and you would like to test it on the test environment using the shop id of the fashion store e.g. Germany with 10001, it could look like this:
https://{{tenant-space}}.storefront.api.scayle.cloud/v1/products?shopId=10001&with=priceRange
Example Call for variants: https://{{tenant-space}}.storefront.api.scayle.cloud/v1/variants/{variant_id}?shopId=10001&with=variants

- In case the condition is met you can show a sale flag on your product (variants).
Sale filter Setup
The Sale filter will filter for products in sale or in a campaign. The Sale filter (toggle) is part of the SCAYLE standard filters, you can select it for your shop under Shops ➜ Storefront ➜ Default Filter and it will be exposed via Storefront API filters endpoint.

Sale Category Configuration
In case you would like to create a Sale category that only includes products in sale (campaign or sale reduction), you would first need to create the category on global level with all necessary settings (assortment, filters):

After that, you need to set the sale property on country level and save the changes:

The property is inherited by all child categories, thus you only need to set it on the first level.
Shop category with campaign products only
Campaigns are created in the SCAYLE Panel under Shops ➜ Promotions ➜ Price Campaigns.
Campaign Setup
- create your campaign and give it a name “Add your campaign name, e.g. “Crazy Campaign”
- provide a campaignKey you would like to use for it
- provide the market where the reduction is shown (Germany, Switzerland e.g.)
- provide the timeframe


Category Creation
- create your category

- create the product set rules (category assortment) as usual. If you do not know how to create product sets, check this documentation.

- As described here, you need to activate the shop category in the respective country so that it can be shown in the shop category bar in the frontend. You could provide a campaignKey in your custom data (if setup and part of your concept) in order to provide the frontend with the information which campaignKey it needs to apply.

Frontend Implementation
- You can filter products for example using categories and campaigns. These filters are needed to accelerate the use case.
- This is how you could filter a category using a specific campaign: https://{{tenant-space}}.storefront.api.scayle.cloud/v1/products?shopId={{shop_id}}&filters[category]={category_id}&filters[hasCampaignReduction]=true&campaignKey={campaign_key}
This is how it would look for Fashion Cloud Test using the category id 3099
and campaignKey crazy
.
- https://{{tenant-space}}.storefront.api.scayle.cloud/v1/products?shopId=10001&filters[category]=3099&filters[hasCampaignReduction]=true&campaignKey=crazy
You need to define how the frontend can fetch the campaignKey
it needs to use and apply in order to get the Campaign Prices. Either it can call the campaigns endpoint in the Storefront API to get the latest campaignKey
Or you can define a more complex concept where campaignKeys
are mapped to customer groups using for example shop custom data. See here how to use and setup shop custom data.
Best practices
- Campaigns cannot be combined with one another in a basket. That means in case you would like to use different campaigns per target group you need to define a logic and make sure one campaign is shown / used by one client. For example, you can use custom data to define which target group should see which campaign prices. Campaign keys would need to be aligned beforehand.
- You can combine Sales Prices coming from your ERP system with SCAYLE campaigns. Campaigns are put on top of any Sales Prices and reduce the sales prices.