Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

Problem

I am getting the following error in Magento when trying to synchronize a cusotmer

Those errors are due to duplicate Contacts in Salesforce. Those Contacts share the same email address and Powersync does not know which one to tie Magento customer to. It’s actually trying to tie a customer to a duplicate and it's complaining about duplicate Magento ID field. To resolve this error, merge those Contacts in Salesforce and re-sync those records.

What does this mean?

This means that Salesforce already has a record which uses the same Magento ID you are trying to syncronize, however the customer information in Salesforce does not match what is in Magento. This issue is caused by the fact that you may currently have two or more separate Magento installations connected to the same Salesforce org OR you may have in the past connected a different Magento instalaltion to this org. There are several solutions how you can resolve this issue.

Solution #1 (Magento will address duplication automatically via PowerSync)

Panel
bgColor#fff
  1. In Magento, navigate to Salesforce > Integration Setup > Customer Configuration page
  2. Open Accounts and Contacts Integration section
  3. Change "Automated merge" to Yes
  4. Re-synchronize all records with the error above
    1. As part of this process all duplicates Magento will identify will be merged automatically. IMPORTANT: Make sure to review Record Lookups section to make sure there are no surprises when duplicates will be merged by our system.

Solution #2 (if you have a small number of records with this issue)

Panel
bgColor#fff
  1. In Salesforce, find the record by ID provided in the error message
  2. Note the email address on the record (Let's call it email-A)
  3. In Magento note the email address of the record which is failed synchronization (Let's call it email-B)
  4. Try to find matching Contact in Salesfroce using email-B
  5. If a match is found:
    1. Remove Magento ID value from the record you found in STEP 1 and save that record in Salesforce
    2. Manually add Magento ID for the record you found in STEP 4 and save that record
    3. Re-try Syncronization from Magento
  6. If a match was NOT found:
    1. Remove Magento ID value from the record you found in STEP 1 and save that record in Salesforce
    2. Re-try Syncronization from Magento

Solution #3 (if you have several Magento installations connected to the same Salesforce org)

Panel
bgColor#fff
  1. You must use a Salesforce Sandbox or Developer version of Salesforce for each lower level Magento installation you have
    1. Example:
      1. Production Salesforce org is connected to your LIVE Magento installation
      2. Sandbox A Salesforce org is connected to your STAGING Magento installation
      3. Development Salesforce org is connected to your DEV Magento installation
      4. and so on ...
  2. After you complete the steps above
    1. You must manually clean the data in Salesforce (this is probably your best bet and the safest route)
    2. If you are just setting up your Salesforce org or very early in the process, you may also want to consider deleting all Lead, Contact, Account, Opportunity, Order and Magento Website records in Salesforce and re-syncronize everything from Magento

Filter by label (Content by label)
showLabelsfalse
max5
spacesPOW
showSpacefalse
sortmodified
reversetrue
typepage
cqllabel in ("faq","duplicate") and type = "page" and space = currentSpace()
labelsmapping faq

Page Properties
hiddentrue


Related issues