CData Python Connector for Shopify

Build 23.0.8839

Customers

Create, update, delete, and query customers.

Table-Specific Information

Select

The connector uses the Shopify API to process WHERE clause conditions built with the following column and operator. The connector processes other filters client-side within the connector.
  • Id supports the '=,IN' comparison.
  • FirstName supports the '=' comparison.
  • LastName supports the '=' comparison.
  • Email supports the '=' comparison.
  • Phone supports the '=' comparison.
  • TotalSpent supports the '=' comparison.
  • OrdersCount supports the '=' comparison.
  • AcceptsMarketing supports the '=' comparison.
  • State supports the '=' comparison.
  • VerifiedEmail supports the '=' comparison.
  • CreatedAt supports the '>=,<=' comparison.
  • UpdatedAt supports the '>=,<=,=' comparison.
For example, the following queries are processed server-side.
SELECT * FROM Customers WHERE Id = '123'

SELECT * FROM Customers WHERE Id IN ('123', '456')

SELECT * FROM Customers WHERE CreatedAt >= '2017-10-25'

SELECT * FROM Customers WHERE CreatedAt <= '2017-10-25'

SELECT * FROM Customers WHERE UpdatedAt <= '2017-10-25'

SELECT * FROM Customers WHERE UpdatedAt >= '2017-10-25'

SELECT * FROM Customers WHERE FirstName = 'abc'

SELECT * FROM Customers WHERE LastName = 'xyz'

SELECT * FROM Customers WHERE Email = '[email protected]'

SELECT * FROM Customers WHERE OrdersCount = 5

SELECT * FROM Customers WHERE Phone = '999999999'

SELECT * FROM Customers WHERE VerifiedEmail = true

SELECT * FROM Customers WHERE UpdatedAt = '2017-10-25'

Insert

The Email field is required to insert.

INSERT INTO Customers (Email, Phone) VALUES ('[email protected]', '+15142546011')

INSERT INTO Customers (Email, Phone, SendEmailInvite) VALUES ('[email protected]', '+15142546011', true)

Update

You must specify the Id of the customer to update a customer.

UPDATE Customers SET Note = 'Customer is a great guy' WHERE Id = '123'

UPDATE Customers SET Tags = 'New Customer, Repeat Customer' WHERE Id = '123'

Delete

You must specify the Id of the customer to delete a customer.

DELETE FROM Customers WHERE Id = '123'

Columns

Name Type ReadOnly References Description
Id [KEY] Long True

A unique numeric identifier for the customer.

LastOrderId Long True

Orders.Id

The id of the customer's last order.

LastOrderName String True

The name of the customer's last order.

FirstName String False

The customer's first name.

LastName String False

The customer's last name.

Email String False

The unique email address of the customer.

Phone String False

The unique phone number for this customer.

TaxExempt Bool False

Indicates whether the customer should be charged taxes when placing orders.

TotalSpent Decimal True

The total amount of money that the customer has spent at the shop.

OrdersCount Int True

The number of orders associated with this customer.

MultipassIdentifier String True

The customer's identifier used with Multipass login.

Note String False

A note about the customer.

EmailMarketingState String False

The current email marketing state for the customer.

EmailMarketingLevel String False

The marketing subscription opt-in level.

EmailMarketingUpdatedAt Datetime False

The date and time when the customer consented to receive marketing material by email.

State String True

The state of the customer's account in a shop.

Tags String False

The tags for this customer. Separate with comma for multiple tags.

VerifiedEmail Bool True

States whether or not the email address has been verified.

CreatedAt Datetime True

The date and time when the customer was created.

UpdatedAt Datetime True

The date and time when the customer information was updated.

Pseudo-Columns

Pseudo column fields are used in the WHERE clause of SELECT statements, to offer a more granular control over the tuples that are returned from the data source, or as parameters in INSERT statements.

Name Type Description
Password String

Password of the customer.

PasswordConfirmation String

Password confirmation of the customer.

SendEmailWelcome Bool

Whether to send a welcome email to the customer or not.

SendEmailInvite Bool

Whether to send an invite email to the customer or not.

Copyright (c) 2024 CData Software, Inc. - All rights reserved.
Build 23.0.8839