Change Customer->Contact relation

Challenge

Do you have a situation where you need to change which Salesforce Contact the customer in Magento is linked with? In addition, you want all new orders in Magento to be associated with the new Contact instead of the old one.

Solution

  1. In Salesforce

    1. Create a new Contact and Account in the Salesforce (or identify an existing Account+Contact you want to use). (Lets call this Contact A).

    2. Manually assign existing Salesforce Orders and Opportunities to this Account+Contact. This will re-link all past order and opportunity records to the new Account+Contact. (this step is optional)

    3. Navigate to the old Salesforce Contact (lets call this Contact B)

      1. Get the value in MagentoId field from Contact B and move it to Contact A

        1. You may need make this field visible in the Contact layout (if you cannot find it).

      2. Make sure the MagentoId field on the Contact B is blank, and Contact A has the MagentoId field filled out.

  2. In Magento Admin

    1. Complete these steps if you do not see Salesforce ID Mappings menu item under Salesforce (main navigation)

      1. Navigate to Salesforce (main navigation) > General settings in Magento Admin

      2. Enable the Developer Mode under the Advanced settings (section)

      3. Refresh Magento cache

      4. A new Salesforce ID Mappings item should appear in the Salesforce menu after that

    2. Navigate to

      1. Salesforce (main navigation) > Salesforce ID Mappings

        1. Use filtration on that page to find where

          1. Magento Type = Customer

          2. Magento Id equals the MagentoId from Contact A

      2. Delete two records that correspond with Account and Contact only (see the example blow)

 

Screencast (step by step)