Zen Cart to Salesforce Customer Import
Do you want to build a CSV export for your Zen Cart customer data so you can import it into Salesforce?
Come work with me and I'll help you!
I created a Zen Cart tool which exports customer data from the Zen Cart database into a CSV for import into Salesforce. It's called Salesforce Export Customers, and it's available from the your Zen Cart Admin Tools menu.
The CSV is pulled into Salesforce using the Data Import Wizard, which creates Contact and Account objects.
Here is the mapping I used. The address record selected had its address_book_id field value match the customers_default_address_id field from the customers table. (Table aliases: c = customers; ab = address_book.)
|Legacy ID (custom field)||c.customers_id|
|Company (custom field)||ab.entry_company|
|Shipping Zip/Postal Code||ab.entry_postcode|
|Billing Zip/Postal Code||ab.entry_postcode|
|Mailing Zip/Postal Code||ab.entry_postcode|
Before import (just email and name)
After import (fully populated)
Here's what my Zen Cart customer data looks like in Salesforce Lightning:
Salesforce My Contacts list showing Zen Cart Customer Data
Salesforce Contact Page showing Zen Cart Customer Data
Notice that the fields have been re-arranged so that the critical data is together on the left, with the Legacy ID (Zen Cart Customer ID) displayed. I have also created a link to the customer account in the store's backend, which shows at the bottom with anchor text "Store Customer Account".
Export is incremental, so once you have done an initial export, only new or changed records are exported. No CSV is produced if there are no new or changed records.
Incremental Export of Zen Cart Customer Data
Criteria for inclusion in a subsequent export are as follows:
- New customer accounts created after the last export was done.
- Customer changed account data in My Account->Change Account Information.
- Customer changed their primary address in My Account->Change Entries in my Address Book.
- Admin changed a customer record using Admin->Customers->Customers.
I am using the Essentials version of Salesforce, so I can't do things like create Quotes. But for fun, I wanted to take the next step of importing products and prices from my cart to Salesforce. You can follow my journey by reading about importing Zen Cart Products to Salesforce.
If you're a developer, you can access the source for these scripts: just go to Zen Cart to Salesforce on Github. And if you're not, come work with me and I'll do it for you!