using custom object personalization token in marketing emails

Hey,

I have a custom object named provider.

this object has a property named provider_url.

In a marketing when i use in a button {{provider.provider_url}}/dashboard it doesn’t work at all.

But when i copy the property to the contact and use {{contact.provider_url}} it does work in the email.

But i need to start it from the provider, cause a contact can have multiple providers, and the email workflows starts from the providers.

Is there any reason it doesn’t work and way to fix it?

Thanks

David

Hey @dmattauch, good question!

I’m pretty sure that HubSpot emails will pull from contact properties since it’s that contact record that will actually be receiving the email. Personalization tokens will fire respective to the contact record, so anything you want to populate within an email will need to live on the contact record. Even if you could pull in the {{provider.provider_url}}, HubSpot wouldn’t know which one to use in instances where a contact has multiple associated provider custom objects with unique URL values.

I would create a workflow that copies the provider URL of an associated provider custom object into the a custom property on the contact record (i.e., Provider 1 URL, Provider 2 URL, etc.). I’d use branching logic in that workflow like:

  • If Provider 1 URL is known, check Provider 2 URL
  • If Provider 2 URL is unknown, copy the Provider URL value to that custom contact property

That would prevent the contact value from being overwritten and allow you to pull in multiple Provider URL values for those contacts who have multiple providers like you mentioned.

As long as you can get the information you need to the associated contact record, everything should function as you need it to.

Hope this helps!!