Create Token that Links to a URL
Hi everyone,
I'm relatively new to creating tokens in Marketo and could use some guidance. We're currently working on a recruiting nurture campaign where each lead is assigned a recruiting manager. We want to incorporate customized CTA buttons that link to each lead's respective recruiter's Calendly for booking.
Here's the challenge: I've developed a token to achieve this functionality, but it's not working as expected. When we test it, all leads seem to default to the same landing page instead of redirecting to their recruiter's Calendly link.
The field in Marketo that stores the recruiter's name is PC_Recruiter_Name, and I've verified that this field works correctly with other tokens. Specifically, the token I'm using for this field is: ${lead.PC_Recruiter_Name}.
Could anyone advise on how to properly set up a token so that it populates the correct Calendly URL based on each lead's recruiter? Additionally, how can we ensure that leads without an assigned recruiter are directed to a default landing page?
Thank you in advance for your help!
## Check the recruiter name and set the corresponding Calendly link
#if(${lead.PC_Recruiter_Name} == "NAME HERE")
#set($Calendly = "calendly.com/NAMEHERE")
#elseif(${lead.PC_Recruiter_Name} == "SECOND NAME HERE")
#set($Calendly = "calendly.com/SECONDNAMEHERE")
#elseif(${lead.PC_Recruiter_Name} == "THIRD NAME HERE")
#set($Calendly = "calendly.com/THIRDNAMEHERE")
#else
#set($Calendly = "LANDINGPAGEURL.com")
#end
## Output the Calendly URL
${Calendly}