# 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="/files/cBn55p5895oBPVqY306L" 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](/personal-discount-for-shopify/configure-discount.md).

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

<figure><img src="/files/X9XZFFrcMy9m1z3b3rds" 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="/files/QC5DOufuUWhxTYr1h1LD" 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="/files/nuhKK2QhF50avb3yesKL" 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="/files/uXJdDW0pc03iZqZxxpk2" 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="/files/s5Ar6SX66jYuiCPU58gs" 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="/files/CJzeOl25ZDLImollrvq0" 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="/files/PTRZ0TevwIqDG6TgqZQV" 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>


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.personaldiscount.io/personal-discount-for-shopify/integrate-personal-discount-with-your-email-service-provider/mailerlite/how-to-create-a-recover-abandoned-carts-campaign-with-mailerlite.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
