{"title":"Resolve duplicate account and contact sync errors","slug":"resolve-duplicate-account-sync-errors","url":"https://support.storeconnect.com/articles/resolve-duplicate-account-sync-errors","url_markdown":"https://support.storeconnect.com/articles/resolve-duplicate-account-sync-errors.md","subtitle":null,"summary":"Fix DUPLICATES_DETECTED and DUPLICATE_VALUE sync errors caused by Salesforce duplicate rules on Account or Contact records, merged accounts, third-party Flows triggering duplicate checks during sync, or matching records that were never synced to the website.","type":"Help_Documentation","video_url":"","keywords":"DUPLICATES_DETECTED, DUPLICATE_VALUE, duplicate, account, sync error, merge, sc_id, SCID, never synced, no match, opt-in","last_modified":"2026-08-21T07:12:35+0000","body_markdown":"## Symptoms\n\nYou see a sync error in the [sync error tool](sync-error-tool) with one of the following status codes:\n\n- **DUPLICATES_DETECTED** — the message varies by object, for example: \"It looks like you are creating a duplicate Account. We recommend you use an existing Account instead.\" or \"It looks like you are creating a duplicate Contact. We recommend you use an existing Contact instead.\"\n- **DUPLICATE_VALUE** — \"A unique column has a duplicate value.\"\n- **CANNOT_EXECUTE_FLOW_TRIGGER** with an inner `DUPLICATES_DETECTED` message — a third-party Flow or Process is performing its own duplicate check during sync.\n- Orders failing to sync because the referenced account no longer exists in Salesforce.\n\nThese errors occur on Account, Contact, or Lead records during sync.\n\n## Cause\n\nStoreConnect automatically checks existing customer records during checkout to avoid creating duplicates in Salesforce. It matches customers to existing leads, contacts, and accounts using a combination of name, email, and phone fields. For full details on how this works, see [automated lead conversion to avoid duplication](lead-contact-and-account-deduplication).\n\nDespite this, **Salesforce-side duplicate rules can still block the sync**. StoreConnect's duplicate resolution runs on the store side before data is sent to Salesforce, but Salesforce's own **Duplicate Rules** fire independently when the record is saved to Salesforce. If a Salesforce **Duplicate Rule** is set to **Block**, the sync will fail even though StoreConnect has already performed its own duplicate checks.\n\n**Alert (Prompt) mode rules also cause sync failures.** When a duplicate rule is set to Alert, Salesforce shows a warning that a manual user can acknowledge and continue past. StoreConnect's sync runs automatically and cannot respond to that warning, so the sync fails in the same way it would under a Block rule. Both Block and Alert mode duplicate rules can cause sync errors for the **StoreConnect Sync User**.\n\nThere are four common scenarios that cause this error:\n\n1. **Salesforce Duplicate Rules blocking sync** — the org has standard or custom duplicate rules on Account or Contact set to Block, which prevents the record from being created or updated.\n2. **Orphaned reference (account merged or deleted in Salesforce)** — an account was merged or deleted in Salesforce, but StoreConnect still holds the old reference. When an order tries to sync against the old record, it fails because the Salesforce record no longer exists.\n3. **Third-party package Flow** — an installed package (e.g., a tax calculation or ERP integration package) runs a Flow that performs its own duplicate check during the sync operation.\n4. **Matching record never synced to the website** — the Salesforce contact or account the customer should have matched has no StoreConnect ID (SCID), so it does not exist on the website. StoreConnect's checkout deduplication can only match against records that have synced to the website, so it cannot see the existing record and creates a new one. That new record then syncs back to Salesforce as a duplicate. This commonly affects pre-existing Account, Contact, and Lead records that were never given a SCID (they are not assigned one on install), and orgs using [manage standard object sync](per-record-sync-opt-in) where a contact was synced but its account was not (or vice versa). See [syncing records with StoreConnect IDs](what-records-sync-to-your-website) for how records become available to the website.\n\n## Resolution\n\n### Scenario A: Exclude the StoreConnect Sync User (Recommended)\n\nRather than adjusting duplicate rules each time a sync error occurs, configure duplicate rules to skip enforcement for the **StoreConnect Sync User** permanently. This resolves both Block and Alert mode failures and is the recommended long-term solution.\n\n1. In Salesforce, go to **Setup** and search for **Duplicate Rules**.\n2. Open the duplicate rule causing the sync failure.\n3. Under **Conditions**, add a condition: **Current User: Profile** → **not equal to** → `Salesforce API Only System Integrations`.\n4. Save and activate the rule.\n5. Re-sync affected records via the [sync error tool](sync-error-tool).\n\nThis leaves duplicate protection fully intact for all manual users. StoreConnect already performs its own duplicate checking on the store side before records are sent to Salesforce (see [automated lead conversion to avoid duplication](lead-contact-and-account-deduplication)), so excluding the **Sync User** from Salesforce-side rules avoids redundant enforcement without reducing data quality.\n\n:::note\nIf your org uses multiple duplicate rules on the same object, add the **Sync User** exclusion condition to each rule. Salesforce allows a maximum of 5 duplicate rules per object.\n:::\n\n### Scenario B: Disable the alert action\n\nIf the duplicate rule is set to Alert rather than Block, a quicker fix is to remove the alert action entirely:\n\n1. In Salesforce, go to **Setup** and search for **Duplicate Rules**.\n2. Open the rule causing the failure.\n3. Under the rule's actions, uncheck the **Alert** checkbox (apply to both Create and Edit if applicable).\n4. Save the rule.\n5. Re-sync affected records via the [sync error tool](sync-error-tool).\n\nThe matching rule still runs and potential duplicates are still logged for reporting; they just won't block the sync or prompt during the process. This is a minimal change that preserves duplicate visibility while unblocking the sync.\n\n### Scenario C: Temporarily deactivate the duplicate rule\n\nIf there are genuine duplicates that need to be merged, temporarily deactivate the rule to allow the sync through, then merge and re-enable:\n\n1. In Salesforce, go to **Setup** and search for **Duplicate Rules**.\n2. Identify the rule(s) on the Account or Contact object that are set to **Block**.\n3. Temporarily **deactivate** the blocking duplicate rule.\n4. Re-sync all affected records via the [sync error tool](sync-error-tool).\n5. After sync completes, **merge** the duplicate records in Salesforce.\n6. **Re-enable** the duplicate rule.\n\n:::note\nResolve all other sync errors that reference the same account before merging. Merging while related records are still in error can cascade new failures.\n:::\n\n:::tip\nSelect all records in the list when re-syncing, not just the one that failed. Related events for the same record may also need to be re-processed.\n:::\n\n### Scenario D: Orphaned reference (account merged or deleted)\n\nWhen an account is merged or deleted in Salesforce, StoreConnect may still hold the old reference. You need to update the reference to point to the correct Salesforce record.\n\n1. Locate the sync error in the [sync error tool](sync-error-tool) and note the **sc_id** value from the error detail.\n2. Identify the **correct Salesforce Account ID**. This is the merge winner or the replacement record.\n3. Update the reference using one of these methods:\n\n**Via the Sync Error Panel:**\n\nOpen the error detail in the **Sync Error Tool**, edit the changed fields to point to the correct Account SFID, then click **Re-sync**.\n\n**Via the Developer Console:**\n\nQuery the **Change Event** to find the affected record:\n\n```soql\n\nSELECT s_c__changed_fields__c, ID\nFROM s_c__Change_Event__c\nWHERE s_c__object_sc_id__c = '\u003csc_id_value\u003e'\n```\n\nFind the related order if needed:\n\n```soql\n\nSELECT ID FROM Order\nWHERE s_c__sc_id__c = '\u003csc_id_value\u003e'\n```\n\nUpdate the **Change Event**'s changed fields to reference the correct Account SFID, then re-sync.\n\n### Scenario E: Third-party Flow triggering duplicate check\n\n1. Read the error message to identify the specific Flow or Process name (e.g., \"Acme Tax Duplicate Check\").\n2. Contact the package vendor or your Salesforce administrator to fix the Flow's entry criteria.\n3. Alternatively, temporarily **disable** the third-party Flow, re-sync the affected records, then re-enable it.\n4. Consider adding an entry condition to the Flow to **exclude the StoreConnect Sync User**. See [resolve Flow and trigger blocking sync errors](resolve-flow-trigger-sync-errors) for details on this pattern.\n\n### Scenario F: Matching record never synced to the website\n\nWhen the existing Salesforce record has no SCID, the website cannot match against it at checkout and creates a new record, which then collides with the original on sync. There are two ways to resolve this, depending on whether you want to prevent the duplicate or accept it.\n\n**Option 1: Sync the existing records to the website (prevents future duplicates)**\n\nGive the existing Salesforce records a SCID so the website can match against them going forward. For a single contact, invite the contact or [trigger a password reset](how-to-reset-a-password); for many records, use the Sync to SC quick action or a bulk Dataloader import. Adding a SCID to a contact also adds it to its primary account, so contacts are never synced without their account. See [syncing records with StoreConnect IDs](what-records-sync-to-your-website) for each method.\n\nIf the org uses [manage standard object sync](per-record-sync-opt-in), make sure both the account and its related contacts are marked `enable_sync` together. Enabling one without the other is itself a cause of duplicates.\n\n**Option 2: Exclude the Sync User and allow the duplicate to be created**\n\nIf you do not need every existing Salesforce record on the website, exclude the **StoreConnect Sync User** from the duplicate rule (see Scenario A) so the sync succeeds and the new record is allowed through. This accepts that a duplicate will exist in Salesforce, which you can then merge manually. Use this when only website-originated records matter and back-filling SCIDs across a large existing data set is not worthwhile.\n\nAfter resolving, merge any genuine duplicates in Salesforce and re-sync the affected records via the [sync error tool](sync-error-tool).\n\n## Verification\n\n1. Confirm the sync error no longer appears in the [sync error tool](sync-error-tool).\n2. Open the synced record in Salesforce and verify the account association is correct.\n3. If accounts were merged, confirm that orders and contacts are now linked to the correct surviving account.\n\n## Prevention\n\n- Before merging accounts in Salesforce, check the [sync error tool](sync-error-tool) for pending errors that reference that account.\n- Add a **Current User: Profile** exclusion condition for `Salesforce API Only System Integrations` on all duplicate rules that apply to Account, Contact, or Lead objects.\n- When setting up the **StoreConnect Sync User** for a new client, configure duplicate rule exclusions as part of the initial setup rather than waiting until errors occur. This is a predictable failure mode that can be prevented before any records are synced.\n- Audit duplicate rules after installing third-party packages, because new Flows may introduce additional duplicate checks.\n- Review how StoreConnect handles duplicates at checkout in [automated lead conversion to avoid duplication](lead-contact-and-account-deduplication).\n\n### Best practices for duplicate management\n\nWhen configuring Salesforce **Duplicate Rules** alongside StoreConnect, follow these recommendations:\n\n- **Exclude the StoreConnect Sync User.** On each duplicate rule, add a condition: **Current User: Profile** → **not equal to** → `Salesforce API Only System Integrations`. This prevents sync failures while still protecting manual data entry by your team. StoreConnect performs its own duplicate checking before records reach Salesforce, so this does not reduce data quality.\n- **Use \"Allow + Report\" mode first.** Deploy duplicate rules in report-only mode for a week, inspect logged duplicates, tune matching criteria, then switch to Block mode if needed. See [Salesforce Duplicate Rules](https://help.salesforce.com/s/articleView?id=sales.duplicate_rules_map_of_reference.htm\u0026language=en_US\u0026type=5).\n- **Use stable identifiers.** Match on Email or External ID as the primary criteria, with fuzzy name and phone matching as a fallback.\n- **Create exact-name matching rules for Accounts and Contacts.** This prevents identical Account or Contact names from being created while allowing similar-but-different records through.\n- **Know the limits.** Salesforce allows a maximum of 5 duplicate rules per object. Standard matching rules don't cover every scenario, so you may need custom matching rules for your specific data patterns.\n- **Consider client-defined matching rules for the integration user.** Rather than applying generic matching rules across all users, clients can define their own duplicate and matching rules specifically for the integration profile. This lets each client align rule behavior with their business processes — the **StoreConnect Sync User** can operate under a different rule set from what manual users see.\n- **Review data quality periodically.** Duplicate rules are not a \"set and forget\" solution. Schedule regular reviews. See [Trailhead: Prevent Duplicate Data](https://trailhead.salesforce.com/content/learn/modules/sales_admin_duplicate_management/sales_admin_duplicate_management_unit_2).\n\n## Related issues\n\n- [Manage sync errors](sync-error-tool)\n- [Resolve Flow and trigger blocking sync errors](resolve-flow-trigger-sync-errors)\n- [How to find and resolve sync errors](how-to-find-and-resolve-sync-errors)\n- [Automated lead conversion to avoid duplication](lead-contact-and-account-deduplication)"}