> 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/klaviyo/send-a-discount-code-for-new-subscribers-using-klaviyo.md).

# Send a discount code for new subscribers using Klaviyo

Firstly, visit your **Shopify admin panel** and click **Apps** from the left-hand sidebar. Open **Personal Discount** and click **Add automation**. Select **Kaviyo** as your **Email Service Provider** and your **Campaign Type** is **Welcome new subscribers**.

<figure><img src="/files/7FNqPVkO27gfyR5p4S1n" alt="Add Personal Discount and Kalviyo welcome new subscribers automation animated"><figcaption><p>Add welcome new subscribers automation</p></figcaption></figure>

In this step, you can set up details of your automation like a discount value, usage limit, or expiration date. If you would like to learn more, here is a useful article on [how to configure your discount](/personal-discount-for-shopify/configure-discount.md).

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

<figure><img src="/files/uNPsP37FC62QMIYOwVJp" alt="Copy Personal Discount code snippet annotated"><figcaption><p>Copy Personal Discount code snippet</p></figcaption></figure>

Now switch out to your **Klaviyo admin panel** and open **Flows** from the left-hand sidebar. Next, click **Create flow**.

<figure><img src="/files/eKDU9z6lKbL1fUIdrwxi" alt="How to create Klaviyo flow annotated"><figcaption><p>Create Klaviyo flow</p></figcaption></figure>

You can use a predefined automation structure or build your own. I will show you how to **Create From Scratch** so click it.

<figure><img src="/files/GDGantlkgEJMxLkqkOyg" alt="Create Kaviyo flow from scratch annotated"><figcaption><p>Kaviyo flow from scratch</p></figcaption></figure>

Next, enter the name of your automation.&#x20;

<figure><img src="/files/gkTaknBdePXIFXyYv7xB" alt="Enter Klaviyo flow name"><figcaption><p>Enter Klaviyo flow name</p></figcaption></figure>

Now set the trigger which will start an action. Click it and then select **List** and **Newsletter** as a list name.

<figure><img src="/files/2I5aeoQDcKeiziFGouAb" alt="How to set Kaviyo flow trigger animated"><figcaption><p>Set Kaviyo flow trigger</p></figcaption></figure>

After signing up for the newsletter, your recipient should get a welcome message, so drag and drop the **Email** to your automation structure.

<figure><img src="/files/gp411FzxT936bJo2xgxb" alt="How to set action for Klaviyo flow annotated"><figcaption><p>Set action for Klaviyo flow</p></figcaption></figure>

In the next step design your welcome message.

<figure><img src="/files/MHu5aKFqPDZFzc41BKB4" alt="How to design Klaviyo welcome message animated"><figcaption><p>Design Klaviyo welcome message</p></figcaption></figure>

Choose the way how to design your email.

<figure><img src="/files/lg7kd4rac7uAmhVtqVdb" alt="Ways of designing email in Klaviyo"><figcaption><p>Ways of designing email in Klaviyo</p></figcaption></figure>

Drag and drop a text element to the email content.&#x20;

<figure><img src="/files/291kPvOukuHG7Ts0Si4G" alt="Insert text element into Klaviyo email design annotated"><figcaption><p>Insert text element into Klaviyo email design</p></figcaption></figure>

Now edit this text element. Switch view to the **Source** and paste the code snippet from Personal Discount.

<figure><img src="/files/1Cvd36ajfMI63oli9kBL" alt="How to edit code source in Klaviyo text element annotated"><figcaption><p>Edit code source in Klaviyo text element </p></figcaption></figure>

Don't forget to save your content.

And finally, you need to start your automation. Change the status from Draft to Live.

<figure><img src="/files/E3Mu4GXMD0B9ySEs1by2" alt=""><figcaption><p>Activate Klaviyo automation</p></figcaption></figure>

Save your automation by clicking the button at the top right. Now, when someone signs up for your newsletter, will get the discount code.

<figure><img src="/files/jEyaOa7CiiSKeAn3qGOT" alt="Example Klaviyo welcome message discount code with Personal Discount code"><figcaption><p>Example Klaviyo welcome message discount code with Personal Discount code</p></figcaption></figure>
