docs
  1. Developer-guide
  2. Shops
  3. Assortment

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.

Product data is centralized and assigned to specific shops

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:

  1. Navigate to Shops ➜ [Shop] ➜ Internationalization ➜ Assortment. Here, you can determine which products are added to, or excluded from, the shop's assortment.
  2. Define shop criteria by clicking Add Criterion.
  3. 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).

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.

Hint: Handling Shops with Multiple Languages in SCAYLE

When working with SCAYLE, issues can arise for shops that operate in multiple languages (e.g., Switzerland – CH or Belgium – BE).

Typical issue

If you use shopKey + countryCode for such shops, you may encounter the following error:

Solution

Instead of using countryCode, use the shopId to avoid ambiguity. The shopId uniquely identifies the correct shop-country combination, even in multilingual setups.

Parameters

ParameterDetails
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

Partially update assortment

The following block describes the endpoint for partial updates of shop country assortments in SCAYLE. This endpoint allows granular control by adding or removing specific products, categories, attributes, and merchant reference keys within an inclusion or exclusion strategy.

Parameters

ParameterDetails
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.

Validation rules

  • General: You must send at least one of masterCategories, products, attributes, or merchantReferenceKeys in the request.
  • masterCategories, attributes, and merchantReferenceKeys:
    • You must use either include or exclude, but not both.
    • If the existing strategy is different (e.g., the request uses include, but existing data uses exclude), the request will fail. Remove the existing configuration first.
    • If using include or exclude, you must provide at least one of add or remove within it, and these arrays must contain at least one element if present.
  • products:
    • You can use both include and exclude.
    • Within each of include or exclude, at least one of add or remove must be present, and these arrays must contain at least one element if present.

Examples