The 'my_property' field is a dropdown menu. In this case, Hubspot places the option's label by default as a value, but I need to place the internal value of this option and not the label.
Is there any way to do this? If so, what would be the correct syntax?
I'm looking for a solution in the HubL documentation, but I haven't had success yet.
I checked a few other posts, and sadly it seems as if you can not retrieve the internal value through a contact token. It will always return the label. What you could do, is create a custom module where you set the correct internal value based on the label. Something like this:
{% if contact.my_property == 'The Bromfield School' %}
{% set my_property_value = 8762342352 %}
{% elif contact.my_property == 'Something else' %}
{% set my_property_value = 8762342352 %}
{% endif %}
If you have a lot of options in your property, you could turn to HubDB and store them there as well, as you can retrieve HubDB data in email with the programmable email beta.
I know this is quite a lot of work to achieve something that simple, but this should help you out.
Learn more about HubSpot by following me on LinkedIn or YouTube
✅ Did my answer solve your issue? Help the community by marking it as the solution.
In fatct, I'm already using de HubDB for this project. I'm gonna dig into this programmable email doc, seems very promissing for what I'm trying to do.
Anyway man, thanks very much for your help... again!