This is the early access documentation preview for Custom Views. This documentation might not be in sync with our official documentation.

Cart Discounts

Managing Discounts applied to a Customer's Cart

A Cart Discount applies to a Cart's Products or other aspects of the Cart, like shipping fees. They are applied after adding a Product to the Cart in the order of their Rank (sortOrder) value. The Do not apply any further cart discounts after this one option stops Cart Discounts (ranked lower than Rank (sortOrder) value) from applying.

They are useful when creating Discounts for the following scenarios:

  • Free shipping discounts or free shipping over a certain cart amount
  • Seasonal sales for a group of products
  • Membership or customer group discounts

The number of active Cart Discounts in a Discount Code is limited to 10.

The number of active Cart Discounts that do not require a Discount Code is limited to 100. For Stores, the number of active Cart Discounts that do not require a Discount Code is limited to 100. Thus, the overall limit of active Cart Discounts that do not require a Discount Code is 100+(100*number of Stores in a Project).

Create a Cart Discount

You can create two types of Cart Discounts:

  • Numeric: applies a relative, absolute value, or fixed price Discount to a Cart. The numeric Cart Discounts are useful in the following scenarios:

    • Relative: "10% off everything" sales
    • Absolute: get $30 off, when you spend $300
    • Fixed Price: get 2 bananas at $4
  • Gift Line Item: adds one quantity of a specific Product to the Cart. Gift Line Item Cart Discounts are useful in the following scenarios:

    • free gift with purchase discounts
    • "Buy one get one" discounts

Numeric

To create a numeric Cart Discount, do the following:

  1. Go to Discounts > Add discount or Discounts > Cart discount list in the Merchant Center main menu.

  2. Click Add cart discount.

  3. Select Numeric in the Cart discount type field.

  4. Specify the values for the following fields:

    • Cart discount name (required): the display name for the Discount that can be localized.
    • Cart discount description: a plain-text description of the Discount that can be localized.
    • Cart discount key: a unique identifier key for the Discount.
    • Store: Stores on which the Cart Discount can be applied. Enter the Store key or select from the drop-down.
      You can include up to 500 Stores for a Cart Discount.
    • Rank (sortOrder) (required): the relative importance of the Discount as a decimal value from 0 to 1. A larger value ranks higher.
      • Do not apply any further cart discounts after this one: If selected, the API stops applying Cart Discounts lower than the value in the Rank (sortOrder) field.
    • Discount code: determines if a discount code is required or not.
    • Valid from: the date/time from which the Discount is valid to apply to a Cart.
    • Valid until: the date/time until which the Discount is valid to apply to a Cart.
  5. In the Discount configurations section, follow these steps:

    1. In the Under these cart conditions section, configure the conditions.
    2. In the Apply these discount effects section, configure the discount effect.
  6. Click Save.

Discounts are always created in the deactivated state, and must be activated to take effect.

To learn to create a relative Cart Discount based on an example, refer our tutorial.

Gift Line Item

To create a Gift Line Item Cart Discount, do the following:

  1. Go to Discounts > Add discount or Discounts > Cart discount list in the Merchant Center main menu.

  2. Click Add cart discount.

  3. Select Gift line item in the Cart discount type field.

  4. Specify the values for the following fields:

    • Cart discount name (required): the display name for the Discount that can be localized.
    • Cart discount description: a plain-text description of the Discount that can be localized.
    • Cart discount key: a unique identifier key for the Discount.
    • Store: Stores on which the Cart Discount can be applied. Enter the Store key or select from the drop-down.
      You can include up to 500 Stores for a Cart Discount.
    • Rank (sortOrder) (required): the relative importance of the Discount as a decimal value from 0 to 1. A larger value ranks higher.
      • Do not apply any further cart discounts after this one: If selected, the API stops applying Cart Discounts lower than the value in the Rank (sortOrder) field.
    • Discount code: determines if a discount code is required or not.
    • Valid from: the date/time from which the discount is valid to apply to a Cart.
    • Valid until: the date/time until which the discount is valid to apply to a Cart.
  5. In the Discount configurations section, follow these steps:

    1. In the Under these cart conditions section, configure the conditions.

    2. In the Apply these discount effects section, specify the values for the discount effect:

      • Product ID (required): the Product ID of the Gift Line Item. It can be found in a Product's Merchant Center URL.
      • Variant ID (required): the Product Variant ID of the gift Line Item. It can be found in the Variants tab of a Product.
      • Supply Channel: the supply Channel of the Product.
      • Distribution Channel: the distribution Channel of the Product.
  6. Click Save.

