Company search API via domain is not returning results immediately

When a company is created by “Create and Associate companies with Contacts” in Hubspot settings, our search API is not getting the response immediately. Due to which, we create another record with same domain causing duplicates. How do we handle such scenario.

Workflow:
1. We send contacts and companis to Hubspot via APIs.

2. When we send in contacts, the automatic association creates companies.

3. When sending in companies, we lookup via domain to see if the company exists and then decide to create or update.

4. As we dont get domain in lookup immediately, we decide to create instead of update.

Hi @KS19 ,

When looking up immediately it is possible that records has not been created yet . What you can do is you can add some delay or wait in your automation then proceed to next step , that will help you .

:check_mark:Mark this answer as solution if it helps you.To make it easy for other community members

@Bhupendra_Kumar Is there any way we can go for a realtime updates without any delay?

Hey @KS19 :waving_hand: The Search API may have a lag of up to a few minutes before updates are shown in results — “It may take a few moments for newly created or updated CRM objects to appear in search results” You can find all the limitations here.

Best,

Jaycee

Thanks for the response @Jaycee_Lewis . Is there any other options other than this API to avoid duplicates in real time data sync?