# How to create Follow up on purchases campaign with MailerLite

In this article, we will show how to set up Follow up on purchases campaign with MailerLite and Personal Discount.

Navigate to your **Shopify dashboard** > **Apps** > **Personal Discount**. Select **MailerLite** as your email service provider and **Follow up on purchases** 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%2FsWjYOnvTeNTyFbaGM0ZO%2Fshopify-mailerlite-post-purchase-automation-animated.gif?alt=media&#x26;token=028d0b39-9037-4957-b23b-e377951f2835" alt="Add Personal Discount automation for the follow up on purchases campaign with MailerLite animated"><figcaption><p>Add Personal Discount with MailerLite automation</p></figcaption></figure>

Next, specify your automation details. Set the discount pattern, value, expiration date, etc. Take a look at the article on [how to configure discount](https://docs.personaldiscount.io/personal-discount-for-shopify/configure-discount) to find more information.

**Save** your automation and copy the code snippet from the bottom of the page to the clipboard.

<figure><img src="https://3731721370-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-LZdVZovthV0SPlgxS6Y%2Fuploads%2FfU994XprRhmi0T0dVoO8%2Fshopify-mailerlite-copy-personal-discount-code-snippet-animated.gif?alt=media&#x26;token=a75a4dfc-fd1e-49cd-9bcb-c14ecebc97f5" alt="Copy Personal Discount automation code snippet animated"><figcaption><p>Copy Personal Discount code snippet</p></figcaption></figure>

Switch over to your **MailerLite dashboard**. Go to the **Automation** section and click **Create workflow**.

<figure><img src="https://3731721370-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-LZdVZovthV0SPlgxS6Y%2Fuploads%2FHTYhxyfM1p25mejXCfJm%2Fshopify-mailerlite-create-workflow-animated.gif?alt=media&#x26;token=ed910f92-1c1b-4429-bdc3-7d888434075c" alt="Create MailerLite workflow animated"><figcaption><p>Create MailerLite workflow</p></figcaption></figure>

Set up the event that will trigger the automation. Open the **E-commerce automation** section, drop down the Workflow trigger menu and select **Purchases any product**. Then hit **Save**.

<figure><img src="https://3731721370-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-LZdVZovthV0SPlgxS6Y%2Fuploads%2FsNnz77MqrgSqU3YIwTwd%2Fshopify-mailerlite-set-purchases-any-product-trigger-animated.gif?alt=media&#x26;token=b9429b57-cb9b-4fc8-83ab-6f0f44035077" alt="Set purchases any product trigger in MailerLite animated"><figcaption><p>Set automation trigger</p></figcaption></figure>

Now add the action that will be performed when a customer enters this automation. 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%2FKyHtIKtfi4V7Lh31Sd31%2Fshopify-mailerlite-set-sending-email-by%20your-automation-animated.gif?alt=media&#x26;token=5932680d-8a3f-469c-b142-dd4df809aa3e" alt="Add email sending by your MailerLite automation animated"><figcaption><p>Add email sending to your automation</p></figcaption></figure>

Next, design your message. We will use the drag and drop editor.

<figure><img src="https://3731721370-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-LZdVZovthV0SPlgxS6Y%2Fuploads%2FljGFGdbud1NmgsxD8vZF%2Fshopify-mailerlite-design-email-drag-and-drop-editor-animated.gif?alt=media&#x26;token=661fabbd-bfc0-425b-a986-a8231255e246" alt="MailerLite design email: drag and drop editor animated"><figcaption><p>Choose drag and drop editor to design your email</p></figcaption></figure>

Drag and drop a **text** element into your template and **Edit** it. Switch over to the **HTML view**. Delete the default code snippet and paste the one from Personal Discount. Then **Save** the element and entire template by clicking 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%2Fh9oMG0WiwAizf0S5bU6X%2Fshopify-mailerlite-insert-personal-discount-code-into-email-template-animated.gif?alt=media&#x26;token=38f0c0e5-749f-4100-a916-55b9bd6da493" alt="Paste HTML code snippet into MailerLite email template animated"><figcaption><p>Paste the code snippet into MailterLite email template</p></figcaption></figure>

In the end, switch on your automation.&#x20;

<figure><img src="https://3731721370-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-LZdVZovthV0SPlgxS6Y%2Fuploads%2FBBC6XFcT9aFdjNW4h64A%2Fshopify-mailerlite-switch-on-automation-animated.gif?alt=media&#x26;token=f27affc9-c1a0-4819-a325-5157c403571b" alt="Switch on MailerLite automation animated"><figcaption><p>Switch on MailerLite automation animated</p></figcaption></figure>

From now, when a customer buys any product in your store, will get an email with a unique discount code.

<figure><img src="https://3731721370-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-LZdVZovthV0SPlgxS6Y%2Fuploads%2FTjYvlF1RR2Uk9TPRtK7x%2Fmailerlite-shopify-follow-up-on-purchases-email-personal-discount-code.png?alt=media&#x26;token=777ef325-0cbd-4b79-a71e-1df5ac8bb267" alt="MailerLite automated email with Personal Discount code annotated"><figcaption><p>MailerLite automated email with Personal Discount code</p></figcaption></figure>
