APIs & Integrations

Jez_D
Participant

Add another contact property to the webhook payload

SOLVE

Morning,

 

I have created an app with a webhook and managed to install it into out portal.

 

When I trigger the required event, it seems to work, with the payload being received that the URL I specified. 

The payload looks like this:

[
  {
    "objectId": 5151,
    "propertyName": "my_custom_property",
    "propertyValue": "15:11:03 GMT",
    "changeSource": "BATCH_UPDATE",
    "eventId": xxxxxxx,
    "subscriptionId": xxxxxx,
    "portalId": xxxxxxx,
    "appId": xxxxxxx,
    "occurredAt": 1565104265799,
    "subscriptionType": "contact.propertyChange",
    "attemptNumber": 0
  }
]

I would like the value of another property included in this payload. Something like:

[
  {
    "objectId": 5151,
    "propertyName": "my_custom_property",
    "propertyValue": "15:11:03 GMT",
    "otherPropertyName": "my_custom_identifier",
    "otherPropertyValue": "xxx-999999-aaa-777",
    "changeSource": "BATCH_UPDATE",
    "eventId": xxxxxxx,
    "subscriptionId": xxxxxx,
    "portalId": xxxxxxx,
    "appId": xxxxxxx,
    "occurredAt": 1565104265799,
    "subscriptionType": "contact.propertyChange",
    "attemptNumber": 0
  }
]

How can I do this?
I could not find anything in the official docs.

The second property won't be being updated, so I don't believe adding that as a trigger will work.

 

Regards

Jez D

1 Accepted solution
WendyGoh
Solution
HubSpot Employee
HubSpot Employee

Add another contact property to the webhook payload

SOLVE

Hi @Jez_D,

 

I hope all is well with you 🙂

 

Currently, it would not be possible to include another property in the payload. The payload will only include the property and property value that you have subscribed to.

 

That said, if the second property will not get updated, maybe one way to go about getting details of the second property is to get the vid ID (which is the objectId) > if it is a contact, you can use the get contact by its vid endpoint to get all the information of the single contact. This provide you with the most information as possible.

 

Hope this helps to clarify!

View solution in original post

6 Replies 6
VEspo
Top Contributor

Add another contact property to the webhook payload

SOLVE

We could also really use the ability to be allowed to have an additional custom property added to a webhook payload at the subscription level.  We keep the IDs for our contacts and companies that are used in our other systems within the company and contact records, so being able to have this passed in the webhook would cut down on a lot of API calls we'd have to make for each and every webhook received.

0 Upvotes
VEspo
Top Contributor

Add another contact property to the webhook payload

SOLVE

We could also really use the ability to be allowed to have an additional custom property added to a webhook payload at the subscription level.  We keep the IDs for our contacts and companies that are used in our other systems within the company and contact records, so being able to have this passed in the webhook would cut down on a lot of API calls we'd have to make for each and every webhook received.

0 Upvotes
Jaycee_Lewis
Community Manager
Community Manager

Add another contact property to the webhook payload

SOLVE

Hey, @VEspo 👋 If you have a moment, adding your suggestion to the Ideas Community and getting some upvotes will be very helpful in getting your suggestion in front of the Product team. If you add a link back to your Idea post, I'll be sure to give it an upvote to help get the ball rolling.

 

Best,

Jaycee

linkedin

Jaycee Lewis

Developer Community Manager

Community | HubSpot

VEspo
Top Contributor

Add another contact property to the webhook payload

SOLVE
Jaycee_Lewis
Community Manager
Community Manager

Add another contact property to the webhook payload

SOLVE

Thanks for the link! I added my upvote

linkedin

Jaycee Lewis

Developer Community Manager

Community | HubSpot

0 Upvotes
WendyGoh
Solution
HubSpot Employee
HubSpot Employee

Add another contact property to the webhook payload

SOLVE

Hi @Jez_D,

 

I hope all is well with you 🙂

 

Currently, it would not be possible to include another property in the payload. The payload will only include the property and property value that you have subscribed to.

 

That said, if the second property will not get updated, maybe one way to go about getting details of the second property is to get the vid ID (which is the objectId) > if it is a contact, you can use the get contact by its vid endpoint to get all the information of the single contact. This provide you with the most information as possible.

 

Hope this helps to clarify!