Hi there,
I'm aware of how to build birthday / anniversary emails using a date token in a wait flow step, as outlined here: https://experienceleague.adobe.com/docs/marketo/using/product-docs/core-marketo-concepts/smart-campa...
But I would like to avoid using such a long wait step, in case there are unexpected changes in the data during that time. We ran into this problem in a past iteration of our birthday emails - for example, an incorrect or fake Date of Birth was entered in our CRM, and then was corrected at a later date. Since the campaign was in a wait step, the correction didn't register, and a birthday email was delivered on the wrong day.
Anyone know of a way to get around this? I basically want to do a daily batch campaign like this:
Our IT/Systems staff (non-Marketo users) suggested this:
Thoughts/ideas?
Solved! Go to Solution.
@SanfordWhiteman wrote:
Then use Change Data Value to set Next Anniversary Date to {{lead.Next Anniversary Date}} + 1 year.
So if I'm understanding the portion above correctly, that takes care of ensuring the birthday campaign continues to run year after year.
Right.
For the new field, should I set the field type to Date?
My challenge now is how to get the anniversary date in the first place. The only field we have to work with is Date of Birth, which obviously includes the year of birth and can't be used as an anniversary. I've seen suggestions in the forums that a webhook can be used to achieve this. I haven't used webhooks before, so was hoping for a Marketo solution. But hey, always fun to learn something new!
Yep.
My challenge now is how to get the anniversary date in the first place. The only field we have to work with is Date of Birth, which obviously includes the year of birth and can't be used as an anniversary. I've seen suggestions in the forums that a webhook can be used to achieve this. I haven't used webhooks before, so was hoping for a Marketo solution. But hey, always fun to learn something new!
True. If your external system can’t start it off on the right date, your challenge is to initialize the field to the first anniversary date after today, after which it’ll run automatically. There’s no way to do this with only internal Marketo functions. A webhook-compatible service can do it quite easily. For example if your service runs/understands JS, the code could be like so:
let today = new Date();
let dateOfBirth = new Date({{Lead.Date of Birth}});
var nextBirthday = new Date(dateOfBirth);
nextBirthday.setYear(today.getFullYear());
if( nextBirthday < today ) {
nextBirthday.setYear(nextBirthday.getFullYear() + 1);
}
This makes a clone of the Date of Birth, then sets its year to the current year. That is, if my birthday is 2010-06-01, then the clone is 2022-06-01. Then it does a final check to see if the clone is in the past (i.e. earlier this year) and if so, pushes it forward one more year. After that it’s good to go.
I don't like the Wait method either - no matter how common - for the reasons you note.
You can have a field named Next Anniversary Date and run a batch exactly as you say. Then use Change Data Value to set Next Anniversary Date to {{lead.Next Anniversary Date}} + 1 year.
Thanks @SanfordWhiteman! I didn't realize until today when I stumbled upon this other post with your reply that the + [timeframe] is a possibility!! And your application above is brilliant!
@SanfordWhiteman wrote:
Then use Change Data Value to set Next Anniversary Date to {{lead.Next Anniversary Date}} + 1 year.
So if I'm understanding the portion above correctly, that takes care of ensuring the birthday campaign continues to run year after year.
@SanfordWhiteman wrote:
You can have a field named Next Anniversary Date
For the new field, should I set the field type to Date?
My challenge now is how to get the anniversary date in the first place. The only field we have to work with is Date of Birth, which obviously includes the year of birth and can't be used as an anniversary. I've seen suggestions in the forums that a webhook can be used to achieve this. I haven't used webhooks before, so was hoping for a Marketo solution. But hey, always fun to learn something new!
@SanfordWhiteman wrote:
Then use Change Data Value to set Next Anniversary Date to {{lead.Next Anniversary Date}} + 1 year.
So if I'm understanding the portion above correctly, that takes care of ensuring the birthday campaign continues to run year after year.
Right.
For the new field, should I set the field type to Date?
My challenge now is how to get the anniversary date in the first place. The only field we have to work with is Date of Birth, which obviously includes the year of birth and can't be used as an anniversary. I've seen suggestions in the forums that a webhook can be used to achieve this. I haven't used webhooks before, so was hoping for a Marketo solution. But hey, always fun to learn something new!
Yep.
My challenge now is how to get the anniversary date in the first place. The only field we have to work with is Date of Birth, which obviously includes the year of birth and can't be used as an anniversary. I've seen suggestions in the forums that a webhook can be used to achieve this. I haven't used webhooks before, so was hoping for a Marketo solution. But hey, always fun to learn something new!
True. If your external system can’t start it off on the right date, your challenge is to initialize the field to the first anniversary date after today, after which it’ll run automatically. There’s no way to do this with only internal Marketo functions. A webhook-compatible service can do it quite easily. For example if your service runs/understands JS, the code could be like so:
let today = new Date();
let dateOfBirth = new Date({{Lead.Date of Birth}});
var nextBirthday = new Date(dateOfBirth);
nextBirthday.setYear(today.getFullYear());
if( nextBirthday < today ) {
nextBirthday.setYear(nextBirthday.getFullYear() + 1);
}
This makes a clone of the Date of Birth, then sets its year to the current year. That is, if my birthday is 2010-06-01, then the clone is 2022-06-01. Then it does a final check to see if the clone is in the past (i.e. earlier this year) and if so, pushes it forward one more year. After that it’s good to go.
Thanks @SanfordWhiteman! Appreciate the code and explanation!!
Thinking about the wait step w/anniversary option again - I wonder if it would work to set up a separate triggered campaign so if there's a data value change on the Date of Birth, then it would remove someone out of the birthday campaign wait step and re-enter them into it using the new date. Like this:
Smart List:
Trigger --> Data Value Changes, Attribute: Date of Birth
Flow:
1 - Remove From Flow --> Campaign is [Happy Birthday Email]
2 - Request Campaign --> Requested Campaign is [Happy Birthday Email]
Right, this is how you can recycle them through the campaign, but it doesn't get away from the Waits.
Wouldn't the combination of the wait step w/anniversary option and a campaign setting of allowing each person to run through the flow only once every 364 (or 365??) days do the trick of recycling?
Also, any recommendations for webhook / webhook-compatible services?
Also, any recommendations for webhook / webhook-compatible services?
Alas, no, due to Community guidelines.