APIs & Integrations

Łukasz
Member

Missing Fields in contact Properties

SOLVE

I'm currently testing integration with hubspot in my app and I'm struggling with this issue for some time now.

 

I have webhooks registered for around 50 contact fields, one deal field and a contact.creation. When receiving webhook regarding a specific contact, I hit the "Get contact by ID" or "Get group of contacts by ID" endpoints to get all fields values for those contacts. Around 1% of contacts I receive in the response does not have some fields (like firstname and lastname) although they are surely defined (as they are created programatically via API and they are created with those fields). It seems that this is random behaviour as when I try to get those same contacts via API again, I get all the defined fields.

 

The problem is not solved by specifying fields I need (using "Property" parameter😞 I still don't have them in some responses.

It is quite important issue as it's vital for my system to know if there are values in those fields, and missing fields can also be a correct behaviour in some cases (like when they have no value).

1 Accepted solution
cbarley
Solution
HubSpot Alumni
HubSpot Alumni

Missing Fields in contact Properties

SOLVE

Hi @Łukasz , ah yes I see.  Just tested out the creation event and realize I was thinking in the wrong manner. I believe this behavior you're describing to be expected. Since webhooks are an asynchronous process, the creation event can happen and trigger the webhook, all while the contact is still being fully processed and each field is being "filled out" in HubSpot. Depending on how many contacts are being created at once, and how many fields each contact must accept, as well as if they go through any workflows to update properties, you may not see all properties immediately on the contact. This is why waiting, or implementing retry logic as you've done is what we'd recommend. 

View solution in original post

0 Upvotes
11 Replies 11
cbarley
HubSpot Alumni
HubSpot Alumni

Missing Fields in contact Properties

SOLVE

Hi @Łukasz , normally we see issues with webhooks when there are outages https://integrate.hubspot.com/t/webhook-performance-issues/3336/8, but not normally outside of that. We had one last week. That said, have you taken a look at the rate limit settings in your Developer Account? Is your webhook able to process all updates?

0 Upvotes
Łukasz
Member

Missing Fields in contact Properties

SOLVE

There doesn't seem to be any issue with the events processing on my end: I receive all events and process them just fine. I also have resonable rate limit: 5 requests per second. The problem is not that there is some kind of error but that after receiving a webhook I make a request to hubspot API to get whole contact and I don't have some properties in the response although they are defined. The rest of the response is fine. The same requests work correctly after some time.

0 Upvotes
cbarley
HubSpot Alumni
HubSpot Alumni

Missing Fields in contact Properties

SOLVE

Hi @Łukasz , so you receive a webhook, then make a GET request to HubSpot for that contact, and not all properties are being returned for it? Am I understanding you correctly?

0 Upvotes
Łukasz
Member

Missing Fields in contact Properties

SOLVE

Exactly that. There even is email value in "identity-profiles" and I add "property=email" to the request, but there is no email in "properties" object in the response. After some time, when I repeat the request (which is the workaround I had to implement) all properties are in the response.

0 Upvotes
cbarley
HubSpot Alumni
HubSpot Alumni

Missing Fields in contact Properties

SOLVE

Thank you @Łukasz ! Is this directly after only a contact creation, or some other event? How long is "After some time"?

0 Upvotes
Łukasz
Member

Missing Fields in contact Properties

SOLVE

It is directly after contact creation. I didn't notice anything like that after any other event (I only have webhooks registered for contact creation, one for deal field change and around 50 for contact field change).

 

Currently I have a workaround implemented that retries the request if there is no email in "properties" field, 5 times with 1s interval which seems to be enough most of the time.

 

It was not enough at least once, when I tried adding large number of new contacts (10k), for one contact, even when retried the request 5th time, after more than 5s I still got it with missing fields.

0 Upvotes
cbarley
HubSpot Alumni
HubSpot Alumni

Missing Fields in contact Properties

SOLVE

Hi @Łukasz , this is likely just a delay in the processing of contacts, but I'd like to know, when you get the original payload from HubSpot of the contact after creation, does it have all the fields you'd expect on it? 

0 Upvotes
Łukasz
Member

Missing Fields in contact Properties

SOLVE

Hi @cbarley 
What do you mean by payload? In the event sent by hubspot? Or among all events sent by hubspot concerning one created contact? 

 

In the contact.creation event payload there are no fields. Hubspot sends also contact.propertyChange events for all fields when creating contact. Unfortunately, hubspot sends all of those in seemingly random order, not grouped by contact and I get propertyChange event eventually for all contacts, but by that time, Hubspot API sends correct fields when I'm requesting contact. The issue in question happens only for a short time after creating programmatically a large bunch of contacts.

0 Upvotes
cbarley
HubSpot Alumni
HubSpot Alumni

Missing Fields in contact Properties

SOLVE

Hi @Łukasz , by payload I just meant whatever you received from HubSpot at your webhook URL. Were the fields for the contact present as expected, or were they missing? 

 

If the issue happens after large batches, it's likely simply a processing delay. I'd continue retrying your requests as you've done, perhaps retrying after a larger amount of time with each attempt.

0 Upvotes
Łukasz
Member

Missing Fields in contact Properties

SOLVE

As I said, Hubspot does not send any properties in contact-creation event payload.

 

Retrying request is how I solved it already. I just thought that it's an error if I receive event that contact has been created while it doesn't yet have any properties.

 

 

0 Upvotes
cbarley
Solution
HubSpot Alumni
HubSpot Alumni

Missing Fields in contact Properties

SOLVE

Hi @Łukasz , ah yes I see.  Just tested out the creation event and realize I was thinking in the wrong manner. I believe this behavior you're describing to be expected. Since webhooks are an asynchronous process, the creation event can happen and trigger the webhook, all while the contact is still being fully processed and each field is being "filled out" in HubSpot. Depending on how many contacts are being created at once, and how many fields each contact must accept, as well as if they go through any workflows to update properties, you may not see all properties immediately on the contact. This is why waiting, or implementing retry logic as you've done is what we'd recommend. 

0 Upvotes