> 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/how-to-create-a-happy-birthday-campaign-using-klaviyo.md).

# How to create a Happy Birthday campaign using Klaviyo

We will use Personal Discount and Klaviyo.

Start in the **Shopify admin panel** > **Apps** > **Personal Discount** and click the **Add automation** button. Then select **Klaviyo** as your **Email Service Provider** and **Happy Birthday** as your **campaign type**.

<figure><img src="/files/98VVa6UXA0gWBwACe7r8" alt="Create Klaviyo happy birthday automation with Personal Discount for Shopify annotated"><figcaption><p>Add Personal Discount automation</p></figcaption></figure>

You will be asked to specify your automation details in the next step. Learn more from the article describing [how to configure an automated discount](/personal-discount-for-shopify/configure-discount.md).

Copy the code snippet to the clipboard when you have finished setting up the automation.

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

Switch over to the Klaviyo dashboard. We will build happy birthday automation. Navigate to the **Flows** section and click **Create Flow**.

<figure><img src="/files/vYKrIVVxs0Ck3R3HL6wj" alt="Create Flow Klaviyo"><figcaption><p>Create flow in Klaviyo</p></figcaption></figure>

We will **Create From Scratch**.

<figure><img src="/files/yvgVyWbvGwdCx0NftMUc" alt="How to create Flow from scratch in Klaviyo annotated"><figcaption><p>Create Flow from scratch in Klaviyo</p></figcaption></figure>

Now, enter the name of your flow, for example, the Happy Birthday campaign.

<figure><img src="/files/WYOMBfkm7m1hQb04RAv1" alt="The name of your Happy Birthday Campaign Klaviyo"><figcaption><p>Name your Klaviyo automation</p></figcaption></figure>

Now, we need to set the trigger. Select **Date Property** from the trigger types list. Then from the dropped-down menu pick the date property that will trigger this flow. In this case, it is a **Birthday**. In the next window, you can specify trigger setup, for example, if a message should be sent before or on a person's birthday. Click **Done** to save this setting and **Done** again to save the trigger. You can decide if it should be a one-year or annual campaign. In the second case check the **Yearly** option. Personal Discount will generate a new birthday discount code each year.

<figure><img src="/files/Sf7pHNRgj7dAixpiXD2K" alt="Klaviyo set trigger for Happy Birthday Campaign animated"><figcaption><p>Set the trigger for Happy Birthday campaign in Klaviyo</p></figcaption></figure>

We would like to send an email on a customer's birthday, so drag and drop the **Email** box to your automation.

<figure><img src="/files/7EWK9L4uWNw3znY1g9rb" alt="Happy Birthday campaign with Klaviyo. How to add an email? Animated"><figcaption><p>Add sending email to your Klaviyo flow</p></figcaption></figure>

Now we will **Edit** a birthday message.

<figure><img src="/files/B7TA7HlykKKDEvEEczT8" alt="How to edit a birthday message Klaviyo animated"><figcaption><p>Edit a birthday message Klaviyo</p></figcaption></figure>

In the next step, you can specify some details of your email, like the subject or sender name.

<figure><img src="/files/A4DMmYqHDia7XvX4eVQL" alt="Specify the details of your Klaviyo Happy Birthday email"><figcaption><p>Specify the details of your Klaviyo Happy Birthday email</p></figcaption></figure>

You can select an email template from the Klaviyo library or create your own.

<figure><img src="/files/DYE6KEyhmmkzwprbm5li" alt="Klaviyo email templates library"><figcaption><p>Klaviyo email templates library</p></figcaption></figure>

It's time to include a discount code in your email template. Drag and drop a **Text** element to your template. Then delete the default content from it. Next, switch out to the **Source** view and paste the **code snippet** from Personal Discount. **Save** the element and **Save Content**.

<figure><img src="/files/5AiYz1avr91KXI6DPgkT" alt="Add text element into Klaviyo email template and paste code snippet from Personal Discount animated"><figcaption><p>Add text element into Klaviyo email template and paste code snippet from Personal Discount</p></figcaption></figure>

Now you can enable your automation. Change your email box status from **'Draft'** to **'Live'**. Then **Save & Exit**.

<figure><img src="/files/tpIOxWo3uIKJgSZSWRHv" alt="How to enable Klaviyo flow animated"><figcaption><p>How to enable Klaviyo flow</p></figcaption></figure>

Next, we need to prepare a form where the customer can enter their date of birth. One of the solutions is to create a pop-up.

<figure><img src="/files/HKTrmlPYwXiMe5BIy4lP" alt="How to create Klaviyo birthday date pop-up annotated"><figcaption><p>Create Klaviyo birthday date pop-up</p></figcaption></figure>

Select the **Email subscriber list**.

<figure><img src="/files/ZWNiB24XlRw6eeegzaIZ" alt="Klaviyo Birtday pop-up subscribers list annotated"><figcaption><p>Klaviyo Birtday pop-up subscribers list</p></figcaption></figure>

Now, go to the second step of your pop-up. Here, for example, you can change the date format. Notice that Klaviyo has defined the date formats required for the automation to work correctly. It is MM/DD/YYYY or YYYY-MM-DD format. For more information, see the Klaviyo article [Create birthday emails for subscribers (with best practices)](https://www.klaviyo.com/blog/why-to-send-birthday-emails-to-your-subscribers).

<figure><img src="/files/uZS0ozakinHMfTqDY0bV" alt="How to change birthday date format in Klaviyo pop-up annotated"><figcaption><p>Birthday date format Klaviyo pop-up</p></figcaption></figure>

When your pop-up is finished, you can publish it.&#x20;

<figure><img src="/files/uDNwqheClj4g5xeWVdhR" alt="How to publish pop-up in Klaviyo"><figcaption><p>Publish pop-up in Klaviyo</p></figcaption></figure>

To publish your pop-up, there is also a confirmation in Shopify needed. When you click **Publish Form and Go To Shopify**, Klaviyo will redirect you to the appropriate subpage of the Shopify admin panel.

<figure><img src="/files/5LZ9IYZSwpXYvsAymHzc" alt="How to enable Klaviyo pop-up in Shopify template annotated"><figcaption><p>Enable Klaviyo pop-up in Shopify store template</p></figcaption></figure>

Now your customers can get a discount code as a birthday gift.

<figure><img src="/files/kD4H106YFdcf5hQzXWMg" alt="Happy Birthday email for customers using Shopify with Klaviyo"><figcaption><p>Happy Birthday mail with a discount code Klaviyo</p></figcaption></figure>
