Firstly open your Shopify admin panel > Apps > Personal Discount. Click the Add automation button. Select Shopify as your Email Service Provider and the campaign type - Follow up on purchases.
Add Personal Discount follow up on purchases automation animated
In the next step fill out the form of your automation details. Here is a useful guide on how to configure discount.
Now save your automation and copy the code snippet to your clipboard.
Navigate to Settings > Notifications > Order confirmation and insert your code snippet into your confirmation email template. If you are not sure where to place the code snippet, then the safest place is below the following line:
<p>{{ email_body }}</p>
You can paste it for example here:
Don't forget to save changes to your template.
When your customers place an order, they will receive a discount code for their next purchases, included in an order confirmation email.