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.

CHow to create follow up on purchases automation using Personal Discount for Shopify and ConvertKit animated

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

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

Copy the code snippet from Personal Discount to the clipboard animated

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.

How to create new ConvertKit email template animated

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. 

How to create ConvertKit email sequence animated

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. 

How to insert an HTML code snippet into email template in ConvertKit animated
We already have everything we need to create the purchase automation. So let's navigate to the Automate section > Visual Automations > New automation.

How to create visual automation in ConvertKit animated

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.

How to set up the trigger for ConvertKit post-purchase automated campaign animated

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.

How to add an action to the ConvertKit post-purchase automation aniamted

Finally, you can activate your automation. 

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