Customers
AddressConnection
Section titled “AddressConnection”A page of addresses.
[AddressEdge!]!
No description.
[Address!]!
No description.
pageInfo
Section titled “pageInfo”PageInfo!
No description.
AddressEdge
Section titled “AddressEdge”One address, with its cursor.
cursor
Section titled “cursor”String!
No description.
Address!
No description.
ChannelConsent
Section titled “ChannelConsent”Consent for one channel.
channel
Section titled “channel”MarketingChannel!
No description.
optedIn
Section titled “optedIn”Boolean!
No description.
updatedAt
Section titled “updatedAt”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.
source
Section titled “source”String
No description.
Company
Section titled “Company”A business that buys, rather than a person.
ID!
No description.
version
Section titled “version”Version!
No description.
String!
No description.
nationalId
Section titled “nationalId”String
شناسه ملی — the company’s national identifier.
economicCode
Section titled “economicCode”String
کد اقتصادی, for the official invoices a company almost always wants.
buyers
Section titled “buyers”CustomerConnection!
The people who may order on this account.
| Argument | Type | Meaning |
|---|---|---|
first | Int | No description. |
after | String | No description. |
defaultAddress
Section titled “defaultAddress”Address
Where orders go by default.
priceList
Section titled “priceList”PriceList
The prices this company gets.
paymentTermsDays
Section titled “paymentTermsDays”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.
outstandingBalance
Section titled “outstandingBalance”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.
staffNote
Section titled “staffNote”String
No description.
createdAt
Section titled “createdAt”DateTime!
No description.
metafield
Section titled “metafield”Metafield
No description.
| Argument | Type | Meaning |
|---|---|---|
namespace | String | No description. |
key | String! | No description. |
metafields
Section titled “metafields”[Metafield]!
No description.
| Argument | Type | Meaning |
|---|---|---|
identifiers | [MetafieldIdentifier!]! | No description. |
CompanyConnection
Section titled “CompanyConnection”A page of companies.
[CompanyEdge!]!
No description.
[Company!]!
No description.
pageInfo
Section titled “pageInfo”PageInfo!
No description.
totalCount
Section titled “totalCount”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.
CompanyEdge
Section titled “CompanyEdge”One company, with its cursor.
cursor
Section titled “cursor”String!
No description.
Company!
No description.
CompanyInput
Section titled “CompanyInput”A company to record.
String!
No description.
nationalId
Section titled “nationalId”String
No description.
economicCode
Section titled “economicCode”String
No description.
defaultAddressId
Section titled “defaultAddressId”ID
No description.
priceListId
Section titled “priceListId”ID
No description.
paymentTermsDays
Section titled “paymentTermsDays”Int
No description.
[String!]
No description.
staffNote
Section titled “staffNote”String
No description.
CompanyPayload
Section titled “CompanyPayload”What the company mutations return.
company
Section titled “company”Company
No description.
userErrors
Section titled “userErrors”[UserError!]!
No description.
Customer
Section titled “Customer”Somebody who has bought, or who a merchant has recorded.
ID!
No description.
version
Section titled “version”Version!
No description.
String!
The mobile number that identifies the account — 09xxxxxxxxx. Unique per shop.
firstName
Section titled “firstName”String
No description.
lastName
Section titled “lastName”String
No description.
displayName
Section titled “displayName”String!
The full name, else the phone number. Composed so every screen greets alike.
String
No description.
emailVerified
Section titled “emailVerified”Boolean!
False means the address may be somebody else’s, mistyped.
hasAccount
Section titled “hasAccount”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.
addresses
Section titled “addresses”AddressConnection!
No description.
| Argument | Type | Meaning |
|---|---|---|
first | Int | No description. |
after | String | No description. |
defaultAddress
Section titled “defaultAddress”Address
No description.
orders
Section titled “orders”OrderConnection!
No description.
| Argument | Type | Meaning |
|---|---|---|
first | Int | No description. |
after | String | No description. |
filters | OrderFilter | No description. |
statistics
Section titled “statistics”CustomerStatistics!
What they have bought and spent, across every order.
marketingConsent
Section titled “marketingConsent”MarketingConsent!
What they have agreed to be contacted on.
segments
Section titled “segments”[CustomerSegment!]!
Which segments they currently fall into.
priceList
Section titled “priceList”PriceList
The price list that applies to them, when one does.
storeCredit
Section titled “storeCredit”StoreCreditAccount
Their credit balance on this shop, when the shop issues any.
company
Section titled “company”Company
The company they buy for, when they buy for one.
[String!]!
Merchant-applied tags. The main way a shop marks somebody — «عمده»، «بدقول»، «VIP».
staffNote
Section titled “staffNote”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.
dataRequests
Section titled “dataRequests”[DataRequest!]!
Outstanding export and erasure requests the buyer has raised.
redacted
Section titled “redacted”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.
createdAt
Section titled “createdAt”DateTime!
No description.
updatedAt
Section titled “updatedAt”DateTime!
No description.
metafield
Section titled “metafield”Metafield
No description.
| Argument | Type | Meaning |
|---|---|---|
namespace | String | No description. |
key | String! | No description. |
metafields
Section titled “metafields”[Metafield]!
No description.
| Argument | Type | Meaning |
|---|---|---|
identifiers | [MetafieldIdentifier!]! | No description. |
CustomerConnection
Section titled “CustomerConnection”A page of customers.
[CustomerEdge!]!
No description.
[Customer!]!
No description.
pageInfo
Section titled “pageInfo”PageInfo!
No description.
totalCount
Section titled “totalCount”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.
CustomerCreateInput
Section titled “CustomerCreateInput”A customer the merchant is recording by hand.
String!
No description.
firstName
Section titled “firstName”String
No description.
lastName
Section titled “lastName”String
No description.
String
No description.
address
Section titled “address”AddressInput
No description.
[String!]
No description.
staffNote
Section titled “staffNote”String
No description.
companyId
Section titled “companyId”ID
No description.
metafields
Section titled “metafields”[MetafieldInput!]
No description.
CustomerEdge
Section titled “CustomerEdge”One customer, with its cursor.
cursor
Section titled “cursor”String!
No description.
Customer!
No description.
CustomerFilter
Section titled “CustomerFilter”A filter on the customer list.
segmentId
Section titled “segmentId”ID
No description.
String
No description.
companyId
Section titled “companyId”ID
No description.
hasAccount
Section titled “hasAccount”Boolean
No description.
acceptsMarketing
Section titled “acceptsMarketing”Boolean
No description.
provinceCode
Section titled “provinceCode”String
No description.
minDeliveryRefusals
Section titled “minDeliveryRefusals”Int
Customers who have refused a delivery at least this many times.
minOrderCount
Section titled “minOrderCount”Int
No description.
minTotalSpent
Section titled “minTotalSpent”Decimal
No description.
createdAfter
Section titled “createdAfter”DateTime
No description.
lastOrderBefore
Section titled “lastOrderBefore”DateTime
No description.
includeRedacted
Section titled “includeRedacted”Boolean
Redacted records. Excluded unless asked for.
CustomerMergePayload
Section titled “CustomerMergePayload”What customerMerge returns.
customer
Section titled “customer”Customer
The record that survived, with everything moved onto it.
movedOrderCount
Section titled “movedOrderCount”Int!
How many orders moved to the surviving record. Addresses, credit entries and tags move too, and are not counted here.
userErrors
Section titled “userErrors”[UserError!]!
No description.
CustomerPayload
Section titled “CustomerPayload”What the customer mutations return.
customer
Section titled “customer”Customer
No description.
userErrors
Section titled “userErrors”[UserError!]!
No description.
CustomerSegment
Section titled “CustomerSegment”A rule-defined group of customers.
ID!
No description.
version
Section titled “version”Version!
No description.
String!
No description.
description
Section titled “description”String
No description.
[SegmentRule!]!
No description.
rulesMatch
Section titled “rulesMatch”SegmentRulesMatch!
No description.
memberCount
Section titled “memberCount”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.
members
Section titled “members”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.
| Argument | Type | Meaning |
|---|---|---|
first | Int | No description. |
after | String | No description. |
isBuiltIn
Section titled “isBuiltIn”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.
createdAt
Section titled “createdAt”DateTime!
No description.
updatedAt
Section titled “updatedAt”DateTime!
No description.
CustomerSegmentInput
Section titled “CustomerSegmentInput”A segment to save.
String!
No description.
description
Section titled “description”String
No description.
[SegmentRuleInput!]!
No description.
rulesMatch
Section titled “rulesMatch”SegmentRulesMatch
No description.
CustomerSegmentPayload
Section titled “CustomerSegmentPayload”What the segment mutations return.
segment
Section titled “segment”CustomerSegment
No description.
userErrors
Section titled “userErrors”[UserError!]!
No description.
CustomerSortKeys
Section titled “CustomerSortKeys”How a customer list is ordered.
| Value | Meaning |
|---|---|
CREATED_AT | No description. |
UPDATED_AT | No description. |
NAME | No description. |
TOTAL_SPENT | No description. |
ORDER_COUNT | No description. |
LAST_ORDER_AT | No description. |
CustomerStatistics
Section titled “CustomerStatistics”What a customer is worth, and what to expect from them.
orderCount
Section titled “orderCount”Int!
No description.
totalSpent
Section titled “totalSpent”Money!
Paid, less refunds. Not the sum of order totals.
averageOrderValue
Section titled “averageOrderValue”Money!
No description.
firstOrderAt
Section titled “firstOrderAt”DateTime
No description.
lastOrderAt
Section titled “lastOrderAt”DateTime
No description.
deliveryRefusalCount
Section titled “deliveryRefusalCount”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.
returnCount
Section titled “returnCount”Int!
How many orders they have returned goods from.
grossMargin
Section titled “grossMargin”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.
CustomerUpdateInput
Section titled “CustomerUpdateInput”Changes to a customer. Partial; tags replaces wholesale when present.
firstName
Section titled “firstName”String
No description.
lastName
Section titled “lastName”String
No description.
String
No description.
[String!]
No description.
staffNote
Section titled “staffNote”String
No description.
companyId
Section titled “companyId”ID
No description.
priceListId
Section titled “priceListId”ID
No description.
metafields
Section titled “metafields”[MetafieldInput!]
No description.
DataRequest
Section titled “DataRequest”A buyer’s request to receive or erase their data, as the merchant sees it.
ID!
No description.
customer
Section titled “customer”Customer
No description.
DataRequestKind!
No description.
status
Section titled “status”DataRequestStatus!
No description.
requestedAt
Section titled “requestedAt”DateTime!
No description.
effectiveAt
Section titled “effectiveAt”DateTime
When a deletion becomes irreversible. Cancellable until then.
completedAt
Section titled “completedAt”DateTime
No description.
DataRequestKind
Section titled “DataRequestKind”Which kind of data request.
| Value | Meaning |
|---|---|
EXPORT | No description. |
ERASURE | Erasure. Redacts personal data; does not delete orders, which are tax records the merchant is required to keep. |
DataRequestStatus
Section titled “DataRequestStatus”Where a data request has got to.
| Value | Meaning |
|---|---|
PENDING | No description. |
PROCESSING | No description. |
READY | No description. |
COMPLETED | No description. |
CANCELLED | No description. |
REJECTED | No description. |
MarketingChannel
Section titled “MarketingChannel”A channel a shop can market on.
| Value | Meaning |
|---|---|
SMS | SMS — the channel that reaches everybody here. |
EMAIL | No description. |
PUSH | No description. |
MarketingConsent
Section titled “MarketingConsent”What a customer has agreed to be contacted on.
channels
Section titled “channels”[ChannelConsent!]!
No description.
unsubscribedFromAll
Section titled “unsubscribedFromAll”Boolean!
One switch that silences everything, whatever the per-channel settings say.
MarketingConsentInput
Section titled “MarketingConsentInput”Which customers to change consent for, and how.
[MarketingChannel!]
No description.
optOut
Section titled “optOut”[MarketingChannel!]
No description.
unsubscribeFromAll
Section titled “unsubscribeFromAll”Boolean
No description.
source
Section titled “source”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.
SegmentRule
Section titled “SegmentRule”One condition on segment membership.
SegmentRuleField!
No description.
operator
Section titled “operator”SegmentRuleOperator!
No description.
String!
No description.
SegmentRuleField
Section titled “SegmentRuleField”What a segment rule tests.
| Value | Meaning |
|---|---|
ORDER_COUNT | No description. |
TOTAL_SPENT | No description. |
AVERAGE_ORDER_VALUE | No description. |
LAST_ORDER_AT | No description. |
FIRST_ORDER_AT | No description. |
CREATED_AT | No description. |
TAG | No description. |
PROVINCE | Which province their default address is in. What a regional campaign needs. |
CITY | No description. |
ACCEPTS_MARKETING | Whether 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_PRODUCT | Bought a specific product. |
PURCHASED_COLLECTION | Bought from a specific collection. |
DELIVERY_REFUSAL_COUNT | No description. |
RETURN_COUNT | No description. |
HAS_ACCOUNT | No description. |
LAST_PAYMENT_METHOD | Which payment method they last used. Separates COD buyers from card buyers. |
SegmentRuleInput
Section titled “SegmentRuleInput”One condition, as supplied.
SegmentRuleField!
No description.
operator
Section titled “operator”SegmentRuleOperator!
No description.
String!
No description.
SegmentRuleOperator
Section titled “SegmentRuleOperator”How a segment rule compares.
| Value | Meaning |
|---|---|
EQUALS | No description. |
NOT_EQUALS | No description. |
GREATER_THAN | No description. |
LESS_THAN | No description. |
CONTAINS | No description. |
WITHIN_DAYS | Within the last N days. value is the number of days. |
NOT_WITHIN_DAYS | Not within the last N days — how “lapsed” is expressed. |
IS_SET | No description. |
IS_NOT_SET | No description. |
SegmentRulesMatch
Section titled “SegmentRulesMatch”Whether a customer must match every rule or any of them.
| Value | Meaning |
|---|---|
ALL | No description. |
ANY | No description. |