# How to create a follow up on purchases automation with ConvertKit

From this article, you will learn how to create a post-purchase campaign with ConvertKit and Personal Discount.

Let's start by preparing post-purchase automation in the Personal Discount app. Open your **Shopify dashboard** > **Apps** > **Personal Discount** > **Add automation**. In the next steps pick **ConvertKit** as your Email Service Provider and **Follow up on purchases** as the Campaign Type.

<figure><img src="/files/EYUqbkvmUkneeYUrwLg3" alt="How to create follow up on purchases automation using Personal Discount for Shopify and ConvertKit animated"><figcaption><p>Create Personal Discount Follow up on purchases automation with ConvertKit</p></figcaption></figure>

Next, specify parameters of your automation such as the code pattern, the discount value, the expiration date, etc. Here is the guide on [how to configure discount](/personal-discount-for-shopify/configure-discount.md).&#x20;

When you have finished setting up the automation, save it and copy the code snippet at the bottom of the page to the clipboard.

<figure><img src="/files/qautTW7Admf8OcBWI79D" alt="Copy the code snippet from Personal Discount to the clipboard animated"><figcaption><p>Copy the code snippet to the clipboard</p></figcaption></figure>

Now switch over to the ConvertKit. Create your post-purchase message. Click **Send** > **Email Templates** > **New email template**. You can select one of the pre-built templates or add your HTML code.

<figure><img src="/files/xnBWCmKM2J1YxUv5xnfc" alt="How to create new ConvertKit email template animated"><figcaption><p>Create new ConvertKit email template</p></figcaption></figure>

When you have finished preparing your template, **Save** it. Then navigate to the **Send** section > **Sequence** > **Create new sequence**. Then select the template which you prepared in the previous step.&#x20;

<figure><img src="/files/3f1hm0MyMwsmsCYWRlMi" alt="How to create ConvertKit email sequence animated"><figcaption><p>How to create ConvertKit email sequence animated</p></figcaption></figure>

In the next step, paste the code snippet from Personal Discount into your email sequence. Click the **plus sign** and select an **HTML Block** to insert this element into your template. Then, **Edit** this element and paste the code snippet from Personal Discount. **Save** the HTML Block changes and **Publish changes** in your sequence.&#x20;

<figure><img src="/files/ue1tXG3ADJGh3dv0aZf5" alt="How to insert an HTML code snippet into email template in ConvertKit animated"><figcaption><p>Insert an HTML code snippet into ConvertKit email template</p></figcaption></figure>

We already have everything we need to create the purchase automation. So let's navigate to the **Automate** section > **Visual Automations** > **New automation**.

<figure><img src="/files/cg2LtUqbKCMpJfWBOi32" alt="How to create visual automation in ConvertKit animated"><figcaption><p>ConvertKit: create visual automation</p></figcaption></figure>

Now set up the trigger for your automation. Click on **Start Building** > **Purchase** label. Then, select the product after purchase of which, the customer will receive the message with the discount code. You can also pick the **Any product** option from all of your integrations. Hit **Add event** to confirm.

<figure><img src="/files/M4Os9gkAgSujXZbFF0mq" alt="How to set up the trigger for ConvertKit post-purchase automated campaign animated"><figcaption><p>Set up the ConvertKit post-purchase automation trigger</p></figcaption></figure>

Next, select the action that will be performed when your customer enters the automation. We would like to send the email we prepared in the previous steps. Click on the **plus sign** > **Action** > **Email sequence** and select the sequence you want to send.

<figure><img src="/files/BGMOkJVHO8enFmNZlzm3" alt="How to add an action to the ConvertKit post-purchase automation animated"><figcaption><p>Add an action to the ConvertKit post-purchase automation</p></figcaption></figure>

Finally, you can activate your automation.&#x20;

<figure><img src="/files/tE0jif3pX0EUup5K9vKT" alt="How to activate ConvertKit automation animated"><figcaption><p>Activate ConvertKit automation</p></figcaption></figure>

From now, when your customer buys something in your store, they will get a discount code for their next purchase.

<figure><img src="/files/xIMsM9IQS9SdMIqO0Hir" alt="Example automated welcome message from ConvertKit with Personal Discount code animated"><figcaption><p>Example automated welcome message from ConvertKit with Personal 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/convertkit/how-to-create-a-follow-up-on-purchases-automation-with-convertkit.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.
