Prior to inserting records into Salesforce Magento MUST make an attempt to locate a record. Customer lookup has several phases:
- Attempt to locate a Magento customer in Salesforce Lead collection
- Attempt to locate a Magento customer in Salesforce Contact collection
- Attempt to locate a Magento customer in Salesforce PersonAccount collection***
- Attempt to locate a Salesforce Account based on a company name stored in Billing or Shipping Address in Magento
General Assumptions
Customer Scope:
Magento allows merchants to configure customer account sharing options to either use "Global" or "Per Website".
If set to "Global" - lookup only uses customer email address in attempt to find a matching record in Salesforce.
If set to "Per Website" - in addition to the email address, "Magento Website" is also used in attempt to uniquely identify a record in Salesforce.
Email Address matching:
Email address lookup in salesforce is case insensitive.
Magento emails ARE case-sensitive. Lookup MUST convert Magento email address into lowercase prior to querying Salesforce for any matching records