Overview
If you'd prefer to have full control over your Birthday emails, but would still like to use our unique Birthday Discount Link feature, then our Shopify Email integration is a great option.
Shopify Email allows you to create personalized Birthday email campaigns that you have full creative control over. Sending via Shopify Email also has the added benefit that emails will be sent out from your store's domain, meaning your customers receive it straight from a source they already know and trust, helping to strengthen your brand’s credibility and connection.
How the integration works
Here is a high level overview of how our Shopify Email integration works once enabled.
When a customer joins your Birthday Club after a purchase on your online store or via POS, we generate a Birthday Discount Link that is unique to that customer.
The Birthday Discount Link is automatically stored in an unstructured customer metafield on that customer's Shopify customer record.
The Birthday Discount will become live only for a specified period before, on or after the customers birthday – you decide the period in which the discount is live by customizing the Birthday Discount Link settings from within the Happy Birthday Campaign.
The metafield containing the Birthday Discount Link can then be included within a Shopify Email template, ready for use within your Shopify Email Birthday campaign.
Our Customer Birthday Flow trigger can be set to fire on (or before) a customer's birthday. This trigger will be used to start a Shopify Flow workflow which has a Shopify Email action to send out the Birthday Email to the customer.
When the Birthday Discount Link included in the Birthday Email is clicked, the customer will be taken to a page that we create on your Shopify store that we call the Generate Discount Page. If the customer's Birthday Discount is live, their discount code will be generated and displayed to the customer on that page.
The customer can choose to apply the discount directly from that page and begin shopping.
So as you can see, there are a number of steps and settings that need to be configured for this integration to work, but it's all quite straightforward.
Please note:
Shopify Flow is only available to customers on the Shopify, Advanced, or Shopify Plus plans.
We can only add the Birthday Discount Link metafield to members of your Birthday Club that also have a corresponding Shopify Customer Record.
Shopify Email will only be sent to a customer if they have also subscribed to email marketing.
Requirements for the Shopify Email integration
Before you begin, you’ll need:
The Happy Birthday Emails app installed from the Shopify App Store
The Shopify Email app installed from the Shopify App Store
The Shopify Flow app installed from the Shopify App Store
Permissions to edit and send Shopify Email campaigns.
An understanding of how to create a Shopify Email Template
Enabling the integration
Enable the Shopify Email integration by selecting the Integrations menu on the left-hand side of the Happy Birthday Email app.
Then select the More details button within the Shopify Email integration section:
Then enable the integration by clicking the Enable Shopify Email Integration button:
This will turn on the Birthday Discount Link feature within the Happy Birthday app.
Any customer that signs up to your Birthday Club will automatically have their Birthday Discount Link stored in the following customer metafield:
customer.metafields.happybirthday.discount_link
Please note:
If you'd also like to store the customers Birthdate within a customer metafield, please read our article on storing birth dates within Shopify customer metafields.
Create your workflow in Shopify Flow
You could start this process by creating a Marketing automation within your Shopify Admin, however, as this will redirect you straight into Shopify Flow, we'd recommend that you start your workflow using Shopify Flow.
Select the customer birthday trigger
Go into Shopify Flow and select the Create workflow button.
Then click on the Select a trigger button.
From the menu of apps, select the Happy Birthday app and then the Customer Birthday trigger:
Select Shopify Email as the action for your automation
Now hover over the trigger in the main workflow, click on the plus icon on the right hand side and select Action.
Select Email from the left hand pane.
Select Send marketing email:
Ignore the error/information message that appears in the left hand pane of the workflow editor. This is just letting you know that you will need to select (or create) your Birthday email template.
Create or select your Shopify Email Template
You can select any template available within the Shopify Email Template library or you can build your own email from scratch.
This article presumes that you are already familiar with creating Shopify Email templates.
Click on the Select template button from the left hand pane of the survey editor:
You will now be taken to the Shopify Email Editor where you can create a template from scratch or select one of your existing email templates.
Once your Birthday Email template is ready, it's time to include the customers Birthday Discount Link into the template.
Include the Birthday Discount Link
To include the Birthday Discount Link into your selected Birthday Email Template, we will be utilising a section within the email editor called Custom Liquid.
Select your chosen email template and select edit.
Scroll down the editor and click on the section in your email just above where you would like to place your discount link.
Select the Custom Liquid section type and you will see the custom liquid code input field appear in the right hand pane of the editor:
To begin with, copy the code below and paste it into the Custom Liquid input field.
The wording for your link is completely up to you, so feel free to change it:
<div>
<a href="{{ customer.metafields.happybirthday.discount_link }}">View your discount</a>
</div>
Once added, you'll notice that the section within the template and the link will need styling.
We can add inline CSS styles to the surrounding <div> element and the anchor tag element <a> to style them to match your email template.
You will need padding within the section and the anchor element will look better if styled to give the appearance of a button. Styling choices are entirely up to you.
As an example, I replaced the basic code with the below code, which contains inline CSS to make the link stand out within my email template:
<div>
<a href="{{ customer.metafields.happybirthday.discount_link }}">View your discount</a>
</div>
Here you can see the code with inline styles being applied to the template:
That's it!
Make sure that you have customized the subject line and preview text for your email if you haven't already done so.
Sending a preview of the email is advised so that you can see how the email looks, however there will be no active Birthday Discount Link associated with the test email, so the link will not take you to a live birthday discount page.
Shopify Email autosaves your template, so you do not need to save it, but when you are ready, click on the Set to active button in the top right hand side of the editor.
You will then be taken back to your workflow within Shopify Flow.
Save and turn on your workflow
Name your workflow if you haven't done so already, e.g. Happy Birthday Email Campaign and then click on the Apply changes button in the top right hand corner of the editor:
All that is left to do within Shopify Flow is click the Turn on workflow button:
Confirm that you wish to turn on the workflow:
You workflow is now turned on and you can exit the Flow Editor and return to the Happy Birthday app.
There are now some settings within Happy Birthday that need to be set. We'll take a look at those next.
Settings
Configuring your Shopify Flow trigger settings
There are a couple of settings that control when Happy Birthday will send the Customer Birthday Flow trigger into Shopify Flow.
By default, the trigger is set to be sent on the day of the customer's Birthday, however, you may wish to send out the Birthday email in advance.
To change these settings, navigate to the Birthday campaign editor within the Happy Birthday app.
Under the General Settings section in the right-hand pane of the editor, select the Shopify Flow section to reveal the settings:
Days before birthday
Leaving this setting at 0 will ensure that we send the Flow trigger to Shopify Flow on the customer's birthday. If you'd like to send the Flow trigger ahead of the customer's birthday, then change the number within this field.
Send Time
You can choose to send the Flow Trigger at a specific hour in the day based on your timezone, e.g. (GMT+00:00) Europe/London. We use your store's timezone setting to determine your timezone.
Make any required changes and hit the Save button in the top right hand side of the editor.
Configuring your Birthday Discount Link settings
The last thing to tweak are the settings of your Generate Discount Page which is the landing page responsible for creating and displaying the unique Birthday discount code.
The Generate Discount Page is enabled in your store by default when you enable one of our email sending integrations.
To access the settings, select Advanced from the Happy Birthday app main menu and then click on the Configure button within the Generate Discount Page section:
We have an article that covers each of the settings within the Generate Discount Page which explains how to set-up the page so that the discount becomes available at the same time as the Birthday Email is being sent out.
Please take a look at our article on the generate discount page settings.
Once configured, it's time to test your campaign.
Testing your Shopify Email Birthday Campaign
The best way to test your Shopify Email Birthday Campaign is to place a test order on your store using an email address that isn't already a member of your Birthday Club.
At the checkout, ensure that you have selected the Email me with news and offers checkbox to make sure that the marketing preference for your customer record is set to True:
Use the Happy Birthday app block on the thank you page to submit your date of birth and join your Birthday Club, ensuring that you use today's date as the date of birth.
Using our send / re-send a Flow Trigger feature, find and select your Member record within the Happy Birthday app.
From the More actions drop down menu, choose the Send flow trigger option:
Select the Customer birthday option and click on the Send Now button:
Your flow trigger has now been sent.
Within Shopify Flow, visit your workflow and you should see that it has recently been run (it could take a minute or two to appear):
Go into the details of that run.
All being well, you will see that it has succeeded:
Check your email and you should see your test Birthday Email in your inbox:
Click on the View your discount link (or whatever you named your link) and you should be taken through to the Generate Discount Page and be presented with your discount.
That's it!
Final considerations
You may want to disable the email sending feature within the Happy Birthday app if you are choosing to send your Birthday Emails via Shopify Email. It will not be turned off automatically when enabling the integration.
Need any help?
Please get in touch with support if you need any further assistance.



















