How do you manage customer accounts with a CSV tool?
Export and import customer accounts in AI Commerce securely using CSV: column order, update vs. insert, and ISO codes.
First, check what the CSV tool supports.
AI Commerce 's CSV tool supports exporting customer accounts and importing customer address lines. There is no CSV import of customer account master data in the Control Panel, so a modified customer export file cannot be used to add or update customer accounts.
Choose the right profile for the job:
- Exporting customers produces a CSV file of basic customer information.
- Exporting addresses provides a snapshot of your address book and a restore point.
- Importing addresses adds or updates rows in a customer's address book.
Export customer account information
AI Commerce customer account data is exported using the Customer Export profile. The export produces one row per customer and includes columns such as customer_key , customers_firstname , customers_lastname , customers_email_address , customers_telephone , customers_group , customers_approved , default_delivery_address_key , default_billing_address_key , and number_of_orders .
Keep the file unchanged for reporting, review, or a restore point. number_of_orders is a calculated export data. Since there is no equivalent customer account import processor in the Control Panel, no column in the export file should be described as an updatable customer field in the CSV import.
Created customer CSV exports also appear in the Customer CSV History view, from where the file can be downloaded again.
Export addresses before mass change
Export AI Commerce addresses before bulk conversion with the Address Export profile. Address export and customer export are different files: the address line contains the customer reference, the address's unique identifier, the contact name, an optional company, street address, postal code, city, country, and address type labels.
Copy the restore point you want to keep as an export and make your own working copy for the import. Do not add account fields from the customer export to the address import, as the processor will reject unknown columns.
Create an address import file
AI Commerce 's Address Import accepts a comma-separated CSV file with a header row. The customers_id column is required; the old name customer_key is also accepted as its alias. The address identifier is address_book_id , and the old address_key is accepted as its alias.
Supported address fields include:
entry_gender
entry_company
entry_firstname
entry_lastname
entry_street_address
entry_vatid
entry_postcode
entry_city
entry_state
entry_comments
entry_country_codeFor example:
customers_id,address_book_id,entry_firstname,entry_lastname,entry_street_address,entry_postcode,entry_city,entry_country_code
42,105,Maija,Meikäläinen,Esimerkkikatu 1,00100,Helsinki,FI
42,,Matti,Meikäläinen,Varastotie 5,01510,Vantaa,FISave the file in UTF-8 encoded CSV format. Each data row must have the same column structure as the header row, and the file must not have the same header twice.
Select update or add new address
AI Commerce 's address line update is determined by address_book_id value. When the identifier belongs to a customer named on the same line, the address corresponding to the identifier is updated. When the identifier is empty or not found, a new address line is added for the customer.
The included supported column participates in the write, so a blank cell value can clear that address field. If you do not want to change the field, leave the entire column out of the work file. entry_country_code is given as a well-known two-letter ISO country code, such as FI ; changing the country resets the address's region reference.
Preview and fix errors before confirmation
AI Commerce 's address import previews each row before execution. Unknown customer, invalid customer ID, address ID belonging to another customer, and unknown country code are flagged as errors. Unknown or overlapping headers also prevent a valid preview.
Please correct any errors before confirming the execution. The import will not apply part of the file if there are blocking errors in the preview. After confirmation, check the changed addresses in the customer's Address Book section and, if necessary, perform another Address Export to compare the result with the restore point.
Don't confuse your customer account and address book
Don't confuse AI Commerce 's customer account with the address book, as they are different data sets. A customer account contains information such as name, email address, phone number, customer group, and approval status. An address book row contains fields for the shipping or billing address, such as entry_firstname , entry_street_address , entry_postcode , and entry_country_code .
Use customer export to review account information and address export and import to make bulk changes to address lines. If you need to add or update customer accounts using a CSV file, you will first need a separate customer account import feature and its field agreement in the Control Panel.