# 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="https://3731721370-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-LZdVZovthV0SPlgxS6Y%2Fuploads%2FB8rMBA9DXjKCt1oUNd5I%2Fshopify-customer-account-welcome-default-email-preview.png?alt=media&#x26;token=90e9193c-8e1d-4294-b97e-249fda57c51b" 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="https://3731721370-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-LZdVZovthV0SPlgxS6Y%2Fuploads%2FZcsExDWaKqu517xR54sP%2Fselect-shopify-as-email-provider.png?alt=media&#x26;token=046af672-450b-4812-a29f-6fce1f7bace0" 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="https://3731721370-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-LZdVZovthV0SPlgxS6Y%2Fuploads%2FmgoRP5S7wIhivad8FPlw%2Fwelcome-new-accounts.png?alt=media&#x26;token=8851150e-c45d-487d-a26d-029e72ebab72" 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="https://3731721370-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-LZdVZovthV0SPlgxS6Y%2Fuploads%2Fhz9zU9PBu3sHkcFq90Zk%2Fdiscount-image-settings.png?alt=media&#x26;token=2144e211-e609-43f6-bcf6-ae09a9a790be" 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="https://3731721370-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-LZdVZovthV0SPlgxS6Y%2Fuploads%2FghaP71IIeSBTKqY5K5d6%2Fshopify-settings.png?alt=media&#x26;token=3aa77153-8e1e-4db2-bc29-ee1a33b5a0c8" alt=""><figcaption></figcaption></figure>

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

<figure><img src="https://3731721370-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-LZdVZovthV0SPlgxS6Y%2Fuploads%2FnQT2DEvj4jdihFpNLy0J%2Fshopify-customer-notifications.png?alt=media&#x26;token=36ec3aa9-0eaa-48fe-b01c-86484ad6e888" 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="https://3731721370-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-LZdVZovthV0SPlgxS6Y%2Fuploads%2FiieymvwdKDprePyLj0Gu%2Fcustomer-account-welcome-template.png?alt=media&#x26;token=27944d88-c281-4617-89e6-38be9c714c48" alt=""><figcaption></figcaption></figure>

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

<figure><img src="https://3731721370-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-LZdVZovthV0SPlgxS6Y%2Fuploads%2FJP1UIxLIzUHJLFyeaEub%2Fcustomer-account-welcome-preview.png?alt=media&#x26;token=7b13da8a-1f39-4a82-a631-9f53f6737c60" 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.
