How to have the import match on Person Account unless a Contact exists under a normal Account

  • 265Views
  • Last Post 27 November 2019
Erika Traskvik posted this 26 November 2019

I am creating a Shopify à Salesforce import package that we would like to schedule on a regular basis.


We are mapping Orders à Donations, and Customers à Accounts (in our setup they become Person Accounts). 

Donations are created after the Accounts and is only uploaded if there is an associated Customer/Account with the same email.

The unique identifier for Orders is an External ID from Salesforce called Shopify Order ID

The unique identifier for Accounts is Shopify Email Copy, which also is an External ID that by the help of a process builder is filled out by copying the email field.

However, we do not always want to match on a Person Accounts. If there is a Contact part of a regular Account with the same email, we would prefer it to not create a Person Account on top of this, as it would create unnecessary clutter. 

So we would like this setup: 

  • New individual donor -> Person account
  • Recurring individual donor -> match to his/her Person account
  • Except if: There is an existing CRM contact under an account in Salesforce. 

How do we solve that last part in a smart way? 

Dmitriy Muzurov posted this 27 November 2019

Hello Erika,

Thank you for submitting a ticket with us.

Salesforce Contact has a foreign key from Account object.

Your exception can be implemented in the form of target lookup through a Contact by an email field. In this case Salesforce primary key instead of externalID must be used and ID field mapped:

The option "Set null when no match found" is intended to create an account if there is no correspondent contact and to use an existing account ID, if there is correspondent contact.

The option "Use first match when multiple results" should be checked as well, since there can be more than one contact with the same email address.

Should you have any questions, do not hesitate to contact us back.