# 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="https://3731721370-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-LZdVZovthV0SPlgxS6Y%2Fuploads%2FKGcUZXdMeDtTiP9tiyzM%2Fconvertkit-shopify-personal-discount-app-follow-up-on-purchases-create-automation.gif?alt=media&#x26;token=8282d613-327a-47ad-a66e-5e47cdde62d0" 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](https://docs.personaldiscount.io/personal-discount-for-shopify/configure-discount).&#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="https://3731721370-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-LZdVZovthV0SPlgxS6Y%2Fuploads%2Fjn2UTtMSTtVG7SprM6Ov%2Fconvertkit-shopify-personal-discount-copy-the-code-snippet-to-the-clipboard.gif?alt=media&#x26;token=c0db7e39-fa58-4995-b0fc-dad252665b2f" 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="https://3731721370-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-LZdVZovthV0SPlgxS6Y%2Fuploads%2F8jGLLWdq4nwieB00BRaB%2Fconvertkit-create-email-template.gif?alt=media&#x26;token=01285ba7-baa4-42b9-905c-70e68989f8f3" 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="https://3731721370-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-LZdVZovthV0SPlgxS6Y%2Fuploads%2FxdLN9IZ2JUvw9puOFuay%2Fconvertkit-create-email-sequence-animated.gif?alt=media&#x26;token=4f1d6a6f-33b3-45a1-ba05-cb8d260cc6bc" 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="https://3731721370-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-LZdVZovthV0SPlgxS6Y%2Fuploads%2F0nRwB4Q6pzMEKxjG68Wz%2Fconvertkit-shopify-personal-discount-paste-code-snippet-into-the-message-template-animated.gif?alt=media&#x26;token=f00bcc42-08e1-4caa-994f-e210d3c565f2" 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="https://3731721370-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-LZdVZovthV0SPlgxS6Y%2Fuploads%2FMlaWzUwkN2J82lrTwjKE%2Fconvertkit-create-visual-automation-animated.gif?alt=media&#x26;token=196838cf-1697-4bb1-802a-6faaaff820fa" 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="https://3731721370-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-LZdVZovthV0SPlgxS6Y%2Fuploads%2FpgcoXkTP4rZrZTMfNCm2%2Fconvertkit-post-purchase-automation-set-up-trigger-animated.gif?alt=media&#x26;token=65a5aa4a-a8b0-4a27-b5ab-c6bef352b978" 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="https://3731721370-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-LZdVZovthV0SPlgxS6Y%2Fuploads%2Fklulmr4XlWqI0F6cmfRC%2Fconvertkit-post-purchase-automation-set-up-action-animated.gif?alt=media&#x26;token=02808561-d8d8-4c92-970c-345caf902e5d" 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="https://3731721370-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-LZdVZovthV0SPlgxS6Y%2Fuploads%2FPp2lcfpfpYHd1S53dfPf%2Fconvertkit-how-to-activate-visual-automation-animated.gif?alt=media&#x26;token=cdbcfa1e-72cc-4195-9a33-da6e861b32f7" 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="https://3731721370-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-LZdVZovthV0SPlgxS6Y%2Fuploads%2FiafMQpVQJg96qk269UTM%2Fconvertkit-shopify-personal-discount-code-post-purchase-message.png?alt=media&#x26;token=8ba61e29-2d1f-4a03-8611-18dc8ddb3659" 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>
