Provide specific Cart Discounts to eligible customers with Discount Codes.
Ask about this Page
Copy for LLM
View as Markdown
Discount Codes, also known as promo codes or coupon codes, are alphanumeric sequences of characters offered to specific Customers to receive a Cart Discount. The related discount is applied as soon as the Discount Code is added to a Customer's Cart.
Discount Codes are subject to a limit in a Project.
If the default fields available for configuring Discount Codes do not fit your business needs, Composable Commerce lets you extend the DiscountCode model using the Custom Fields API. The Merchant Center supports editing the values of Custom Fields configured for Discount Code.
Learn more about Discount Codes in our self-paced Discount Codes module.
Create a Discount Code
-
Go to Discounts > Discount code list.
-
Click Add discount code.
-
In the General Info section, follow these steps:
-
Optional: For Discount code name, enter the localized names for the Discount Code.
-
Optional: For Discount code description, enter the localized descriptions for the Discount Code.
-
Optional: For Discount code key, enter a unique key to identify the Discount Code.
-
Optional: For Valid from, select the date and time from when the Discount Code is valid.
-
Optional: For Valid until, select the date and time until when the Discount Code is valid.
-
Optional: For Max applications, enter the total number of times the Discount Code can apply (across all Carts).
-
Optional: For Max applications per customer, enter the total number of times a Customer can use the discount (across all Carts).
A Discount Code can be applied only once on the same Cart. If applied, a Discount Code application is counted every time an Order is created, and is not restored if the Order is canceled.
-
For Code, enter a unique value for the Discount Code.
The value cannot be updated after creation.
-
Optional: For Groups, enter one or more values for the Discount Code, which can be used as tags to group and find relevant Discount Codes in the Discount code list easier.
-
-
Optional: In the Condition section, if the text box is left empty, the Discount Code (when applied) will be effective on all Carts.
If you define a predicate condition, the Discount Code (when applied) will only be effective on Carts matching the defined condition. For more information on the syntax, see Predicate syntax. -
In the Cart discounts section, add the Cart Discounts that should take effect on the Cart when the Discount Code is applied.Only
10Cart Discounts can be added. The Cart Discount with the higher rank (closer to 1) takes precedence. For more information, see Create a Cart Discount. -
Click Save.By default, new Discount Codes are inactive and must be activated to be applicable on a Cart.
-
Optional: If a Custom Field is defined for the Discount Code, select it from the drop-down on the Custom Fields tab, and depending on the field type, enter or select the value for it.
Generate Discount Codes
-
Go to Discounts > Generate discount codes.
-
In the General information section, follow these steps:
-
For Quantity of Discount Codes, enter the number of Discount Codes to generate.
-
Optional: For Discount code case, choose the character casing for the Discount Codes.
By default, the Discount Codes are generated in mixed case. -
For Total number of characters for each code, enter the number of characters the Discount Codes should have.
-
Optional: For Prefix for each code, enter the prefix that each Discount Code should have.
The characters in the prefix contribute to the total character count of the Discount Code.
To prevent duplicates, use at least 10 characters for each code and a unique prefix for each batch; for example,SUMMER26-00000.
-
-
In the Discount code fields section, follow these steps:
- Optional: For Discount code name, enter the localized name for the Discount Codes.
- Optional: For Discount code description, enter the localized description for the Discount Codes.
- Optional: For Discount code status, choose whether the Discount Codes should be active or inactive.
- Optional: For Valid from, select the date and time from when the Discount Codes are valid.
- Optional: For Valid until, select the date and time until when the Discount Codes are valid.
- Optional: For Max applications, enter the maximum number of times each Discount Code can be used (across all Carts).
- Optional: For Max applications per customer, enter the maximum number of times each Discount Code can be used by a single Customer (across all of their Carts).
- Optional: For Cart condition (Predicate), enter a condition to apply the Discount Codes only on Carts matching the defined condition. For more information, see Predicate syntax.
If a predicate condition is not defined, the Discount Codes can be applied on all Carts.
-
In the Cart Discounts section, link the Discount Codes to the Cart Discounts.You can add up to
10Cart Discounts for each Discount Code. -
Click Next.
You can preview or download the generated Discount Codes.
-
To save the generated Discount Codes, click Next and then click Start import.
Import Discount Codes
For more information about importing resources into the Merchant Center, see Import data.
- Go to Discounts > Discount code list.
- Click the Actions drop-down and select Import discount codes.
- In the Import discount codes by CSV window, choose a CSV file on your computer to upload, and click Upload and preview.
- After the file is uploaded and validated, verify the rows and columns to be imported, and click Continue.
- Click Start import to confirm the import process. As the import process is a background task, you do not need to wait for it to complete. To check the import status, go to Operations > Import.
Export Discount Codes
Activate Discount Codes
- Go to Discounts > Discount code list.
- Select the Discount Codes, and in the Actions drop-down, select Activate and then click Confirm.
Search and filter Discount Codes
You can search for available Discount Codes by the their code, name, or discount group. The search is case-sensitive and looks for exact or partial matches.
To enable partial search in your Project, contact the Composable Commerce support team.
To narrow your search results, use filters by clicking Filters and selecting any of the available filters in the sidebar:
- Status: filters Discount Codes that are activate or deactivate.
For better performance, the following filters are available for lists with less than 300,000 entries:
- Discount schedule: filters Discount Codes based on whether a validity period is defined or not.
- Date created: filters Discount Codes created on a specified date or within specified dates.
- Date modified: filters Discount Codes last modified on a specified date or within specified dates.
- Created by: filters Discount Codes created by you or by anyone else.
- Max code applications: filters Discount Codes by the specified number of times that a specific Discount Code can be redeemed.
- Max code applications per customer: filters Discount Codes by the specified number of times a Customer can redeem a specific Discount Code.
You can also combine all the above filters using AND or OR operators. However, note that the resulting list can change based on the selected filters and operator (AND or OR).