APIs & Integrations

Mubeen
Participant

Contacts Fields in API

SOLVE

Hi Hubspot Dev Team!

I am creating a note type activity by engagement API, but I want to use contact fields as token in the description so that it replaces the value on the bases of associated contact.
Is it possible via API if yes can you please share the doc related to this or any guide?

I tried this but didn't help
{
    "engagement": {
    "type": "NOTE"
  },
    "associations": {
    "contactIds": [123]
  },
    "metadata": {
    "body": "{{contact.firstname}} is member of this company."
  }
}

Thank you

0 Upvotes
1 Accepted solution
IsaacTakushi
Solution
HubSpot Employee
HubSpot Employee

Contacts Fields in API

SOLVE

Hi, @Mubeen.

 

I'm sorry if I was unclear. It is not possible to use personalization tokens in engagements. They will not render with the contact's values.

 

You can use personalization tokens within events created through the Timeline API , but not with the Engagements API (notes, calls, emails, meetings).

Isaac Takushi

Associate Certification Manager

View solution in original post

0 Upvotes
7 Replies 7
himanshurauthan
Thought Leader | Elite Partner
Thought Leader | Elite Partner

Contacts Fields in API

SOLVE
Hello @Mubeen

May be I am not very accurate in this help but can you try to create an engagement directly on HubSpot with tokenized contact properties. And then try to run a API call to get the same engagement and then copy the same response in your poat request.

Hope it helps.

Thanks
Digital Marketing & Inbound Expert In Growth Hacking Technology
0 Upvotes
Mubeen
Participant

Contacts Fields in API

SOLVE

Hi!
I tried this way but it's only sending the resultant string instead of the tokenized string.

do you have any other option which can help.


Thank you

0 Upvotes
IsaacTakushi
HubSpot Employee
HubSpot Employee

Contacts Fields in API

SOLVE

Hi, @Mubeen.

 

Perhaps I misunderstand your goal, but HubL variables and personalization tokens are not supported by the Engagements API.

 

To populate the correct values for a contact, you can retreive them through the Contacts API, plug them into your note body, and then send the completed engagement payload to this endpoint.

Isaac Takushi

Associate Certification Manager
0 Upvotes
Mubeen
Participant

Contacts Fields in API

SOLVE

Hi @IsaacTakushi 

Thank you for sharing things.
My main concern is to use personalized token in the body of engagement API payload like I mentioned in the first comment.

Input:
"body": "Engagemnet for this {{contact.firstname}}"

Output:

"Engagemnet for this Mubeen"

Thank you

0 Upvotes
IsaacTakushi
Solution
HubSpot Employee
HubSpot Employee

Contacts Fields in API

SOLVE

Hi, @Mubeen.

 

I'm sorry if I was unclear. It is not possible to use personalization tokens in engagements. They will not render with the contact's values.

 

You can use personalization tokens within events created through the Timeline API , but not with the Engagements API (notes, calls, emails, meetings).

Isaac Takushi

Associate Certification Manager
0 Upvotes
Mubeen
Participant

Contacts Fields in API

SOLVE

Hi @IsaacTakushi 

Thank you!! for all you details .

Mubeen Tahir

0 Upvotes
IsaacTakushi
HubSpot Employee
HubSpot Employee

Contacts Fields in API

SOLVE

You're welcome!

Isaac Takushi

Associate Certification Manager
0 Upvotes