If you're regularly collecting Birthdates outside of the Happy Birthday app and would like to add them automatically into your Birthday Club, then this is the article for you. Using your preferred automation/workflow tool, our custom webhook URL provides an endpoint specifically for your store, instantly adding new members into your Birthday Club and removing the need to run regular imports.
Good to know
- Birthday Club sign-ups added via this method will be added to your Birthday Email Campaign. If you have enabled an integration for sending out your Birthday emails, we will push the received birthday details through to your enabled email sending platform.
When to use this
Let's imagine that you are using an app or service to capture the customer's Birthdate when they create an account on your store. Let's also imagine that these Birthdates are being stored as a metafield on the Shopify Customer record.
At present, these Birthdays will not automatically be added to your Birthday Club, so an extra bit of automation is required.
Using either the Shopify Flow app (merchants will need to be on the Shopify, Advanced or Plus plan to use the Send HTTP Request task) or an app like React Flow—Workflow Automation, a workflow can be created to trigger each time a new customer is created in Shopify.
The workflow will then look for the Birthdate metafield on the customer record. If it exists, the workflow will then send an HTTP request to our custom webhook URL along with a payload containing the customers details, including their date of birth.
Once set-up, your Birthday Club will grow each time a customer signs up for an account with your store.
How to generate your custom webhook URL
Each store will have a unique custom webhook URL. Please contact our support team to request your custom webhook URL and we will send it over along with an example of the data/payload structure that you will need to use in your Send HTTP request.
The URL for the webhook will look something like this:
https://happybirthday.unionworks.app/custom/webhook/yourbrandnotmine.myshopify.com/fbc312210b5fd34b3337c22b54dbdgc9
The data/payload for the HTTP request will be:
{
"email": "{{ email }}",
"first_name": "{{ first_name }}",
"last_name": "{{ last_name }}",
"birthday": "{{ Birthday }}"
}
You will need to swap out the placeholder values above with the corresponding values that you wish to use.
Variables and formats
This will only accept a valid email format. If the email being added is already a member of your Birthday Club, the endpoint will discard your request.
first_name
(Optional) - First name of the person signing up
last_name
(Optional) - Last name of the person signing up
birthday
You will need to send through the birthdate in the date format that you have set within the Happy Birthday App. You can check this format at the top of the Settings page within the Happy Birthday app - Happy Birthday Date Format
Example implementation
We have put together an example of how to use the custom webhook URL within a Shopify Flow Workflow:
You can download this workflow from the bottom of this page, but you will need to make the following edits before turning on the workflow:
- Edit the Check If condition in the workflow to locate the metafield you're using to store birthdays.
- Make the same change within the Log Output action.
- Replace the custom webhook URL within the Send HTTP Request action with your own unique Happy Birthday custom webhook URL
Stats for Birthdays added via custom webhook
Birthdays added to your Birthday Club via this method will be shown within the stats view of the the Happy Birthday app as having been received via Custom webhook:
Need any help?
If you need any help with your custom webhook URL, then please get in touch. We may need collaborator access to your store to help with any set-up or troubleshooting that may be required.