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.
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.
Copy the code snippet to the clipboard when you have finished setting up the automation.
Switch over to the Klaviyo dashboard. We will build happy birthday automation. Navigate to the Flows section and click Create Flow.
We will Create From Scratch.
Now, enter the name of your flow, for example, the Happy Birthday campaign.
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.
We would like to send an email on a customer's birthday, so drag and drop the Email box to your automation.
Now we will Edit a birthday message.
In the next step, you can specify some details of your email, like the subject or sender name.
You can select an email template from the Klaviyo library or create your own.
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.
Now you can enable your automation. Change your email box status from 'Draft' to 'Live'. Then Save & Exit.
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.
Select the Email subscriber list.
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).
When your pop-up is finished, you can publish it.
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.
Now your customers can get a discount code as a birthday gift.