# How to create a recover abandoned carts campaign with a unique discount code via ActiveCampaign?

Personal Discount is a highly rated Shopify app for creating discount codes. You can integrate it with a lot of email marketing services such as ActiveCampaign.

Here is the complete guide on how to integrate them. If you need to create a different campaign type, check our article on [How to create a welcome new subscribers campaign in Personal Discount with ActiveCampaign.](https://docs.personaldiscount.io/personal-discount-for-shopify/integrate-personal-discount-with-your-email-service-provider/activecampaign/how-to-add-a-unique-discount-code-to-welcome-emails-in-activecampaign)

Open the Personal Discount app in your Shopify dashboard. Then click **Add automation** button. Select **ActiveCampaign** from the Email Service Providers list. Then pick the desired Campaign Type: **Recover abandoned carts.**

<figure><img src="https://3731721370-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-LZdVZovthV0SPlgxS6Y%2Fuploads%2FF8yv5ZCqeC97LtxHCykb%2Fshopify-activecampaign-recover-abandoned-carts-campaign-personal-discount.gif?alt=media&#x26;token=5d84f34b-693e-4230-ab7c-8d05c03fed9d" alt="Add recover abandoned carts automation with ActiveCampaign animated"><figcaption><p>Add recover abandoned carts automation with ActiveCampaign</p></figcaption></figure>

In the next step fill out the form with automation details. If you need more information about that, here is a useful article on [how to configure discount in the Personal Discount app](https://docs.personaldiscount.io/personal-discount-for-shopify/configure-discount).

Save your automation and copy the code snippet to the clipboard.

<figure><img src="https://3731721370-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-LZdVZovthV0SPlgxS6Y%2Fuploads%2FC1JGw5CUbhyDi23Z7ff1%2Fcreate-recover-abandoned-cards-campaign-personal-discount-code-shopify.png?alt=media&#x26;token=42231d26-753b-4e21-85c0-02b371339eca" alt=""><figcaption><p>Copy Personal Discount code snippet</p></figcaption></figure>

Now switch over to the **ActiveCampaign dashboard**. Go to **Campaigns** > **Create your campaign**.

<figure><img src="https://3731721370-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-LZdVZovthV0SPlgxS6Y%2Fuploads%2F1eSxGTmX13BF4boLYbWc%2Frecover-abandoned-cards-campaign-personal-discount-code-shopify-active.png?alt=media&#x26;token=fee034ee-23b7-4831-8522-9a47515a9284" alt="How to create new ActiveCampaign automation annotated"><figcaption><p>Create new ActiveCampaign automation</p></figcaption></figure>

Name your campaign and select the proper type – **Automated** in our case.

<figure><img src="https://3731721370-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-LZdVZovthV0SPlgxS6Y%2Fuploads%2FDM5vVhsE8QXJ7JttVIy3%2Fcreate-recover-abandoned-carts-campaign-personal-discount-shopify.png?alt=media&#x26;token=b41de1fe-60eb-4a8f-8f9a-d0afee5a3ffe" alt="Select campaign type annotated"><figcaption><p>Select campaign type</p></figcaption></figure>

Now **Select a Trigger**.

<figure><img src="https://3731721370-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-LZdVZovthV0SPlgxS6Y%2Fuploads%2F4nXGU3z3HkoizdK1nwFW%2Factive-campaign-select-a-trigger-for-automation.png?alt=media&#x26;token=cae6e47d-cdd6-47b4-8a3f-a709205fd8d7" alt="Select trigger for your automation annotated"><figcaption><p>Select trigger for your automation</p></figcaption></figure>

Set **options** for your automation.

<figure><img src="https://3731721370-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-LZdVZovthV0SPlgxS6Y%2Fuploads%2FD380e8yNQRn4w4DcgLKe%2Factivecampaigns-set-automation-options.png?alt=media&#x26;token=6485ad80-9a0a-4c68-9bb6-a4bfc6845cad" alt="Set action options for your automations"><figcaption><p>Set action options for your automations</p></figcaption></figure>

Now you will be asked which action to take. We would like to **send an email**.

<figure><img src="https://3731721370-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-LZdVZovthV0SPlgxS6Y%2Fuploads%2FwXZWKWEddBnZ4PWvrijO%2Factive-capmaign-select-action-for-automation.png?alt=media&#x26;token=890f7db8-68eb-40f1-9bf7-a43575806e58" alt="Select action for your ActiveCmapign automation annotated"><figcaption><p>Select action for your automation</p></figcaption></figure>

In the next step create **an email template** if you haven't already.

<figure><img src="https://3731721370-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-LZdVZovthV0SPlgxS6Y%2Fuploads%2Fvkbn73903RNtVeY90SNk%2Fselect-email-template-activecampaign-automation.png?alt=media&#x26;token=75297456-58b3-4286-968a-74f67d0966a4" alt="Design your ActiveCampaign message template"><figcaption><p>Design your message template</p></figcaption></figure>

Insert an **HTML Block**.

<figure><img src="https://3731721370-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-LZdVZovthV0SPlgxS6Y%2Fuploads%2F5oIBTs83TvKiVQgzpjxD%2Finsert-html-block-activecampaign-message-template.png?alt=media&#x26;token=e3257456-87ca-4168-bdc3-7746b92ed917" alt="Insert HTML block into your ActiveCmpaign automation annotated"><figcaption><p>Insert HTML block into your automation</p></figcaption></figure>

Now paste the Personal Discount code snippet which you've copied to the clipboard.

<figure><img src="https://3731721370-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-LZdVZovthV0SPlgxS6Y%2Fuploads%2FTn06n5V1q9wFzAAIs98B%2Factivecampaign-put-personal-discount-code-snippet.png?alt=media&#x26;token=d26f05cb-4428-448f-b954-fbe285c525f1" alt="Paste code snippet from Personal Discount into ActiveCampaign email template"><figcaption><p>Paste code snippet from Personal Discount</p></figcaption></figure>

After preparing an email template save all changes. Check campaign summary settings. Then click\
**Save and exit**.

<figure><img src="https://3731721370-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-LZdVZovthV0SPlgxS6Y%2Fuploads%2FupffMWf6giTqOPxK6CiR%2Factivecampaign-abandoned-carts-automation-summary.png?alt=media&#x26;token=3a572368-d0b1-4a55-b748-5cf95c6bac70" alt="ActiveCampaign automation summary"><figcaption><p>ActiveCampaign automation summary</p></figcaption></figure>

Now we are coming back to our automation. Select your **email to send**.

<figure><img src="https://3731721370-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-LZdVZovthV0SPlgxS6Y%2Fuploads%2FXAlafkqsqyeHiBGmrrqR%2Factivecampaing-automation-select-email-to-send.png?alt=media&#x26;token=95901561-d0ad-421e-911c-af6c5a5851cb" alt="ActiveCampaign: select email to send"><figcaption><p>ActiveCampaign: select email to send</p></figcaption></figure>

Take a look at your automation graph. If everything is OK, you can **activate** it.

<figure><img src="https://3731721370-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-LZdVZovthV0SPlgxS6Y%2Fuploads%2FZyXgNTHpL4BIPoDcUuxp%2Factivecampaing-automation-scheme.png?alt=media&#x26;token=a0bb093b-9996-4196-a1e5-6caefebf5fa5" alt="Activate ActiveCampaign automation"><figcaption><p>Activate ActiveCampaign automation</p></figcaption></figure>
