# How to create a recover abandoned carts campaign with MailerLite

Let's examine how to create such a campaign using Personal Discount with MailerLite.

Open your **Shopify admin page** > **Apps** > **Personal Discount**. Click **Add automation** button. Then select **MailerLite** as your email service provider and **Recover abandoned carts** as the campaign type.

<figure><img src="https://3731721370-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-LZdVZovthV0SPlgxS6Y%2Fuploads%2FZcKQrfDn0gxM0eWWTxhY%2Fshopify-mailerlite-add-recover-abandoned-carts-automation-animated.gif?alt=media&#x26;token=a7c1d590-a693-495b-8594-3c9803934571" alt="Add Personal Discount recover abandoned carts automation with MailerLite animated"><figcaption><p>Add recover abandoned carts automation</p></figcaption></figure>

In the next step set the details of your automation like discount code pattern, value, expiration date, etc. For more information, take a look at the article on [how to configure discount](https://docs.personaldiscount.io/personal-discount-for-shopify/configure-discount).

When you **Save** your automation, copy to the clipboard the code snippet from the bottom of the page.

<figure><img src="https://3731721370-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-LZdVZovthV0SPlgxS6Y%2Fuploads%2FtvvufVDt4H4p2w33F7QO%2Fmailerlite-shopify-personal-discount-code-snippet-animated.gif?alt=media&#x26;token=a7093de9-7af5-45b4-8811-9e0e68be0446" alt="Personal Discount for Shopify copy the code snippet to the clioboard animated"><figcaption><p>Copy the code snippet to the clipboard</p></figcaption></figure>

Now switch over to your **MailerLite dashboard**. Navigate to the **Automation** section and click the **Create workflow** button.

<figure><img src="https://3731721370-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-LZdVZovthV0SPlgxS6Y%2Fuploads%2F6AjPtZNBAcxlqxQTcZ1z%2Fmailerlite-shopify-automation-create-workflow-animated.gif?alt=media&#x26;token=9b0ce09f-c5c4-4a7a-b25b-451782372da9" alt="Create MailerLite workflow animated"><figcaption><p>Create MailerLite automation</p></figcaption></figure>

Set up the trigger. Open the **E-commerce automation** section. Select **Abandoned checkout** from the Workflow trigger drop-down menu.&#x20;

You can specify the time after which an email will be sent from checkout abandonment or decide if you want customers to repeat the workflow every time they abandon a cart. Then uncheck the **Repeat workflow for subscribers only once** box.

<figure><img src="https://3731721370-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-LZdVZovthV0SPlgxS6Y%2Fuploads%2FeH4ULt1KyguALMn77SEV%2Fmailerlite-set-workflow-trigger-animated.gif?alt=media&#x26;token=60ad1239-ec65-4a14-99b9-791a72a8b987" alt="How to set workflow trigger in MailerLite automation animated"><figcaption><p>Set workflow trigger</p></figcaption></figure>

Now add the action that will be performed when a customer enters automation. We want to send an email. Next, type the name and subject of your message. Click **Design email** and **Choose** drag & drop editor.

<figure><img src="https://3731721370-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-LZdVZovthV0SPlgxS6Y%2Fuploads%2FfouO67EVbmNarVjQpkqo%2Fmailerlite-add-email-sending-to-the-automation-animated.gif?alt=media&#x26;token=4ef107b4-4729-4290-8e1b-a15a292fe18a" alt="Add email sending to your MailerLite abandoned carts automation animated"><figcaption><p>Add email sending to your automation</p></figcaption></figure>

In the next step, insert the code snippet from Personal Discount into the email template. Drag and drop a **text element** and **edit** it. Switch over to the **HTML view**. Delete the default code snippet and paste the one from Personal Discount. **Save** changes. If your template is ready, hit the **Done editing** button.&#x20;

<figure><img src="https://3731721370-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-LZdVZovthV0SPlgxS6Y%2Fuploads%2FetBSANWXgJkHhwZPzJCo%2Fmailerlite-insert-html-code-snippet-into-email-template-animated.gif?alt=media&#x26;token=080afaf5-5b59-48cf-acf2-7dec02b73eb0" alt="MailerLite insert HTML code snippet into email template animated"><figcaption><p>Insert HTML code snippet into MailerLite email template</p></figcaption></figure>

And the final step: turn on your automation.

<figure><img src="https://3731721370-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-LZdVZovthV0SPlgxS6Y%2Fuploads%2FuLdqn559ZwLSmHw3XuXn%2Fmailerlite-personal-discount-code-shopify-switch-on-abandoned-cart-automation-animated.gif?alt=media&#x26;token=7a2a9469-171c-41ad-b35b-360f58a61e24" alt="Switch on MailerLite automation animated"><figcaption><p>Switch on MailerLite automation</p></figcaption></figure>

From now, when your customer abandons their cart, they will receive an email with a discount code to complete their purchase after a set amount of time.&#x20;

<figure><img src="https://3731721370-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-LZdVZovthV0SPlgxS6Y%2Fuploads%2FfcGK1NcDm9re35iZBoLq%2Fshopify-mailerlite-recover-abandoned-carts-campaign-personal-discount-code.png?alt=media&#x26;token=f4a571d2-332e-421a-8895-a25c8e9fd055" alt="MailerLite abandoned cart automation message with a Shopify discount code"><figcaption><p>MailerLite abandoned cart automation message with a Shopify discount code</p></figcaption></figure>
