> ## 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).

# Integrate with Magento 2

Magento is the most common platform for SMEs. AVADA is a part of Mageplaza company and Mageplaza has been developed this extension that helps integrate [AVADA Email Marketing](https://avada.io/) with Magento 2.

Today I will show you how to integrate AVADA Email Marketing with Magento 2 step by step.

Now it's time to get started.

# Step 1: Register account
 
Go to [AVADA Dashboard](https://app.avada.io/) to register an account.

![](https://storage.crisp.chat/users/helpdesk/website/b66870a37c890800/pasted-image-0_3zsasy.png)

If you have an account already, you can skip this step.

# Step 2: Install the integration module
 
There are 2 methods to install this module.

### 1. Install via composer (recommend)

Run the following command in Magento 2 root folder:

```
composer require mageplaza/module-smtp
php bin/magento setup:upgrade
php bin/magento setup:static-content:deploy
```

### 2. Install from the .zip package file

Download [the module here](https://www.mageplaza.com/magento-2-smtp/), read [installation guide here](https://www.mageplaza.com/install-magento-2-extension/#solution-1-ready-to-paste).

# Step 3: Setup API Key
 
**Go to [AVADA Dashboard](https://app.avada.io/) > My Profile (on the top right) > [Manage Keys](https://app.avada.io/manage/keys)**
****

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

Copy App ID and Secret key

![](https://storage.crisp.chat/users/helpdesk/website/b66870a37c890800/pasted-image-0-1_1uqarcd.png)

Go to your **Magento 2 Dashboard > Stores > Configuration > Marketing Automation > Configuration**

Enable the module and enter the above App ID and Secret key into the form, click **Save Config** on the top right, then [flush Magento cache](https://www.mageplaza.com/kb/how-flush-enable-disable-cache.html).

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

Insert the **App ID** and **Secret key** and hit on **Test connection** button.


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

Hit on the **Synchronize Customers** and **Synchronize Orders** button.
Now Abandoned carts, new contacts, new subscribers, orders will be synced to AVADA Dashboard.

**Notice**: If you get some errors: **Cannot connect to AVADA** or **Wrong secret key**, please kindly check if you had updated Mageplaza SMTP module to the latest version.
You can get the latest version here: https://github.com/mageplaza/magento-2-smtp

|| Attribute Code for Vendor: Get attribute code of an attribute in Magento as vender at AVADA Email Marketing automation

For example, if you insert Activity attribute code  to **Attribute Code for Vendor**, Activity's attribute values are saved as Vendor value at AVADA Email Marketing automation and can be filtered at  **Audiences**

Here is how you can do:

- At Magento 2 dashboard, navigate to **Store> Attribute > Product** > choose 1 attribute > **Copy Attribute Code**

- Go back to Configuration page at **Marketing Automation**,  paste the copied data to **Attribute Code for Vendor**   and then hit Save button

![](https://storage.crisp.chat/users/helpdesk/website/b66870a37c890800/9it37xn_v1gfep.png)

![](https://storage.crisp.chat/users/helpdesk/website/b66870a37c890800/0peykw7_1c9jp3k.png)

-  At AVADA Email Marketing,  select **Audience > Add Filter > Vendor**

![](https://storage.crisp.chat/users/helpdesk/website/b66870a37c890800/5vdlajv_9qfuz8.png)

![](https://storage.crisp.chat/users/helpdesk/website/b66870a37c890800/1mnahs6_2s7olo.png)

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


# Step 4: Sync order from Magento store

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

* **Sync type**: Choose data type you want to sync 

![](https://storage.crisp.chat/users/helpdesk/website/b66870a37c890800/gw1lzwz_1x7b4xr.png)
 
You will see a list of options: **Customers, Orders, Subscribers, Everything**. Please select your wanted type.

* **Choose what to sync**

![](https://storage.crisp.chat/users/helpdesk/website/b66870a37c890800/1bok9ox_bkd8k5.png)

* ** Choose days**

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

You can select to sync data in a period, for example: lifetime, 90 days, 1 year, ect.  Please select " Choose Date Range" if you want  to sync data in a custom period.

Please note that all the records will be synchronized if the "Created From - To" is empty

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

* Last step, please hit ** Synchronize Now** button to start the process 


# Step 5: Setup Automation campaign

-   [Setup general configuration](https://help.avada.io/help/how-to-configure-general-settings/)
-   [How to Setup an Abandoned Cart Email campaign](https://help.avada.io/help/send-abandoned-cart-emails/)
-   [How to set up an automation campaign](https://help.avada.io/help/how-to-edit-an-email-on-automation-workflow/)

### How to test?

1.  Create a welcome new subscriber
2.  Submit a new subscriber in Magento 2 frontend
3.  Check AVADA dashboard > Automation > Activities. You will see the email transactions in this table.

If you have any questions or face any issues, feel free to contact us. We are willing to help.

Happy sending!