> For the complete documentation index, see [llms.txt](https://docs.personaldiscount.io/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.personaldiscount.io/personal-discount-for-shopify/integrate-personal-discount-with-your-email-service-provider/shopify-notifications/how-to-send-a-unique-discount-code-to-customers-who-create-an-account.md).

# How to send a unique discount code to customers who create an account?

Shopify sends a welcome email to customers who create an account in your store. By default the email looks like this:

<figure><img src="/files/RCaKytt56ff3x27GAMjb" alt="Default Shopify welcome email to customers who created an account"><figcaption><p>Default Shopify welcome email to customers who created an account</p></figcaption></figure>

If you want to include a unique discount code (each customer gets an individual coupon code), then follow the steps below.

#### Set up a discount automation in Personal Discount

1\. Add a new automation in Personal Discount.

2\. Select **Shopify** as your email provider.

<figure><img src="/files/avlUXw5Vd66SjrQLpke9" alt="Select Shopify notifications as your Email Service Provider annotated"><figcaption><p>Select Shopify notifications as your Email Service Provider</p></figcaption></figure>

3\. Select **Welcome new accounts** as your campaign type.

<figure><img src="/files/1nFkfUAvHfifQojzjic4" alt="Select the welcome new accounts campaign type annotated"><figcaption><p>Select the <em>welcome new accounts</em> campaign type</p></figcaption></figure>

4\. Set up discount options and copy the code snippet.

<figure><img src="/files/4gtGUZ567EeWecaxU2n6" alt="Personal Discount automation settings annotated"><figcaption><p>Personal Discount automation settings</p></figcaption></figure>

#### Add the code snippet to the Customer account welcome email template

1\. Nagivate to Settings in your Shopify admin panel and the to Notifications:

<figure><img src="/files/PxebChoOHu5UA4IoX6Od" alt=""><figcaption></figcaption></figure>

2\. Scroll down to Customer section and open **Customer account welcome**.

<figure><img src="/files/W0ZRkduvGQmwMUxB1OLu" alt=""><figcaption></figcaption></figure>

3\. Find the following line:

```html
<p>{{ email_body }}</p>
```

4\. Paste the code snippet below the line:

<figure><img src="/files/MmbnP27MlfoegYLFUQjg" alt=""><figcaption></figcaption></figure>

5\. Preview the email to check if the discount code appears in the right place.

<figure><img src="/files/uf6SOxWmzhM6LwMNRSrC" alt=""><figcaption></figcaption></figure>

6\. Save the email template.

Congratulations! From now on, customers who create an account in your shop will receive a discount code for their next purchase.


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## 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, and the optional `goal` query parameter:

```
GET https://docs.personaldiscount.io/personal-discount-for-shopify/integrate-personal-discount-with-your-email-service-provider/shopify-notifications/how-to-send-a-unique-discount-code-to-customers-who-create-an-account.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

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.
