Some customers might notice that their Salesforce integration is creating duplicate entries (Contacts, Leads) for calls received or made to/from the same phone number.
If the calls that created the duplicate entries are less than five minutes apart from each other we see the following behavior:
- When the first call comes in, the integration searches for existing Contacts, Leads or Accounts with a number that matches with the dialed number as per the Logging Your Calls in Salesforce KB Article.
- If it doesn't find an existing entry and the integration is set to create new contacts, it creates a new contact in Salesforce.
- When the second call occurs, the integration again searches for existing Contacts, Leads or Accounts with a matching phone number but Salesforce returns no matches.
- The integration ends up creating another contact in Salesforce with the same phone number.
-
The reason for this behavior is that according to Salesforce's documentation, the Salesforce search index can be rebuilt a combined maximum of 60 times per hour for all storefronts in an org and must also wait at least 5 minutes between index rebuilds for an individual storefront. (see
Help And Training Community)
- This means that by the time the second call arrives, Salesforce has not finished indexing the contact that was created for the first call, so that contact does not appear in the search results for the second call which causes the integration to create another contact for the same number.
Since this indexing delay is a limitation on the Salesforce side, our recommendation to prevent this, is to wait at least 5 minutes between calls to the same phone number whenever possible to ensure that created contacts are found and a duplicate contact is not created.