Magento Customer Lookup
Prior to inserting records into Salesforce Magento MUST make an attempt to locate a record. Customer lookup has several phases:
- Lead Lookup: Attempt to locate a Magento customer in Salesforce Lead collection
- Contact Lookup: Attempt to locate a Magento customer in Salesforce Contact collection
- Account Lookup (B2C PersonAccount): Attempt to locate a Magento customer in Salesforce PersonAccount collection***
- Account Lookup (B2B Account): Attempt to locate a Salesforce Account based on a company name stored in Billing or Shipping Address in Magento
*** Feature is not automatically enabled in every Salesforce organization. A merchant has to request Salesforce Representative to enable that feature for them. Feature cannot be de-activated after it's activated.
General Assumptions
Customer Scope:
Magento allows merchants to configure customer account sharing options to either use "Global" or "Per Website". This configuration is found in Magento Admin panel under: System > Configuration > Customer > Customer Configuration > Account Sharing Options block.
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