> ## Knowledge Base Index
> Fetch the complete knowledge base index at: https://help.avada.io/sitemap.xml
> Use this file to discover available pages before exploring further.
> Pure-Markdown content can be obtained by appending a '.md' suffix to the content URLs listed in the sitemap (without the trailing slash).

# How to set up Dynamic coupons in Magento 2 and import to AVADA

You wan to send coupon to your customers using AVADA Marketing Automation. For Magento 2 stores, you need to create a Cart Price Rule at the store. Then export the rule's coupon codes to import manually to AVADA. 

# Generate and Export Cart Price Rule coupon list

## Step 1: Go to Cart Price Rule Setting

Access Magento admin > Select Marketing > Promotions > Cart Price Rule

![Magento Cart Price Rule Setting](https://storage.crisp.chat/users/helpdesk/website/b66870a37c890800/image_1h2esqg.png)

## Step 2: Create a new Cart Price Rule

* Click **Add New Rule**


![Add New Rule](https://storage.crisp.chat/users/helpdesk/website/b66870a37c890800/image_2jfyhx.png)

* At **Rule Information**: Enter **Rule Name, select Website, Customer Group applies Cart Price Rule**

![Create New Rule Page](https://storage.crisp.chat/users/helpdesk/website/b66870a37c890800/image_1xzez1x.png)

* Select "Active = Yes"

![Activate the rule](https://storage.crisp.chat/users/helpdesk/website/b66870a37c890800/image_12bzlql.png)

* In the **Coupon** field, select **Specific Coupon** and check **Use Auto Generation**

![Auto Generate Coupon](https://storage.crisp.chat/users/helpdesk/website/b66870a37c890800/image_18xyplb.png)

* In the **Actions** field, select the discount type in the **Apply** field and the desired **Discount Amount**

![Select Discount Type and Amount](https://storage.crisp.chat/users/helpdesk/website/b66870a37c890800/image_hpb06t.png)

* Click **Save and Continue Edit**

![Save & Continue Edit](https://storage.crisp.chat/users/helpdesk/website/b66870a37c890800/image_cluxmd.png)

## Step 3: Generate Coupon Codes

* At the new rule created in Step 2, select **Manage Coupon Codes**
* Enter **Coupon Qty, Code Length** and choose **Code Format** as desired

![Generate Coupon Codes](https://storage.crisp.chat/users/helpdesk/website/b66870a37c890800/image_7naumr.png)

* Click **Generate**

## Step 4: Export Coupon Code

* In the **Coupon Code** table, after clicking **Generate** in Step 3, select **Export to CSV**
* Click **Export**

![Export Coupon Codes](https://storage.crisp.chat/users/helpdesk/website/b66870a37c890800/image_1jwieua.png)


* The file after exporting can be used to import into AVADA according to the instructions in section 2 below.

# Manual import coupon to AVADA

You can choose **Manual import coupon** to import coupon codes that exported from Magento 2 Cart Price Rule and use in AVADA.

## Step 1: Go to Coupon settings

At the app select **Settings > Coupon > click Create button**

![Open AVADA Coupon Settings](https://storage.crisp.chat/users/helpdesk/website/b66870a37c890800/image_ezl7l0.png)

## Step 2: General Information

- Enter a name for the coupon group at **Name**
- Select **Source** as **Manual coupon group**

![General Information](https://storage.crisp.chat/users/helpdesk/website/b66870a37c890800/image_1qhaby9.png)

## Step 3: Upload import file

Import the codes by CSV file or directly /type the codes you want to create into the text box

![Upload coupon files](https://storage.crisp.chat/users/helpdesk/website/b66870a37c890800/image_cqnhoa.png)

## Step 4: Finish import

Click **Create** button to finish

