Skip to content
Select theme
Light
Dark
Auto
Select language
English
فارسی

Customers

Object

A page of addresses.

[AddressEdge!]!

No description.

[Address!]!

No description.

PageInfo!

No description.

Object

One address, with its cursor.

String!

No description.

Address!

No description.

Object

Consent for one channel.

MarketingChannel!

No description.

Boolean!

No description.

DateTime

When they last changed it, and where.

Consent is a claim the merchant may have to evidence, and a boolean with no date evidences nothing.

String

No description.

Object

A business that buys, rather than a person.

ID!

No description.

Version!

No description.

String!

No description.

String

شناسه ملی — the company’s national identifier.

String

کد اقتصادی, for the official invoices a company almost always wants.

CustomerConnection!

The people who may order on this account.

ArgumentTypeMeaning
firstIntNo description.
afterStringNo description.

Address

Where orders go by default.

PriceList

The prices this company gets.

Int

How long they have to pay — نسیه.

Null means payment up front. A number means orders may be placed unpaid and chased later, which is how wholesale actually works here and which is why Order.cost.outstandingAmount matters as much as it does.

Money!

What they owe across every unpaid order bought on the company’s account — the orders that name it as their company, cancelled and test orders left out, each counted for what it still owes. Read from the orders, never stored, so it is right the moment a payment lands. Zero for a company that never bought.

[String!]!

No description.

String

No description.

DateTime!

No description.

Metafield

No description.

ArgumentTypeMeaning
namespaceStringNo description.
keyString!No description.

[Metafield]!

No description.

ArgumentTypeMeaning
identifiers[MetafieldIdentifier!]!No description.
Object

A page of companies.

[CompanyEdge!]!

No description.

[Company!]!

No description.

PageInfo!

No description.

Int

How many match across every page — when this page is the whole result. Null otherwise: the service behind this list does not count, and a number made up here would be a wrong one that looks right.

Object

One company, with its cursor.

String!

No description.

Company!

No description.

Input

A company to record.

String!

No description.

String

No description.

String

No description.

ID

No description.

ID

No description.

Int

No description.

[String!]

No description.

String

No description.

Object

What the company mutations return.

Company

No description.

[UserError!]!

No description.

Object

Somebody who has bought, or who a merchant has recorded.

ID!

No description.

Version!

No description.

String!

The mobile number that identifies the account — 09xxxxxxxxx. Unique per shop.

String

No description.

String

No description.

String!

The full name, else the phone number. Composed so every screen greets alike.

String

No description.

Boolean!

False means the address may be somebody else’s, mistyped.

Boolean!

Whether the buyer has ever signed in.

False for somebody who only ever checked out as a guest — the majority. They are still a customer, they simply have no account, and a merchant emailing them about “your account” will confuse them.

AddressConnection!

No description.

ArgumentTypeMeaning
firstIntNo description.
afterStringNo description.

Address

No description.

OrderConnection!

No description.

ArgumentTypeMeaning
firstIntNo description.
afterStringNo description.
filtersOrderFilterNo description.

CustomerStatistics!

What they have bought and spent, across every order.

MarketingConsent!

What they have agreed to be contacted on.

[CustomerSegment!]!

Which segments they currently fall into.

PriceList

The price list that applies to them, when one does.

StoreCreditAccount

Their credit balance on this shop, when the shop issues any.

Company

The company they buy for, when they buy for one.

[String!]!

Merchant-applied tags. The main way a shop marks somebody — «عمده»، «بدقول»، «VIP».

String

The merchant’s own note. Never shown to the buyer.

What staff actually write about a customer, and the reason a customer-facing API must never expose it.

[DataRequest!]!

Outstanding export and erasure requests the buyer has raised.

Boolean!

Whether this record has been redacted by an erasure request.

A redacted customer keeps their orders — those are tax records — with the personal data removed. The row survives so the order still balances.

DateTime!

No description.

DateTime!

No description.

Metafield

No description.

ArgumentTypeMeaning
namespaceStringNo description.
keyString!No description.

[Metafield]!

No description.

ArgumentTypeMeaning
identifiers[MetafieldIdentifier!]!No description.
Object

A page of customers.

[CustomerEdge!]!

No description.

[Customer!]!

No description.

PageInfo!

No description.

Int

How many match across every page. Counted for customers and a company’s buyers, over the whole filter up to 10000, and a client showing it says “10000 or more”; null for a segment’s members, which the segment service does not count — CustomerSegment.memberCount is its own figure — unless this page is the whole result.

Input

A customer the merchant is recording by hand.

String!

No description.

String

No description.

String

No description.

String

No description.

AddressInput

No description.

[String!]

No description.

String

No description.

ID

No description.

[MetafieldInput!]

No description.

Object

One customer, with its cursor.

String!

No description.

Customer!

No description.

Input

A filter on the customer list.

ID

No description.

String

No description.

ID

No description.

Boolean

No description.

Boolean

No description.

String

No description.

Int

Customers who have refused a delivery at least this many times.

Int

No description.

Decimal

No description.

DateTime

No description.

DateTime

No description.

Boolean

Redacted records. Excluded unless asked for.

Object

What customerMerge returns.

Customer

The record that survived, with everything moved onto it.

Int!

How many orders moved to the surviving record. Addresses, credit entries and tags move too, and are not counted here.

[UserError!]!

