Assortment
General Logic
Within your SCAYLE instance you have one global product pool.
If you run multiple Shops within SCAYLE you can define a subset of the global product pool to be shown & sold on a specific shop.
This also holds true for a shop country entity.
Manage Assortment via Include & Exclude Rules
You can define your assortment via Include- and Exclude rules. The definition of those rules is done on Shop Country level.
There are multiple Entities which can be used for Include- and Exclude Rules:
- Master Categories
- Individual Products
- Attributes/ Attribute Groups
- Merchants
If you have a specific Filter-Logic which is not represented in the list above (e.g. 'Product Brand') we recommend you to use the 'Attributes' Option. This gives you the highest flexibility since you can configure the Attributes/Attribute Groups of your Products by your own.
The combination of all filters will build your final product assortment, e.g., if you configure the master categories to include "shirts" and additionally configure Attribute Groups to exclude the attribute color with the value "red" you will end up with a product set of non-red products in the master category shirts.
Master Categories
You can either include or exclude category paths to reduce your assortment to a set of master categories. Trying to have included and excluded sets for master categories at the same time will result in an error.
Products
You can specify product includes/excludes by providing product IDs. This will not reduce your assortment to the provided information, instead it will add or remove specific products to/from your assortment. In this context it is valid to provide includes and excludes at the same time.
An example: If you have configured your master categories to include "shirts" but you still want to have a specific product in your results set, which does not meet the existing include/exclude criteria, you would add the product ID to the include filter.
Attribute Group
You can reduce your assortment to an Attribute Group by providing either attribute values to include or exclude. Trying to have included and excluded sets within the same attribute will result in an error.
Merchants
You can limit your assortment to specific merchants or allow all merchants except particular ones. Trying to have included and excluded merchants at the same time will result in an error.
If no merchant includes or excludes are configured for a shop country then products of any merchant are considered for the assortment.
When no merchant restrictions are set or assortment excludes merchants, and a new merchant is created, its products are considered for the assortment as soon as they appear in the system.
Assortment Rule changes
When you update your assortment rules all products of your instance are re-calculated to validate if they are matching your new assortment rule. This is done in the background but can take some time (especially on large assortments).
After the initial re-calculation all other updates in the future are fast and new products matching your assortment rules will show up in your shop in an automated way.
Define Assortments
Define assortments as follows:
- Navigate to
Shops > Shop Name > Internationalization > Assortment
. Here, you can determine which products are added to, or excluded from, the shop's assortment. - Define shop criteria by clicking Add Criterion.
- Allocate a shop assortment by defining different criteria. See below for more details.
Two general criteria groups are used for defining assortments:
- System criteria
- Attribute groups
If no criteria have been defined, the system will initially include all products it can find in SCAYLE.
Admin API
Learn how to update a shop country's assortment by defining included and excluded filter sets.
Add Assortment Rules
You can manage your assortment easily via the SCAYLE Panel.
You can also define your assortment rules programmatically via the Admin API.
Add all 'Shoes' & 'Shirts' to your Shop
In the example below we include all Products with the Master Category Fashion > Shirts' and 'Fashion > Shoes
into the Shop Country Shop with the prefix 'ms' and the Shop Country 'DE' (Germany).
$assortment = new Assortment();
$masterCategories = new MasterCategoryAssortmentConfiguration();
$masterCategories->include = [
[
"Fashion",
"Shirts"
],
[
"Fashion",
"Shoes"
]
];
$assortment->masterCategories = $masterCategories;
$assortment = $adminApi->shopCountries->updateAssortment("ms", "DE", $assortment);
Update assortment
In SCAYLE, you update shop country assortments by narrowing down or extending product sets based on different criteria. By including or excluding master categories, product IDs, or attributes/Attribute Groups, you replace the current assortment with the updated one.
- This method does not support partial updates.
- This process can take some time and is processed in the background.
let response = await adminApi.apis.Shops.updateAssortment({shopKey: shopKey, countryCode: countryCode}, {requestBody: assortment});
let assortment = response.body;
Parameters
Parameter | Details |
---|---|
masterCategories | MasterCategoryAssortmentConfiguration Configuration of master category includes/excludes. |
products | ProductAssortmentConfiguration Configuration of product includes/excludes. |
attributes | AttributeAssortmentConfiguration Configuration of attribute includes/excludes. |
merchantReferenceKeys | MerchantAssortmentConfiguration Configuration of merchant includes/excludes. |
Examples
let assortment = {
masterCategories: {
include: [
[
"Fashion",
"Shirts"
],
[
"Fashion",
"Shoes"
],
]
},
products: {
exclude: [1,2]
},
attributes: [
{
name: "color",
exclude: ["red", "yellow"]
}
],
merchantReferenceKeys: {
include: ["acme"]
}
};
let response = await adminApi.apis.Shops.updateAssortment({shopKey: "ms", countryCode: "DE"}, {requestBody: assortment});
let updatedAssortment = response.body;