I’m building an app using HubSpot’s API to extract records with minimal delay, ideally under a minute. To achieve this, I need to understand if updates and creates appear in search results in the order they were modified or if there’s a possibility of out-of-order updates that isn’t explicitly documented.
The CRM API Search documentation notes the following limitation:
It may take a few moments for newly created or updated CRM objects to appear in search results.
While this addresses delay, it raises questions about ordering. Can I rely on updates being ordered by hs_lastmodifieddate, or is there a risk of out-of-order updates? I want to avoid mistakenly assuming order and consequently missing updates.
Short answer is that it works "most" of the time. But you will see out of order records (for change detection timestamps) once in a while, and that will mess up your pagination logic. So you will see timestamps 1, 2,3, 89, 4, 5 ,6 in the same page once in a while.
We are now "working around" by applying outlier detection logic and ignore such records and Hubspot has never answered this question, everytime we have asked.
@matthelm - Other opinions here may differ, but I would be extremely suspicious about the exact order and timestamp relationships of records if you are looking for time precision at the second count level. The responsivness of all the the HubSpot processes that grind away after a change can vary enormously in my experience and you won't be able to count on a specific latency.