docs
  1. Promotions
  2. Setting Up Promotions Per Type
  3. Advanced Automatic Discounts

Advanced Automatic Discounts

Set up Advanced Automatic Discounts via the SCAYLE Panel when you need more complex and granular conditions than the standard Automatic Discounts flow supports.

Introduction to Advanced Discounts

Advanced Discounts allow you to define more complex and granular conditions for Automatic Discounts, Buy X Get Y, and Combo Deals. These configurations help tailor promotions to specific customer behaviors or product attributes.

When setting up advanced discounts, consider where the conditions should apply:

Item Conditions: Conditions that apply to items. Example: Only apply a discount to items that are red or belong to a specific product attribute group.

Global Conditions: Apply to the entire basket or customer context. Example: The basket must contain at least 3 items from a specific brand.

You can use these condition types in combination to build precise and effective promotions.

Condition Definition

Conditions (both global and Item conditions) are defined using Google Common Expression Language (CEL). SCAYLE’s implementation is based on Go (cel-go) with the Math extension (math.greatest(), math.least()) and an additional sum() function.

Note: Attributes on payload.customer.* are only validated in Checkout (not in the Storefront). If you want to evaluate customer conditions early, use the audiences feature.

Examples of cell-go and Math extension expressions




Note that prices are expressed in euro cents, not euros

Create a new Advanced Automatic Discount

  • Select the Shop where you want to create your promotion and go to Promotions ➜ Advanced Discount
  • Click the + Advanced Discount button.
  • Enter a promotion Name.
  • Select a Type: Automatic Discount.
  • Select a Start date and End date.
  • Enter a number for Priority. This determines the priority of the promotion in the case that there are multiple promotions active at the same time.
  • Select whether the promotion should be combinable with other promotions.
    • If selected, enter Combinable promotion IDs in the Allowlist or Blocklist.
  • In Countries, select in which countries of the current shop the promotion should be valid.
  • In Audiences, select for which customer audience the promotion should be valid.
  • Add the Automatic Discount of the promotion.
  • Add at least one Condition to the promotion.
  • Click Save.

On the right side you can see a nifty summary of all your promotion is doing.

Edit or Deleting an Advanced Automatic Discount

Edit

  • Select the Shop where you want to edit your promotion and go to Promotions ➜ Advanced Discount.
  • Click the Edit button.
  • Note from here you can update your rules on the same template you used to create it OR
  • Deactivate the discount, for this click on the 3 vertical dots besides Edit ➜ Deactivate
  • Hit save

Delete

  • Select the Shop where you want to edit your promotion and go to Promotions ➜ Advanced Discount
  • Click on the 3 vertical dots besides Edit Delete
  • Confirm on pop up