(I hope this is not something that's clearly stated in the API docs that I just missed)
Has anyone else noticed that webhooks have a strong preference to use int values when POSTing payload from workflows, while calling HubSpot API from external servers will return the same values as Strings?
For example, if a Ticket has properties:
- id (standard "Record ID" property),
- some_custom_type (custom property created as "Dropdown select" with values like `123` filled in manually while created),
- some_custom_date (custom property created as "Date picker"),
That was rather unexpected and it somewhat complicates things as there now have to be different handling for items received via webhooks vs items pulled via API.
I also wanted to invite a couple of subject matter experts to this conversation : Hi @beeginman, @stefen and @Oezcan do you have any insights you'd like to share to help @DKanunnikau, please?
If anybody else has anything to add and/or share, please feel free to join in the conversation 🙂
Thank you so much and have a lovely day!
Best, Bérangère
HubSpot’s AI-powered customer agent resolves up to 50% of customer queries instantly, with some customers reaching up to 90% resolution rates. Learn More.
I have checked that post and did not see any mention of data types. Also, the links from that post seem to be poiting to the old docs (legacydocs.hubspot.com).
The new webhook API docs (https://developers.hubspot.com/docs/api/webhooks) mention which fields can be included (for example, "objectId: The ID of the object that was created, changed, or deleted. For contacts this is the contact ID; for companies, the company ID; for deals, the deal ID; and for conversations the thread ID. "), but do not explicitly say which data types those fields are. In the example JSON it can be seen that such values are sent as numbers, but you have to pay close attention to notice that.