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

Manage Cart Discounts Part 2

Learn how to set up Cart Discounts in the Merchant Center.

  • After completing this page, you should be able to:

    • Use Cart Discount predicates and conditions correctly in common discount or promotion use cases.
  • Use case 4: Multibuy discounts

    Let’s look next at how a multibuy discount works in Composable Commerce. Shoes for Feet wants to set up a discount that moves a higher volume of their Sale category to clear out some space in their warehouse. They want to offer customers a further 20% discount on shoes in the Sale category when they buy 3 or more shoes. Composable Commerce’s Multibuy line item discount will let us set this type of discount up.

    General Information

    • Let's select the Buy X Get X with a percent off Discount Template, which will set up a multibuy discount.
    • Enter Shoes for Feet Multibuy as the Cart discount name.
    • Select Shoes for Feet as the associated Store, as this discount is related to Shoes for Feet only.
    • Enter a relevant ranking (you can use 0.4998 for now).

    Cart Discount conditions

    The conditions we want to have to cause the discount to be applied are:

    • Categories includes at least one of the following: Sale
    • Set this condition to True.

    Set Category to includes at least one of the following: Sale and set to True.

    Cart Discount effects

    For this kind of discount, we can see that Multibuy is selected, which opens up its own section of the UI for us to work with. Set the conditions as follows:

    • Categories includes at least one of the following: Sale
    • When customers buy 3 line items, they get 1 (the cheapest item of them) with 20% off. (The value here is determined by the Discount value in the UI section above the Target predicate)
    • Limit this discount to 3 times. (You can decide how many times this discount should be applied. Either set a cap or allow to be used unlimited.)

    Set Cart discount effect to multibuy. Customers get 20% off the cheapest item when they buy 3.

    In this use case, we are working with Line Items in the Cart. We are offering a discount to Customers when they purchase multiple quantities of the same Line Item.

    Please note that if we add two items of the same Product Variant, but there is some kind of difference between the two Product Variants, then those two Product Variants will be added to the Cart as two separate Line Items. For example, a type of T-shirt offered by a company may allow for custom embroidery, like a staff member’s name. Despite being the same Product Variant, if there is a change to any aspect of the Variant then the Cart adds them as separate Line Items and this will then affect the behavior of the Multibuy discount.

    Let's activate our discount and check in an order if we have set this up correctly:

    Cart Discount applied to Order.

    Nicely done!

    Use case 5: Customer Group specific promotions

    Our next use case looks at how to offer free shipping via Cart Discounts. Both Tread Trends and Shoes for Feet have decided to offer free shipping to their Gold and Platinum Customers when they spend over $50 in a Cart. They use Customer Groups in Composable Commerce to manage their loyalty tiers. Let’s have a look at how we can set that up using Cart Discounts.

    Remember, two methods exist to offer free shipping in Composable Commerce; using Free above in Shipping Methods, or Cart Discounts. We strongly recommend using only one option at a time in your Project. Using both Free above and Cart Discounts simultaneously can make it challenging to understand which Discounts should be applied to an individual Cart.

    To follow this use case, which focuses on setting up free shipping using Cart Discounts, you'll need to add to your Project setup the following aspects before continuing:

    • Two Customer Groups named Platinum and Gold.

    Check out Customer Groups for information on how to set up Customer Groups.

    General Information

    • Let's select the Discounted shipping Discount Template, which will set up a shipping discount.
    • Enter Gold and Platinum Free Shipping as the Cart discount name.
    • Enter a relevant ranking (you can use 0.4997 for now).

    Cart Discount conditions

    Make sure to set up the following conditions:

    • Cart Total is equal to or greater than 50.00 USD.
    • Customer Group Key is listed platinum,gold. The Customer Group key can be copied from the Customer Group list (see image below).

    Copy the Group key from the Customer group list.

    This is what the UI would look like to establish the above two conditions.

    Use Cart Total and Customer Group in your discount condition.

    Cart Discount effects

    As the two brands wish to offer free shipping, select Percentage off and enter 100 as the Discount value. Shipping has already been selected as the Cart discount effect and will apply the 100% discount value to the shipping costs.

    Apply free shipping to the cart discount effect.

    And when we check via an Order, we can see that a free shipping discount gets applied.

    Cart Discount applied to Order.

    There you go! A free shipping Cart discount for Gold and Platinum customers!

    Best practice: how to preview a Cart Discount such as this?

    You might find yourself wanting to preview a Cart Discount like the one above and make sure that it is functioning properly before allowing it to go live. Publishing this discount however would mean that any Customers belonging to those Customer Groups would start to be eligible for the discount. How could you preview this kind of Cart Discount with your stakeholders without making it available to all of your Customers at the same time?

    One solution would involve using Customer Groups. You could set a Customer Group that denotes if the Customer account is staff or not. Then in your Cart Discount, we can set a Cart discount condition to check if the logged in Customer matches the Customer Group condition. Now you can temporarily and safely enable the Cart condition/s and be sure that normal Customers don’t see the discount. Provided that their Customer accounts have the correct Customer Group associated with it, your stakeholders will now be able to preview that the Cart Discount is working as hoped.

    To make this discount ready for actual use, you would need to remember to remove the Cart discount condition prior to the campaign launching, and change it to the correct Customer Group.

    Use case 6: Discount codes

    As we mentioned earlier, Discount codes are a special form of Cart Discounts. They allow you to give specific Cart Discounts to eligible customers via a code. When the Customer adds the code to the Cart, a Cart Discount is triggered and added to the Cart.

    Before we look at the Discount codes UI, remember that Discount codes can only be added to Cart Discounts when the Discount code toggle has been set as Required in the actual Cart Discount. Only then will the Cart Discount appear as an option to be attached to a Discount code in the Discount code UI. Make sure you have selected this first.

    Select the Discount code required checkbox to enable Discount codes for that Cart Discount

    Let’s now look at how to set up Discount codes by using them with two of the Cart Discounts we have already set up: Use case 2, and Use case 5.

    If you remember, in Use case 2, both Shoes for Feet and Tread Trends wanted to offer a US$25 discount on their new season items when their spend over US$300 in the Cart.

    In Use case 5, again both brands wanted to offer free shipping to their Gold and Platinum Customers when they spend over US$50 in a Cart.

    Both of these sorts of discounts would work well with Discount codes. Once set up, the brands could email out the code to their customer mailing list and further increase the reach of their promotion.

    General Info

    The General Info section is very similar to the General Information in regular Cart Discounts. We should point out some additional fields however:

    • Max applications: sets the number of times the Discount code can be applied.
    • Max applications per customer: sets the number of times the Discount code can be applied per customer.
    • Code: a mandatory field, this is where you enter your Discount code. When creating a Discount code choose something unique and keep it either all uppercase or lowercase (this helps to improve the user experience for your customers on mobile, so they do not need to continuously change the case when entering a code).
    • Groups: you can assign a searchable tag or keyword to your Discount codes and use this to search in the main Discount code list page.

    With our two example use cases above, you would need to consider these new fields and decide whether or not they would be useful for your situation. Deciding how many times the Discount code can be used is an important decision that can impact on your profit margins, and whether or not you assign Groups can make a big difference to the management of your discounts if you happen to be using a lot of codes.

    Condition

    The Condition section of the UI has one field box where a Predicate needs to be entered in text form. This is probably a little tricky for most users, so to create this Predicate you are better off going to a Cart discount condition (Under these cart conditions) section of the regular Cart Discounts, building the Predicate there using the UI and then copying the text form of the Predicate and pasting it back in the Predicate box here on the Discount code page. You can change back and forth from the text form of the Predicate via this toggle.

    Switch back and forth from the text form of the Predicate via the selected toggle.

    The question needs to be asked though if you need to have two Predicates for Cart Discounts that use Discount codes. If you do use the two Predicates (one that is attached to the Cart Discount and the other attached to the Discount code), you need to make sure that both of them will not contradict each other and stop the discount from being applied. Considering this, it’s generally recommended to just use one Predicate (and generally use the Predicate that can be built with the Cart Discount UI as its more user friendly) and only use two Predicates if you have a clear use case for this feature.

    With our two example use cases, there really is no reason to create a second Predicate in the Discount code. The Customers applying the Discount code to their Carts will allow for the Predicates we have already created to be applied to their Carts, and there is no further advantage in having a Predicate stored in the Discount code itself.

    Cart discounts

    The Cart discounts section is straightforward; use it to select the Cart Discount that is attached to the specific Discount code. If the Cart Discount does not appear in the search box, then you will need to double check in the Cart Discount whether or not you set the Discount code toggle to Required, as we already mentioned above.

    Select the Cart Discount required.

    With this knowledge, you’re now ready to set up your Discount codes and reward your customers!

    Test your knowledge