Lead, Contact and Account Deduplication

During checkout StoreConnect attempts to not create duplicate Account and Contact records within the connected Salesforce environment. It does this while also maintaining the privacy of the end user.

Lead Conversion

StoreConnect will attempt to match the customer doing the checkout with any existing lead in your system, and if that lead matches, StoreConnect will attempt to convert that lead to a Account & Contact and create the Order as usual.

We attempt to match the lead on Email, Name and optionally Phone.

The way we convert a lead to an Account and Contact is by the StoreConnect system assiging an account ID to Lead.s_c__Convert_Trggr_Acct_Id__c which is then picked up by our StoreConnect APEX code to convert the lead to an Account and Contact.

If your Salesforce environment has complex rules around Lead conversion that StoreConnect can not deal with, or has required fields that StoreConnect can not set, and so is blocking the Contacts and Accounts being created, then we will disable automatic lead conversion and this will be up to the client to do manually.

New Account & Contact Creation

If the customer checking out does not have an existing Salesforce Account and Contact record, a new one will be created for them and associated to the Order.

Existing Contact with Customer Not Logged In

If the customer checking out is not logged in to StoreConnect, and uses an email address which matches an existing Contact’s email address within Salesforce. The Order will be created and associated with the existing contact.

If no matching email address is present, we query the contacts database for a possible duplicate using these Standard Salesforce matching rules.

If there’s no existing contact but there are possible duplicates, then the duplicate contact will be used, the order will be linked to the duplicate contact, but the order email will be sent to the email entered by the customer and any changes to shipping or billing address will be only saved to the order.

If there’s no existing contact and no duplicates, then a new contact will be created.

In order for the existing contact record to be changed, the customer must log in.

Existing Contact with Customer Logged In

If the customer is logged in, then all orders are directly associated with the existing contact account and the customer has the option to alter shipping or billing details during checkout, however, these are only applied to the current order.

In order for the existing contact record to be changed, the customer must use the edit function on their account from within StoreConnect.

Existing Account with Customer Not Logged in

StoreConnect uses the existing account associated with the contact during checkout. If there is no account connected to the contact, StoreConnect will attempt to find the correct account via email, and if there is an existing one, it uses it.

If there is no account, then StoreConnect will query for existing accounts based on Person Account Matching Rule which, even if your Salesforce Org does not use Person Accounts, makes more sense for StoreConnect as new checkouts always create an Account and Contact and are treated as individuals. If an account is found, then this is used for the order.

If there is no account found, then we query again for duplicate accounts using the Standard Account Matching Rule. if there

If there’s no existing account, but there is a possible duplicate that can’t be resolved, a new account is created with a normalized name with the email appended, for example “Jo Customer (jo.customer@example.com)”. Please note that we can’t reuse the duplicate, it’s possible that the account belongs to a different person and Salesforce’s Account Matching Rules are quite broad.

If there’s no existing account and there’s no possible duplicate, then a new account is created.

Person Accounts

If your Salesforce system has Person Accounts enabled, StoreConnect will create an Account and Contact record directly, and this will simply be recognised as a Person Account within your Salesforce Org.

Duplicate Prevention

StoreConnect attempts as best it can to deduplicate records, however, it is impossible for us to always get it right as Salesforce has internal logic that is not documented on how it determines if something is a duplicate. Due to this, sometimes there will be duplicates created.


Back to Documentation