0

We need to incorporate HubSpot's email syntax into our own API. For this to work we require a unique id for each customer / contact. From doing a lot of reading online I think this variable is called vid.

However, when I create and send a test email via Portal > Content > Email - if you enter {{ vid }} or {{ contacts.vid }} it does not get replaced in the same way as {{ contacts.FIRSTNAME }} would populate the email with a firstname in place of the variable. This indicates that vid might not be the variable I am after.

Does anyone have any idea what the syntax that I require is called? I looked at the source code for the test email but it didn't give me any useful information.

I also require a unique id for each run of an email newsletter - I think this is called campaign_id but as before entering this into the test email didn't do anything.

Any help would be massively appreciated, I have Googled this to death but I think I must be missing something as even with all the HubSpot documentation that is available I can not find out what I'm after!

Thanks

elmarko
  • 1
  • 2
  • Can you be more specific as to how you plan on accessing the VID? You have the correct value, but it is not exposed as part of email render. If email is only your means of identifying the value (and not part of the solution), look in to developers.hubspot.com -- specifically the contacts API: http://developers.hubspot.com/docs/methods/contacts/get_contact_by_email – Kirk H Jan 04 '16 at 14:17

1 Answers1

0

When you're viewing the email template in preview mode, you can access the JSON data that is being sent to the template by clicking the hubspot icon in the top right of the screen and choosing "Developer Info". From there you can inspect the JSON hierarchy and get to the data you need.

enter image description here

Tim Joyce
  • 4,487
  • 5
  • 34
  • 50