Advanced Free Shipping
Set up Advanced Free Shipping via the SCAYLE Panel when you need more complex and granular conditions than the standard Free Shipping flow supports.
Introduction to Advanced Discounts
Advanced Discounts allow you to define more complex and granular conditions for Automatic Discounts, Buy X Get Y, Combo Deals, and Free Shipping. 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 Customer Segments feature.
Examples of cel-go and Math extension expressions:
This condition can be used to validate if current item is the item with the highest price
This second condition can be used to validate if current item is the item with the lowest price
payload.items.filter(it, it.price == math.least(payload.items.map(i, i.price)))[0].price == item.price
The following condition will check for a sum of specific brand item totals within a basket (for example 1000 or more euros of NIKE brand within basket)
The following condition will check if the sum of the basket is higher than 20 euros
Note that prices are expressed in euro cents, not euros
The following condition checks if the current item has a brand attribute and excludes items that match specific brand IDs:
Available Condition Parameters
The following table lists the parameters available in CEL conditions.
| Parameter | Type | Description |
|---|---|---|
item.price.withTax / item.price.withoutTax | Integer | Item unit price in cents, including or excluding tax. |
item.totalPrice.withTax / item.totalPrice.withoutTax | Integer | Total item price (unit price × quantity) in cents, including or excluding tax. |
item.quantity | Integer | Quantity of the item in the basket. |
item.product.masterCategoryId | Integer | Master category ID of the product. |
item.product.shopCategoryIds | List<Integer> | Shop category IDs the product belongs to. Use in to check membership. |
item.product.attributes['<key>'] | List<Integer> | Product attribute values by key (list of attribute value IDs). Always check existence with has(item.product.attributes.<key>) before accessing. |
item.variant.attributes['<key>'] | List<Integer> | Variant attribute values by key (list of attribute value IDs). Always check existence with has(item.variant.attributes.<key>) before accessing. |
payload.items | List | All items in the basket. Use for global conditions that evaluate the entire basket context. |
payload.customer.* | Object | Customer context attributes. Only evaluated in Checkout, not in the Storefront. |
Condition template:
To include items with a specific attribute value:
To exclude items with specific attribute values (using the ! operator):
Create a new Advanced Free Shipping
- Select the Shop where you want to create your promotion and go to Promotions ➜ Advanced Promotion
- Click the + New Advanced Promotion button.
- In the Name field, type a name for the promotion (visible internally only).
- Select a Promotion type: Automatic Discount, Buy X Get Y, Combo Deal, or Free Shipping. You can choose only one type. This guide covers Free Shipping.
- Enter a whole number in the Priority field. SCAYLE does not evaluate this value itself; it passes it on to your shop, which decides how to use it, for example lower numbers first, higher numbers first, or not at all. If you're unsure how your shop uses it, check with your development team.
- In the Display Name field, type the name of the promotion that will be shown to the customer during the Checkout Process. It can also be used on email templates and Invoices.
- Select a Start date and End date.
- In Countries: Select which shop countries are eligible for the promotion.
- In Customer segments, select customers you want to allow or block from this promotion. See how to create a Customer segment here
- Select whether the promotion should be combinable with other promotions.
- If selected, enter Combinable promotion IDs in the Allowlist or Blocklist. For details see Multiple Promotions on Item Level
- Under Automatic Discount please leave the template "automatic discount", and discount type "Free shipping" selected. You can then choose what carriers and shipping methods will be free.
.png)
- You can also select the toggle Apply with external cost provider, to apply for 3rd party services.
- You can then add further Conditions to the promotion - such as a minimum order value (MOV).
- Finally you can enable the toggle Promotion Design if you want to change the visual appearance of the promotion and localize it.
.png)
.png)
- You can check how your promotion looks in the preview on the right-hand side.
.png)
- You can check how your promotion looks in the preview on the right-hand side.
- Click Create.
Editing or Deactivating an Advanced Free Shipping
- Select the Shop where you want to edit your promotion and go to Promotions ➜ Advanced Promotion.
- Select an already created Promotion.
- Click the Edit button.
- Update the rules as needed, or deactivate the promotion by setting Status → Inactive.
- Click save.