> ## Documentation Index
> Fetch the complete documentation index at: https://docs.blinkops.com/llms.txt
> Use this file to discover all available pages before exploring further.

# List Customers

Get a list of customers.

**Note**: To use this action, either the `First` or `Last` parameter is required.

<Note>
  External Documentation

  To learn more, visit the [Shopify documentation](https://shopify.dev/docs/api/admin-graphql/2025-01/queries/customers).
</Note>

## Basic Parameters

<div className="integrations-table">
  | Parameter | Description                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            |
  | --------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
  | First     | The first `n` elements from the paginated list. To use this action, either the `First` or `Last` parameter is required.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                |
  | Last      | The last `n` elements from the paginated list. To use this action, either the `First` or `Last` parameter is required.<br /><br />**Note**: When using the `Last` parameter, `Before` parameter is required.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                           |
  | Query     | A filter made up of terms, connectives, modifiers, and comparators. You can apply one or more filters to a query.<br /><br />The valid filters are:<br />\* Case-insensitive search of multiple fields in a document, for example: `Bob Norman`, `title:green hoodie`.<br />\* `id`<br />\* `email`<br />\* `phone`<br />\* `updated_at`<br /><br />For example:<br />\* Get all users from Canada: `country:canada`<br />\* Get all users created after 2019-12-01: `updated_at:>2019-12-01`<br />\* Get all users from Canada that created after 2019-12-01: `country:canada AND updated_at:>2019-12-01`<br /><br />**Note**: For more information about the `query` parameter, visit [Shopify API search syntax](https://shopify.dev/docs/api/usage/search-syntax). |
  | Reverse   | When checked, the underlying list order is reversed.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                   |
  | Sort Key  | Sort the underlying list using a key.<br /><br />**Note**: If your query is slow or returns an error, try specifying a sort key that matches the field used in the `Query` parameter.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  |
</div>

## Advanced Parameters

<div className="integrations-table">
  | Parameter | Description                                                                                                                 |
  | --------- | --------------------------------------------------------------------------------------------------------------------------- |
  | After     | Get elements after a specific **cursor**. Cursor values are available in the `pageInfo` object of each paginated response.  |
  | Before    | Get elements before a specific **cursor**. Cursor values are available in the `pageInfo` object of each paginated response. |
</div>

## Example Output

```json theme={"dark"}
{
	"customers": {
		"nodes": [
			{
				"id": "gid://shopify/Customer/56501169",
				"firstName": "Jenny",
				"lastName": "Test",
				"email": "jennytest@b2b.example.com",
				"phone": "+13125551219",
				"createdAt": "2024-11-04T18:56:43Z",
				"updatedAt": "2024-11-04T18:56:43Z",
				"numberOfOrders": "0",
				"state": "DISABLED",
				"amountSpent": {
					"amount": "0.0",
					"currencyCode": "USD"
				},
				"lastOrder": null,
				"note": null,
				"verifiedEmail": true,
				"multipassIdentifier": null,
				"taxExempt": false,
				"tags": [],
				"addresses": [],
				"defaultAddress": null,
				"taxExemptions": [],
				"emailMarketingConsent": {
					"marketingState": "SUBSCRIBED",
					"marketingOptInLevel": "SINGLE_OPT_IN",
					"consentUpdatedAt": "2005-06-16T15:00:11Z"
				},
				"smsMarketingConsent": null
			},
			{
				"id": "gid://shopify/Customer/105906728",
				"firstName": "John",
				"lastName": "Smith",
				"email": "johnsmith@example.com",
				"phone": "+16134504532",
				"createdAt": "2024-11-04T18:56:43Z",
				"updatedAt": "2024-11-04T18:56:43Z",
				"numberOfOrders": "0",
				"state": "DISABLED",
				"amountSpent": {
					"amount": "0.0",
					"currencyCode": "USD"
				},
				"lastOrder": null,
				"note": null,
				"verifiedEmail": true,
				"multipassIdentifier": null,
				"taxExempt": false,
				"tags": [],
				"addresses": [
					{
						"id": "gid://shopify/MailingAddress/105906728?model_name=CustomerAddress",
						"firstName": "John",
						"lastName": "Smith",
						"company": null,
						"address1": "124 Big Green St",
						"address2": "",
						"city": "Ottawa",
						"province": "Ontario",
						"country": "Canada",
						"zip": "K2H7A8",
						"phone": "+1(613)555-1212",
						"name": "John Smith",
						"provinceCode": "ON",
						"countryCodeV2": "CA"
					}
				],
				"defaultAddress": {
					"id": "gid://shopify/MailingAddress/105906728?model_name=CustomerAddress",
					"firstName": "John",
					"lastName": "Smith",
					"company": null,
					"address1": "124 Big Green St",
					"address2": "",
					"city": "Ottawa",
					"province": "Ontario",
					"country": "Canada",
					"zip": "K2H7A8",
					"phone": "+1(613)555-1212",
					"name": "John Smith",
					"provinceCode": "ON",
					"countryCodeV2": "CA"
				},
				"taxExemptions": [
					"CA_STATUS_CARD_EXEMPTION",
					"US_CO_RESELLER_EXEMPTION"
				],
				"emailMarketingConsent": {
					"marketingState": "NOT_SUBSCRIBED",
					"marketingOptInLevel": null,
					"consentUpdatedAt": "2004-06-13T15:57:11Z"
				},
				"smsMarketingConsent": {
					"consentCollectedFrom": "OTHER",
					"consentUpdatedAt": "2021-06-16T17:31:44Z",
					"marketingOptInLevel": "SINGLE_OPT_IN",
					"marketingState": "SUBSCRIBED"
				}
			}
		]
	}
}
```

## Workflow Library Example

[List Customers with Shopify and Send Results Via Email](https://library.blinkops.com/workflows/list-customers-with-shopify-and-send-results-via-email)

<div className="iframe-wrapper">
  <div className="iframe-media">
    <img src="https://mintcdn.com/blinkops-2/ojHYuDeYX5FWuN8a/img/Icons/play-box.svg?fit=max&auto=format&n=ojHYuDeYX5FWuN8a&q=85&s=b8af968e71438a9499c3223c9bd29fb2" alt="Workflow Library" width="16" height="16" data-path="img/Icons/play-box.svg" />

    Preview this Workflow on desktop
  </div>

  <iframe className="iframe" src="https://library.blinkops.com/workflows/list-customers-with-shopify-and-send-results-via-email/canvas" />
</div>
