{"section":"tutorials","requestedLocale":"en","requestedSlug":"creating-a-coupon-beta","locale":"en","slug":"creating-a-coupon-beta","path":"docs/en/tutorials/promotions-and-taxes/coupons/creating-a-coupon-beta.md","branch":"main","content":"A [coupon](/en/docs/tutorials/coupons-beta) consists of one promotional code composed of a sequence of letters and numbers. Coupons may be used to apply promotions to the shopping cart price: By entering a coupon code at checkout, your customers may get discounts on the order price.\n\nTo create a coupon in the VTEX Admin, follow the steps below. \n\n1. In the VTEX Admin, go to *Promotions > Coupons*, or type *Coupons* in the search bar at the top of the page.\n2. Click `Create coupon`.\n3. Fill out the form with the [coupon information](#coupon-information) starting with the [General](#general) section.\n4. Click `Save`.\n\nThe coupon must be associated with at least one promotion to be valid. Please read the section [Associating a coupon with a promotion](#associating-a-coupon-with-a-promotion) to learn more about this configuration.\n\nIf you have created a [coupon batch](/en/docs/tutorials/coupons-beta#coupon-batches), the generated coupons will appear on the screen after saving it. Please read the section [Generated coupons](#generated-coupons) for more information.\n\nIf you have created a [single coupon](/en/docs/tutorials/coupons-beta#single-coupons), you will be redirected to the [coupon list](/en/docs/tutorials/coupons-list-beta).\n\n## Coupon information\n\nThe form for creating or editing a coupon has the following fields:\n\n* [Coupon usage and linked promotions](#coupon-usage-and-linked-promotions)\n* [General](#general)\n* [Restrictions](#restrictions)\n\n### Coupon usage and linked promotions\n\nThe top dashboard of the form for creating and editing coupons indicates the number of times a coupon has been used, the number of remaining uses of that coupon, and the number of promotions associated with the coupon, as illustrated below.\n\n![create-coupon-1](https://cdn.statically.io/gh/vtexdocs/help-center-content/refs/heads/main/docs/en/tutorials/promotions-and-taxes/coupons/creating-a-coupon-beta_1.png)\n\nBy clicking on the information on the dashboard, you may access the modal **View usage details**, which displays the following details.\n\n* **Linked promotions:** Displays the name of the promotion associated with the coupon, if any. By clicking on the promotion name, you will be redirected to the promotion editing page.\n\n    The coupon becomes valid when associated with at least one promotion. To establish the association, you must use the same [utm_source or utm_campaign](/en/docs/tutorials/what-are-utm-source-utm-campaign-and-utm-medium) both in the coupon and the promotion fields. Please read the section [Associating a coupon with a promotion](#associating-a-coupon-with-a-promotion) to learn more about this configuration.\n\n* **Usage**: Displays the number of times the coupon can be used and the number of remaining uses, if you have set a usage limit.\n\n    If the coupon is a single coupon, this section presents the list of orders in which a coupon has been used and allows you to search by order number. When you click on the order number, you will be redirected to the order details page in **Orders management**.\n\n    ![view-usage-details](https://cdn.statically.io/gh/vtexdocs/help-center-content/refs/heads/main/docs/en/tutorials/promotions-and-taxes/coupons/creating-a-coupon-beta_2.png)\n\n    If it is a coupon batch, this section displays the list of codes from the batch and allows you to search for a specific code. If you click on a code,  you will see the list of orders where the code has been used and allows you to search for an order number. Clicking on the order number will then take you to the order details page in __Orders management__.\n\n![select-the-code-coupon-batch](https://cdn.statically.io/gh/vtexdocs/help-center-content/refs/heads/main/docs/en/tutorials/promotions-and-taxes/coupons/creating-a-coupon-beta_3.PNG)\n\n### General\n\nThe **General** section presents several fields you must fill in with general information about your coupon:\n\n* **Coupon code:** The code your store's customers will have to provide at checkout to apply the coupon discount. You cannot use the code of an already existing coupon. The code can only contain letters, numbers and hyphens and have up to 300 characters. This field is required.\n* **UTM source:** Allows linking the coupon to a specific `utm_source`. The `utm_source` represents the source tracking, i.e. which site, ad or post the user came from. Example: you can establish that whenever a user reaches your store by clicking on a Facebook ad, the URL will contain the parameter \\{f1\\}utm_source=fb\\{/f1\\} and the coupon will be applied. For more information, please read [What are utm_source, utm_campaign and utm_medium](/en/docs/tutorials/what-are-utm-source-utm-campaign-and-utm-medium).\n* **UTM campaign:** Allows linking a coupon to a specific `utm_campaign`, i.e. the campaign which defines a specific marketing context. Examples: `christmas`, `fathersday`. For more information, please read [What are utm_source, utm_campaign, and utm_medium](/en/docs/tutorials/what-are-utm-source-utm-campaign-and-utm-medium).\n* <i class=\"fas fa-toggle-on\"></i> **Generating coupons in a batch:** Keeping this option deactivated will create a single coupon. By activating this option, you will create a [coupon batch](/en/docs/tutorials/coupons-beta#coupon-batches) and the following resources will become available. \n    * **Number of coupons:** Allows to define the number of codes generated in a coupon batch. The maximum number is 1000.\n    * **Export coupons:** This button allows you to export the coupon codes within a coupon batch. This option only becomes available when editing already existing coupon batches.\n\n> ⚠️ You must define at least one UTM. This means it is required to fill in either the **UTM source** or the **UTM campaign** field. You can also fill in both fields.\n\n### Restrictions\n\nIn this section of the form, you can configure the following coupon usage restrictions:\n\n* <i class=\"fas fa-toggle-on\"></i> **Limit coupon usage in my store:** When this option is enabled, you must specify the number of times the coupon can be used, either by using the buttons <i class=\"fas fa-minus\"></i> and <i class=\"fas fa-plus\"></i> or by typing the desired quantity. The minimum number is 1 and there is no maximum number.\n\n  If this option remains disabled, the coupon can be used for an unlimited number of times.\n\n  > ⚠️ In case an order with a limited usage coupon applied is canceled, the limit will be recalculated. This means that orders with the **Canceled** status will not be calculated into the coupon usage limit.\n\n## Generated coupons\n\nIf you have created a [coupon batch](/en/docs/tutorials/coupons-beta#coupon-batches), you will see the __Generated coupons__ page after saving it. This page presents two options:\n\n* <i class=\"far fa-clone\"></i> **Copy all:** Allows you to copy the generated codes to your clipboard. After that, you can paste them in a spreadsheet editor, such as Excel or Google Sheets. You can also copy each code individually by clicking it.\n* **Export:** Allows exporting the generated coupons to a CSV file. The exported file contains a single column, with one code per row.\n\n![cupons-gerados-en](https://cdn.statically.io/gh/vtexdocs/help-center-content/refs/heads/main/docs/en/tutorials/promotions-and-taxes/coupons/creating-a-coupon-beta_4.gif)\n\n### Generating coupons in bulk\nCoupon [creation for promotions](#creating-coupon) must be done in the Promotions & Taxes module. However, there may be situations when you need to create many coupons at once due to a campaign or marketing initiative.\n\nYou cannot generate coupons in bulk in the VTEX Admin, only using the [Promotions & Taxes API](https://developers.vtex.com/docs/api-reference/promotions-and-taxes-api). For more information, read our guide [Creating and managing coupons with Promotions API](https://developers.vtex.com/docs/guides/creating-and-managing-coupons-with-promotions-api).\n\n## Associating a coupon with a promotion \n\nTo enable a coupon, you must associate it with a promotion. To do this, follow the steps below: The coupon can be associated with all types of promotions, except [Campaign promotions](/en/docs/tutorials/campaign-promotion).\n\n1. In the VTEX Admin, go to *Promotions > Promotions*, or type *Promotions* in the search bar at the top of the page.\n2. Click the promotion with which you want to associate a coupon or create a promotion by clicking the `New promotion` button.\n3. If you choose to create a new promotion, select the type of promotion you wish to create.\n4. In the **What are the conditions for the promotion to be valid?** section, fill in the **utm_source** or **utm_campaign** fields with the same values of the created coupon.\n5. Click `Save`.\n\nOnce this is done, the coupon will be valid and available for use in your store.\n\n## Using multiple coupons\n\nYou can allow your customers to use multiple coupons in a purchase. You will need to use one of the following endpoints to enable this feature, which is only available via API and there is a 20 coupon limit per purchase.\n\nBoth endpoints fill in the `marketingData` field of the response body without any difference in activation usage. Follow the steps below to enable the feature:\n\n1. Use one of the endpoints to enable this feature:\n   - [POST Add coupons to the cart](https://developers.vtex.com/docs/api-reference/checkout-api#post-/api/checkout/pub/orderForm/-orderFormId-/coupons)\n   - [POST Add marketing data](https://developers.vtex.com/docs/api-reference/checkout-api#post-/api/checkout/pub/orderForm/-orderFormId-/attachments/marketingData)\n2. [Customize](https://developers.vtex.com/docs/guides/checkout-customization-guide#customizing-checkout-ui-admin-vtex) your storefront to allow multiple coupons.\n   - If your store uses Checkout v5, use `checkout5-custom.js checkout5-custom.css`.\n   - If your store uses Checkout v6, use `checkout6-custom.js checkout6-custom.css`.\n3. After customization, you will need to request the enablement of the feature by [opening a ticket with VTEX Support](/en/docs/tutorials/opening-tickets-to-vtex-support).\n4. Check the <i class=\"fas fa-check-square\"></i> **Apply with other promotions** option in the [settings of the promotions](/en/tracks/promocoes--6asfF1vFYiZgTQtOzwJchR/7FjbeZdE2KMwk5L1t98pZI#4-restrictions-and-limitations-of-use) associated with the coupons to allow more than one promotion to be activated by different coupons in the same purchase. Thus, the discounts granted by different promotions will be applied [together](/en/docs/tutorials/how-promotion-competition-works#accumulation).\n\n#### Learn more\n\n* [Coupons](/en/docs/tutorials/coupons-beta)\n* [Coupons list](/en/docs/tutorials/coupons-list-beta)"}