# Shopify Email

### Add new Personal Discount automation <a href="#text-add-new-personal-discount-automation" id="text-add-new-personal-discount-automation"></a>

First, add a new Personal Discount automation. Navigate to your **Shopify admin panel** → **Apps** → **Personal Discount**. Click **Add automation**. Select **Shopify Email** *marketing automations* as your Email Service Provider. Then, pick the campaign type that you want to enhance with unique discount codes:

* Welcome new subscribers
* Recover abandoned carts
* Thank first-time customers
* Follow up on purchases
* Customer winback
* Other

<figure><img src="https://3731721370-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-LZdVZovthV0SPlgxS6Y%2Fuploads%2Frqbc9a7fWGsYVTDY8BYf%2Fshopify-email-personal-discount-create-automation-animated.gif?alt=media&#x26;token=520a8fd5-9edf-4280-a8bc-27fc36e29ca8" alt="Add new automation in Personal Discount for Shopify Email animated annotated"><figcaption><p>Add new automation in Personal Discount for Shopify Email</p></figcaption></figure>

In the next step, you can set up details of your automation such as a discount value, usage limit, or expiration date. Learn more from the article on [how to configure your discount](https://docs.personaldiscount.io/personal-discount-for-shopify/configure-discount).

Save the automation when you finish and copy the code snippet to the clipboard.

<figure><img src="https://3731721370-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-LZdVZovthV0SPlgxS6Y%2Fuploads%2FxxQNFX18Wn5xkKOUsu1k%2Fcopy-the-code-snippet-from-personal-discount-to-the-clipboard.png?alt=media&#x26;token=6890a988-96ba-4a8c-8ab5-84ac136a054b" alt="Copy the code snippet from Personal Discount annotated"><figcaption><p>Copy the code snippet from Personal Discount</p></figcaption></figure>

### Create new Shopify Email automation

Switch over to the **Marketing** section in your Shopify dashboard → **Automations**. Hit **Create** automation button. Then select the desired automation type. The automation preview will be displayed. Click **Use workflow** to continue. Now you can edit the automation workflow according to your needs. There is also an option to build your automation from scratch. Once you have completed this stage, let's **Edit email content**.

<figure><img src="https://3731721370-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-LZdVZovthV0SPlgxS6Y%2Fuploads%2FRn2weHFrAfQQFEEh6o9b%2Fcreate-shopify-email-automation-animated.gif?alt=media&#x26;token=cf5dcace-7024-4fd1-9b6d-997d2e12e254" alt="How to create new Shopify Email automation animated"><figcaption><p>How to create new Shopify Email automation</p></figcaption></figure>

### Include a discount code in the email template

Now design your amazing email template and insert a code snippet responsible for displaying a discount code. Hit **Add section** button or the **plus icon**. Pick the **{/} Custom Liquid** element. In the Custom Liquid area in the right-hand sidebar paste the code snippet from Personal Discount. You don't have to save changes to this element, just click somewhere on the background of the message. From now in your template will be displayed a preview of an example discount code.

<figure><img src="https://3731721370-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-LZdVZovthV0SPlgxS6Y%2Fuploads%2FZa9KpEOtYRKIo03mhyLc%2Fshopify-email-how-to-paste-the-code-snippet-from-personal-discount-animated.gif?alt=media&#x26;token=b90e8101-4056-4244-9f8f-5434f506117a" alt="How to paste the code snippet from Personal Discount into Shopify Email message template animated"><figcaption><p>Paste the code snippet from Personal Discount into Shopify Email message template</p></figcaption></figure>

### Activate your automation

When all the elements of your automation are ready, you can turn it on. **Save** your email template and click **Turn on workflow** and again **Turn on** to confirm.

<figure><img src="https://3731721370-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-LZdVZovthV0SPlgxS6Y%2Fuploads%2FJIqpPiQwYHpjoCyr8STF%2Fshopify-email-turn-on-automation-animated.gif?alt=media&#x26;token=c8a3e582-9f46-474a-821f-3c1d64105826" alt="How to activate Shopify Email automation animated"><figcaption><p>Activate Shopify Email automation</p></figcaption></figure>

Congratulations! From now on your customers can receive messages with unique discount codes according to your automation settings. A discount code is displayed as an image that, when clicked on, redirects the customer to your shop with the discount applied.

<figure><img src="https://3731721370-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-LZdVZovthV0SPlgxS6Y%2Fuploads%2FYTXv2B8RpGjXq2BZzzHx%2Fshopify-email-message-with-code-from-personal-discount.png?alt=media&#x26;token=beb3b24d-b528-4e7e-92dc-3bbd21f7e5f8" alt="Personal Discount code in the Shopify Email annotated"><figcaption><p>Personal Discount code in the Shopify Email</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/shopify-email.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.