No description.

Object

What the customer mutations return.

Customer

No description.

[UserError!]!

No description.

Object

A rule-defined group of customers.

ID!

No description.

Version!

No description.

String!

No description.

String

No description.

[SegmentRule!]!

No description.

SegmentRulesMatch!

No description.

Int!

How many customers match now.

Computed on read and capped at a bound the platform will not count past — a merchant sizing an SMS campaign needs the number, not the list.

CustomerConnection!

Who matches now, a page at a time, in a stable order.

Paged as of the moment the first page was read, so later pages answer the same question even while customers change. Up to 250 a page.

ArgumentTypeMeaning
firstIntNo description.
afterStringNo description.

Boolean!

Whether this segment is one the platform ships.

Built-in segments — first-time buyers, lapsed, high-value, delivery-refusers — cannot be edited. A merchant who wants a different “lapsed” makes their own, rather than changing what the word means for every report.

DateTime!

No description.

DateTime!

No description.

Input

A segment to save.

String!

No description.

String

No description.

[SegmentRuleInput!]!

No description.

SegmentRulesMatch

No description.

Object

What the segment mutations return.

CustomerSegment

No description.

[UserError!]!

No description.

Enum

How a customer list is ordered.

ValueMeaning
CREATED_ATNo description.
UPDATED_ATNo description.
NAMENo description.
TOTAL_SPENTNo description.
ORDER_COUNTNo description.
LAST_ORDER_ATNo description.
Object

What a customer is worth, and what to expect from them.

Int!

No description.

Money!

Paid, less refunds. Not the sum of order totals.

Money!

No description.

DateTime

No description.

DateTime

No description.

Int!

How many cash-on-delivery parcels they have refused.

The number a merchant checks before accepting a large COD order, and what feeds PRIOR_DELIVERY_REFUSAL on the risk assessment. Refusing costs the merchant the outbound freight, so it is counted rather than merely noticed.

Int!

How many orders they have returned goods from.

Money

Gross margin earned from them, where cost of goods is known.

Separately scoped: a merchant deciding whether somebody is worth chasing is asking a different question from one merely reading their address book.

Input

Changes to a customer. Partial; tags replaces wholesale when present.

String

No description.

String

No description.

String

No description.

[String!]

No description.

String

No description.

ID

No description.

ID

No description.

[MetafieldInput!]

No description.

Object

A buyer’s request to receive or erase their data, as the merchant sees it.

ID!

No description.

Customer

No description.

DataRequestKind!

No description.

DataRequestStatus!

No description.

DateTime!

No description.

DateTime

When a deletion becomes irreversible. Cancellable until then.

DateTime

No description.

Enum

Which kind of data request.

ValueMeaning
EXPORTNo description.
ERASUREErasure. Redacts personal data; does not delete orders, which are tax records the merchant is required to keep.
Enum

Where a data request has got to.

ValueMeaning
PENDINGNo description.
PROCESSINGNo description.
READYNo description.
COMPLETEDNo description.
CANCELLEDNo description.
REJECTEDNo description.
Enum

A channel a shop can market on.

ValueMeaning
SMSSMS — the channel that reaches everybody here.
EMAILNo description.
PUSHNo description.
Object

What a customer has agreed to be contacted on.

[ChannelConsent!]!

No description.

Boolean!

One switch that silences everything, whatever the per-channel settings say.

Input

Which customers to change consent for, and how.

[MarketingChannel!]

No description.

[MarketingChannel!]

No description.

Boolean

No description.

String

Where the consent came from, for the merchant’s own evidence.

Required on an opt-in: recording that somebody agreed without recording where is a claim nobody can defend.

Object

One condition on segment membership.

SegmentRuleField!

No description.

SegmentRuleOperator!

No description.

String!

No description.

Enum

What a segment rule tests.

ValueMeaning
ORDER_COUNTNo description.
TOTAL_SPENTNo description.
AVERAGE_ORDER_VALUENo description.
LAST_ORDER_ATNo description.
FIRST_ORDER_ATNo description.
CREATED_ATNo description.
TAGNo description.
PROVINCEWhich province their default address is in. What a regional campaign needs.
CITYNo description.
ACCEPTS_MARKETINGWhether they accept marketing: opted in on any channel, and not unsubscribed from everything. A campaign needs no such rule — it reaches only customers who agreed on its own channel, whatever its segment says.
PURCHASED_PRODUCTBought a specific product.
PURCHASED_COLLECTIONBought from a specific collection.
DELIVERY_REFUSAL_COUNTNo description.
RETURN_COUNTNo description.
HAS_ACCOUNTNo description.
LAST_PAYMENT_METHODWhich payment method they last used. Separates COD buyers from card buyers.
Input

One condition, as supplied.

SegmentRuleField!

No description.

SegmentRuleOperator!

No description.

String!

No description.

Enum

How a segment rule compares.

ValueMeaning
EQUALSNo description.
NOT_EQUALSNo description.
GREATER_THANNo description.
LESS_THANNo description.
CONTAINSNo description.
WITHIN_DAYSWithin the last N days. value is the number of days.
NOT_WITHIN_DAYSNot within the last N days — how “lapsed” is expressed.
IS_SETNo description.
IS_NOT_SETNo description.
Enum

Whether a customer must match every rule or any of them.

ValueMeaning
ALLNo description.
ANYNo description.