Discounts are always created in the deactivated state, and must be activated to take effect.

Configure Cart Discount conditions and effects

The Cart Discount condition is a set of rules or criteria that must be met for the Cart Discount to become applicable to the user's shopping Cart or Products in it. The Cart Discount effect allows you to define what aspects of the Cart will be discounted.

To configure a Cart Discount condition:

  1. Configure the Cart discount condition, which defines which carts are applicable for the discount.
  2. Configure the Cart discount effect, which defines what the discount will apply to.

Configure a Cart Discount condition

If you select Apply to specific carts in the rule builder, you can create a rule that applies a Cart Discount to a specific Cart or Products in it. To configure a condition, you must select a condition and define one or more rules for the condition.

Select a condition

You can select one of the following conditions:

  • all of these are true: all rules defined must be true for the Discount to apply. The AND condition button is displayed when creating additional rules.
  • all of these are not true: all rules defined must be false for the Discount to apply. The AND condition button is displayed when creating additional rules.
  • at least one of these are true: any rule defined must be true for the Discount to apply. The OR condition button is displayed when creating additional rules.
  • at least one of these are not true: any rule defined must be false for the Discount to apply. The OR condition button is displayed when creating additional rules.

Define a condition

A Discount condition comprises of the following:

  • A predicate, which identifies data associated with a Cart.
  • An operator, which checks the state of the data.
  • Values, which are input to check against the predicate data.

Configuration of a Product Discount rule.

To define a Discount condition, do the following:

  1. Select a predicate from the first field. To change the default predicate that is displayed, click the field and, from the sliding pane, select or search for a predicate.
    To know the functionality of available predicates, click View all predicates. You can then select your frequently used predicates to define a quick-select list for easier access.

  2. Select an operator from the next drop-down.

  3. Enter or select a value (to compare to) in the input field.

    The value field's input type changes based on the predicate and operator, and in some cases is not present at all.

  4. Optionally, define a nested rule by using the AND or OR buttons.

    • To create a non-nested additional rule, click AND condition or OR condition and enter your values in the input fields as required.
    • To create a nested rule, click the AND condition or OR condition drop-down and select Add group condition, and then enter your values in the input fields as required.

Configure a Cart Discount effect

The Cart Discount effect defines the aspects of the cart receiving a discount. To configure a Cart Discount effect, do the following:

  1. Select one of the following Discount effects:

    • Total Price: applies the Discount to the Cart total.
    • Item: applies the Discount to Line Items or Custom Line Items in the Cart.
    • Multibuy: applies the Discount when a Customer purchases a certain quantity of Line Items or Custom Line Items. For example, used for "Buy one get one" discounts. For more information, see Configure multibuy discounts.
    • Shipping: applies the Discount to the Cart's shipping cost.
  2. If you selected Item or Multibuy, configure a condition.

    • For Item, if you select Apply to specific items in the rule builder, select a condition and then define it.
    • For Multibuy, if you select Apply to specific items in the rule builder, follow these steps.
  3. Select the Discount type—Percentage off, Amount off, or Fixed price—and a discount value.

Configure multibuy Discount effects

This feature is available in public beta on the Cart Discounts API.

Multibuy Line Items apply when the Customer purchases a certain quantity of Line Items, and are useful for "Buy one get one" promotions.

To configure a multibuy Line Item or Custom Line Item discount, do the following:

  1. Select a condition option.

  2. Configure the following fields:

    • When customers buy: the total line items (quantity) a Customer must buy before applying the Discount.
    • line items, they get: the quantity of Line Items to apply the Discount to. The Discount can be applied to the following, as selected from the drop-down:
      • The cheapest item
      • The most expensive item
    • % off: automatically populated from the Discount value provided when creating a Cart Discount.
    • Limit this discount to: limits the number of times the Discount can be applied if a value is provided in the Add quantity field. Select the Unlimited checkbox for unlimited use.

Activate a Cart Discount

To activate a Cart Discount, do the following:

  1. Select the Discount you want to activate.
  2. Click the Status toggle.
  3. Click Activate discount in the dialog.

Duplicate a Cart Discount

You can also duplicate an existing Cart Discount to save time when setting up a new Cart Discount. To duplicate a Cart Discount, do the following:

  1. Select the Discount you want to duplicate.
  2. Click Duplicate cart discount.
  3. Click Save.

By default, duplicated Discounts are not activated.