Discount Codes
Provide specific Cart Discounts to eligible customers with Discount Codes.
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.
Up to 10
Discount Codes can be applied to a Cart.
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.
Create a Discount Code
Go to Discounts > Add discount and click Add discount code.
On the Add a discount code page, do the following:
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, enter the date and time from when the Discount Code is valid.
Optional: For Valid until, enter 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, inclusive of all Carts.
Optional: For Max applications per customer, enter the total number of times the Discount can apply for a Customer, inclusive of all Carts.
A Discount Code can apply only once on the same Cart. 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 entered value cannot be updated after saving the Discount Code.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
10
Cart 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, newly created Discount Codes are inactive and not applicable on the Cart. To apply Discount Codes on a Cart, you must activate them.
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, do the following:
- For Quantity of Discount Codes, enter the number of Discount Codes you want to generate.
- For Total number of characters for each code, enter the number of characters each Discount Code 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.In the File format related information section, do the following:
For Format of file, select the desired output format.
If you selected CSV in the previous step, enter a delimiter type for single and multi value fields.
The Merchant Center supports the import of Discount Codes in CSV format only.
In the Discount code fields section, do the following:
- 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 key, select Generate random keys to automatically populate a key for each Discount Code. Alternately, if you wish to manually define them later, do not select the option.
- Optional: For Discount code status, select whether the Discount Codes are active or inactive.
- Optional: For Valid from, enter the date and time that the Discount Codes become valid.
- Optional: For Valid until, enter the date and time that the Discount Codes expire.
- 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 predicate 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 will be applicable to all Carts.
Click Generate Codes. You can link the generated Discount Codes to Cart Discounts after importing the Discount Codes with the Merchant Center.
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
You can export Discount Codes only from Projects in Google Cloud Regions.
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 only looks for exact matches. 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).