Don't get lost: Connector-User-Guide > 2-Magento-Connector-Reference > 2.3-Customer-Update-Create-Customers

Customer - Update / Create Customers

Allows for the creation and updating of customers in a Magento webstore.

Addresses can be mapped in-line with the Customer Record, and/or as a child transaction of Customers.  If there is a Customer Address which is in-line with the Customer Record, then it will have its Is_Default_Billing and Is_Default_Shipping flags set to true.  Customer Addresses mapped in a child transaction will be added as additional Customer Addresses for the specified Customer, and has flags for setting default billing and shipping.

In-line Customer Address fields will be prefixed with “Address_”

ACCOUNT INFORMATION tab

Fields

Notes

Created_At

Example: “2014-08-13T10:04:44-07:00”

This field is not usually updated.

Customer_Id

Required.

If updating: used as lookup for Customer record.

If inserting: written back to with newly created Id.

Default_Billing

Customer_Address_Id of default billing address.

Default_Shipping

Customer_Address_Id of default shipping address.

DOB

Format: “YYYY-MM-DD”

Email

Required. Used as customer login.

FirstName

Required. Customer first name.

Gender

See notes section below.

Group_Id

Customer Group Id. You must specify the Id of the Customer Group. You can find these values on the Customer Groups page which you can get to from the Customers dropdown from the admin back-end.

LastName

Required. Customer last name.

MiddleName

Customer middle name

Password

Plain text on creation.

MD5 hash on update.

Prefix

Customer prefix (Dr., Ms., Mrs., Ms., etc.)

Store_Id

Store Id Customer is assigned to.

Suffix

Customer suffix (Jr., Sr., etc)

Taxvat

Tax VAT number for customer.

Website_Id

Required.

ADDRESSES tab

Fields

Notes

Customer_Address_Id

Required. Will be used as lookup if set, or written back to if CustomerAddress is created. This will be the unqiue identifier for the Customer Address record.

City

Required.

Company

Optional.

Country_Id

Required. “US” for United States, “CA” for Canada.

Full list can be found by checking dropdown “<option>” values as described below in Notes section for Gender.

Fax

Optional.

FirstName

Required.

Is_Default_Billing

Default billing address flag.

Is_Default_Shipping

Default shipping address flag.

LastName

Required.

MiddleName

Optional.

PostCode

Required.

Prefix

Optional.

Region_Id

See notes section below.

Region

State/Providence.

StreetLine1

Required.

StreetLine2

Optional.

Suffix

Optional.

Telephone

Required.

Notes

By default, a newly created customer (through the API) will receive a website value of “Admin”.

Gender

In older versions of Magento, “1” is used for Male and “2” for Female.

In more recent versions, “123” is used for Male and “124” for Female.

You can confirm which values your system uses by checking the dropdown values of the gender dropdown for an existing customer.  Go to the Customer screen in the admin backend, and pick a customer.  Right-click the gender dropdown and click “Inspect Element.” Use the values from from the “<option>” for the particular sex you are looking for

Region Id

The value for Region_Id will be an integer.  You can find the integer which matches the region you are looking for by checking the “State/Providence” dropdown, and looking for the “<option>” values.

The dropdown values will change depending on the current Country selected.

When the Country dropdown is set to “United States”, the “State/Providence” dropdown will be populated with all 50 states, as well as Armed Forces locations.:

When the Country dropdown is set to “Canada”, the “State/Providence” dropdown will be populated with Canadian Providences: