Customers
Customers is an auto generated table. The supported operations are Update, Delete, and Querying data from this table.
Table Specific Information
Select
The Customers table supports server-side processing for all columns in the WHERE clause. Most of these columns support server-side processing for the >, >=, <, <=, =, IN, NOT IN and LIKE operators.
The following examples show the types of queries processed server side.
- Retrieve all customers from your AdobeCommerce server.
SELECT * FROM Customers
- Retrieve a single customer:
SELECT * FROM Customers WHERE Id = '1'
- Filter by status:
SELECT * FROM Customers WHERE GroupId = 1
- Filter by created date:
SELECT * FROM Customers WHERE CreatedAt > '2017-08-01'
- Example query with multiple filters:
SELECT * FROM Customers WHERE DefaultBilling IN (1, 2) AND Firstname LIKE '%i%' AND WebsiteId = 1 LIMIT 50
Insert
To add a Customer, the FirstName, LastName, and Email fields are required.
INSERT INTO Customers (FirstName, LastName, Email, WebsiteId, GroupId) VALUES ('John', 'Doe', '[email protected]', 1, 1)
Update
AdobeCommerce allows updates for the FirstName, LastName, MiddleName, Suffix, Email, GroupId, Prefix, DisableAutoGroupChange, and Taxvat columns. WebsiteId is a required value.
UPDATE Customers SET FirstName = 'Jane', Email = '[email protected]', GroupId = 2, DisableAutoGroupChange = '0', Prefix = 'x', Middlename = 'J', LastName = 'Doe', Suffix = 'y', Taxvat = 1, WebsiteId = 1 WHERE Id = 4
Delete
Customers can be deleted by providing the Id of the Customer and issuing a DELETE statement.
DELETE FROM Customers WHERE Id = 4
Columns
Name | Type | ReadOnly | Description |
Id [KEY] | Int | False |
Customer id |
Addresses | String | False |
Customer addresses. |
Confirmation | String | False |
Confirmation |
CreatedAt | Datetime | False |
Created at time |
CreatedIn | String | False |
Created in area |
DefaultBilling | String | False |
Default billing address id |
DefaultShipping | String | False |
Default shipping address id |
DisableAutoGroupChange | Int | False |
Disable auto group change flag. |
Dob | String | False |
Date of birth |
String | False |
Email address | |
ExtensionAttributes | String | False |
This is an auto-generated column |
Firstname | String | False |
First name |
Gender | Int | False |
Gender |
GroupId | Int | False |
Group id |
Lastname | String | False |
Last name |
Middlename | String | False |
Middle name |
Prefix | String | False |
Prefix |
StoreId | Int | False |
Store id |
Suffix | String | False |
Suffix |
Taxvat | String | False |
Tax Vat |
UpdatedAt | Datetime | False |
Updated at time |
WebsiteId | Int | False |
Website id |
SearchCriteria | String | False |
This is an auto-generated column |
TotalCount | Int | False |
Total count. |