# Apply Discount Codes Before using Discount Codes in the Merchant Center, ensure the **Discount code** field is set to **Required** for the Cart Discount. Only then will that Cart Discount be available for association with a Discount Code. ![Discount code needs to be set as required on the Cart Discount UI.](https://docs.commercetools.com/learning-price-and-discount-your-products/images/discount-codes/discount-code-required.png) 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 in our [Cart Discounts module](/learning-price-and-discount-your-products/cart-discounts/overview.md): [use case 2](/learning-price-and-discount-your-products/cart-discounts/manage-cart-discounts-part-1.md#use-case-2-create-an-absolute-discount-across-multiple-brands) and [use case 9](/learning-price-and-discount-your-products/cart-discounts/manage-cart-discounts-part-2.md#use-case-9-customer-group-specific-promotions). - In use case 2, both Shoes for Feet and Tread Trends offer a US$25 discount on their new season items when the Cart total is over US$300. - In use case 9, both the brands offer free shipping to their Gold and Platinum Customers when the Cart total is over US$50. Both these discounts would work well with Discount Codes. The brands can distribute the codes to their customer mailing lists and further increase their promotion's reach. ## Discount Code interface ### General Info The **General Info** section is very similar to the **General Information** in regular Cart Discounts, but includes some additional fields: - **Max applications** (optional): the number of times the Discount Code can be applied. - **Max applications per customer** (optional): the number of times the Discount Code can be applied per Customer. - **Code**: a unique value—recommended in uppercase—for the Discount Code. - **Groups** (optional): a tag or keyword for your Discount Code that can be used to search for Discount Codes with the same keyword. For the example use cases mentioned above, evaluate if the additional (field) configurations are relevant to your needs. Discount Code usage limits can impact profitability, and groups assignments can streamline discount management, especially when handling numerous codes. ### Condition In the **Condition** section, you can add a Predicate for the Discount Code. Since the field only supports text entry, this might be challenging for some users. For easier creation, use the visual predicate builder in the Cart Discounts interface (in the **Under these cart conditions** section). Then, toggle the **Editing options** to copy the Predicate in plaintext and paste it in the **Condition** field on the Discount Code interface. ![Cart Predicates can be generated in the Cart Discounts UI in the Under these cart conditions section.](https://docs.commercetools.com/learning-price-and-discount-your-products/images/discount-codes/cart-discount-editing-options.png) Consider if two predicates (one for Cart Discounts, one for Discount Codes) are necessary, as highlighted [previously](/learning-price-and-discount-your-products/discount-codes/discount-codes-and-cart-predicates.md#cart-predicates). If used, ensure that both the Predicates do not conflict and stop the discount from being applied. Considering this, it’s recommended to just use one Predicate—build the Predicate with the Cart Discount interface as its more user friendly; use two Predicates when specifically required. For our example use cases, a Predicate for the Discount Code is unnecessary. The Predicate for the Cart Discount already handles cart eligibility, so adding another Predicate would provide no additional filtering or control. ### Cart discounts The **Cart discounts** section is straightforward—select the Cart Discount associated with the Discount Code. If a Cart Discount isn't listed, ensure if the **Discount code** field is set to **Required** for that Cart Discount—as mentioned previously. With this knowledge, you’re now ready to set up your Discount Codes and reward your customers! ## Related pages - [Area overview page with navigation](/learning-price-and-discount-your-products.md) - [Previous page: Discount Codes and Cart Predicates](/learning-price-and-discount-your-products/discount-codes/discount-codes-and-cart-predicates.md) - [Next page: Learning check](/learning-price-and-discount-your-products/discount-codes/learning-check.md) - [Search documentation and API specs](/search.md)