TDV Adapter for WooCommerce

Build 22.0.8462

Customers

Retrieve and modify customers.

Table Specific Information

Select

WooCommerce allows only a small subset of columns to be used in the WHERE clause of a SELECT query. These columns support only the = comparison, unless stated otherwise. The available columns for this table are: Id, Email, Role. All other columns are processed client side.

SELECT * FROM Customers WHERE Id = 4
SELECT * FROM Customers WHERE Email = 'email@domain.com'
SELECT * FROM Customers WHERE Username = 'user' AND IsPayingCustomer = true

Update

To introduce new metadata fields which are not present in the schema, the 'metadata' pseudocolumn can be used. The update below will create two new metadata fields with keys 'key1' and 'key2' and set their respective values. If any of the keys specified already exists, its value will be updated.

UPDATE Customers SET metadata = 'key1:val1, key2:val2' WHERE ID = 58

Insert

The following attribute is required when performing an insert: Email.

INSERT INTO Customers (Email) VALUES ('email@domain.com')

Columns

Name Type ReadOnly Description
Id [KEY] Long True

Unique identifier for the resource.

DateCreated Datetime True

The date the customer was created, in the site's timezone.

DateModified Datetime True

The date the customer was last modified, in the site's timezone.

Email String False

The email address for the customer.

FirstName String False

Customer first name.

LastName String False

Customer last name.

Role String True

Customer role.

Username String False

Customer login name.

Password String False

Customer password. write-only

IsPayingCustomer Bool True

Is the customer a paying customer? read-only

AvatarUrl String True

Avatar URL.

MetaData String False

Meta data. See Customer - Meta data properties

BillingFirstName String False

First name.

BillingLastName String False

Last name.

BillingCompany String False

Company name.

BillingAddress1 String False

Address line 1

BillingAddress2 String False

Address line 2

BillingCity String False

City name.

BillingState String False

ISO code or name of the state, province or district.

BillingPostcode String False

Postal code.

BillingCountry String False

ISO code of the country.

BillingEmail String False

Email address.

BillingPhone String False

Phone number.

ShippingFirstName String False

First name.

ShippingLastName String False

Last name.

ShippingCompany String False

Company name.

ShippingAddress1 String False

Address line 1

ShippingAddress2 String False

Address line 2

ShippingCity String False

City name.

ShippingState String False

ISO code or name of the state, province or district.

ShippingPostcode String False

Postal code.

ShippingCountry String False

ISO code of the country.

Copyright (c) 2023 CData Software, Inc. - All rights reserved.
Build 22.0.8462