Analytics
ComparisonPeriod
Section titled “ComparisonPeriod”What to compare a period against.
| Value | Meaning |
|---|---|
NONE | No description. |
PREVIOUS_PERIOD | The period immediately before, of the same length. |
PREVIOUS_YEAR | The same period one Jalali year earlier. Jalali-aligned deliberately: the largest trading fortnight of the year is the one before Nowruz, and it moves against the Gregorian calendar. Comparing to “the same dates last year” compares Nowruz to an ordinary March. |
Dashboard
Section titled “Dashboard”The home screen: a small fixed set of counters for a chosen period.
Fixed rather than composable because a home screen is not a report — a merchant opening the admin wants the same six numbers every morning, and a dashboard that must be configured before it says anything is a dashboard nobody configures.
period
Section titled “period”TimeBucket!
The period these cover, with its exact bounds.
Money!
Sales on the basis asked for. See RevenueBasis.
orderCount
Section titled “orderCount”Int!
No description.
averageOrderValue
Section titled “averageOrderValue”Money!
No description.
newCustomerCount
Section titled “newCustomerCount”Int!
New customers in the period.
outstandingAmount
Section titled “outstandingAmount”Money!
What is owed and unsettled — cash on delivery not yet collected, payment links unpaid, card-to-card receipts unapproved.
On the home screen because it is the number a merchant can actually act on today, unlike yesterday’s sales.
pendingActions
Section titled “pendingActions”DashboardPendingActions!
Work waiting on somebody.
comparison
Section titled “comparison”DashboardComparison
The same measures for the comparison period, when one was asked for.
Jalali-aligned: “last month” is the previous Jalali month, and “last year” is the same Jalali period a year earlier.
DateTime!
When these numbers were computed.
freshness
Section titled “freshness”DataFreshness!
No description.
DashboardComparison
Section titled “DashboardComparison”The comparison period’s figures, and the change.
period
Section titled “period”TimeBucket!
No description.
Money!
No description.
orderCount
Section titled “orderCount”Int!
No description.
averageOrderValue
Section titled “averageOrderValue”Money!
No description.
newCustomerCount
Section titled “newCustomerCount”Int!
No description.
salesChange
Section titled “salesChange”Float
Change as a fraction: 0.12 is twelve per cent up, -0.05 is five down.
Null when the comparison period had none of the thing, because the change from zero is not a percentage and rendering it as one is how a dashboard claims an infinite improvement.
orderCountChange
Section titled “orderCountChange”Float
No description.
DashboardPendingActions
Section titled “DashboardPendingActions”Queues with something in them, for a home screen that points at work.
unfulfilledOrders
Section titled “unfulfilledOrders”Int!
Orders awaiting fulfillment.
pendingReceipts
Section titled “pendingReceipts”Int!
Card-to-card receipts nobody has looked at.
unresolvedTransactions
Section titled “unresolvedTransactions”Int!
Transactions the reconciliation worker has not settled.
pendingReviews
Section titled “pendingReviews”Int!
Reviews awaiting moderation.
pendingReturns
Section titled “pendingReturns”Int!
Returns awaiting a decision.
lowStockItems
Section titled “lowStockItems”Int!
Products at or below their low-stock threshold.
overdueInvoices
Section titled “overdueInvoices”Int!
Official invoices past, or close to, their filing deadline.
DataFreshness
Section titled “DataFreshness”How current a figure is.
computedAt
Section titled “computedAt”DateTime!
When the underlying data was last rolled up.
Boolean!
Whether it is live or from a periodic roll-up.
Stated because a merchant acting on a six-hour-old number believing it is live will act wrongly, and nothing in the number itself says which it is.
nextRefreshAt
Section titled “nextRefreshAt”DateTime
When the next roll-up is due, for a figure that is not live.
Dimension
Section titled “Dimension”What results can be grouped by.
| Value | Meaning |
|---|---|
TIME | Bucketed in the shop’s own calendar. See TimeGranularity. |
PRODUCT | No description. |
VARIANT | No description. |
COLLECTION | No description. |
CATEGORY | No description. |
VENDOR | No description. |
SALES_CHANNEL | No description. |
LOCATION | No description. |
PROVINCE | The delivery province — استان. What a merchant plans courier contracts on. |
CITY | No description. |
CUSTOMER_SEGMENT | No description. |
PAYMENT_METHOD | No description. |
DELIVERY_METHOD | No description. |
CARRIER | No description. |
DISCOUNT | No description. |
STAFF | The staff member who took the order, for phone and DM sales. |
CAMPAIGN | The campaign an order was attributed to. |
CUSTOMER_TYPE | First-time against returning. |
DimensionDescriptor
Section titled “DimensionDescriptor”One dimension, and how it behaves.
dimension
Section titled “dimension”Dimension!
No description.
approximateCardinality
Section titled “approximateCardinality”Int
Roughly how many distinct values exist, for warning about a huge grouping.
requiresFilter
Section titled “requiresFilter”Boolean!
Whether grouping by it requires a filter to keep the result usable.
DimensionValue
Section titled “DimensionValue”One dimension’s value on one row.
dimension
Section titled “dimension”Dimension!
No description.
String!
A stable key — a resource id, a province code, a bucket’s start date.
What to group and join on. Never shown to a merchant.
String
What to show. Merchant or platform data — a product title, a carrier’s name.
Null for a TIME dimension, where there is nothing to name: read timeBucket
and let the client render the date in whatever calendar the shop uses.
Node
The object itself, when the dimension names one.
timeBucket
Section titled “timeBucket”TimeBucket
The bucket’s bounds and calendar coordinates. Only for TIME.
JalaliDate
Section titled “JalaliDate”A date in the Jalali calendar — هجری شمسی.
Int!
1405, and so on.
Int!
1 for فروردین through 12 for اسفند.
Int!
No description.
Measure
Section titled “Measure”What can be measured.
| Value | Meaning |
|---|---|
GROSS_SALES | Everything charged, before discounts and refunds. |
NET_SALES | Gross less discounts and refunds. What a merchant means by “sales”. |
DISCOUNTS | No description. |
REFUNDS | No description. |
SHIPPING_CHARGED | No description. |
TAX_COLLECTED | No description. |
ORDER_COUNT | No description. |
UNITS_SOLD | No description. |
AVERAGE_ORDER_VALUE | No description. |
COST_OF_GOODS | What the goods cost. Separately scoped, like everywhere else. |
GROSS_MARGIN | Net sales less cost of goods. |
MARGIN_RATE | Gross margin as a fraction of net sales. |
CUSTOMER_COUNT | No description. |
NEW_CUSTOMER_COUNT | No description. |
RETURNING_CUSTOMER_COUNT | No description. |
REVENUE_PER_CUSTOMER | Net sales divided by customers, over the period. |
RETURN_COUNT | No description. |
RETURN_RATE | Units returned as a fraction of units sold. |
DELIVERY_REFUSAL_RATE | Cash-on-delivery parcels refused, as a fraction of those sent. Its own measure because it is a cost line in this market rather than an anomaly, and a merchant deciding whether to keep offering COD needs it. |
SESSIONS | Storefront sessions. Requires the storefront to be reporting them. Zero rather than null for a shop whose theme does not, which an admin should say plainly rather than showing a conversion rate of zero. |
CONVERSION_RATE | Orders divided by sessions. |
MeasureChange
Section titled “MeasureChange”How one measure moved.
measure
Section titled “measure”Measure!
No description.
previousValue
Section titled “previousValue”Decimal!
No description.
change
Section titled “change”Float
Null when previousValue is zero — change from nothing is not a percentage.
MeasureDescriptor
Section titled “MeasureDescriptor”One measure, and what it can be combined with.
measure
Section titled “measure”Measure!
No description.
MeasureUnit!
No description.
requiredScope
Section titled “requiredScope”AccessScope
The scope a caller needs to read it. Null when none is required.
incompatibleDimensions
Section titled “incompatibleDimensions”[Dimension!]!
Dimensions this measure cannot be grouped by.
SESSIONS by PRODUCT, for instance: a session is not attributable to one
product, and a report offering it would produce a number nobody can defend.
MeasureUnit
Section titled “MeasureUnit”What a measure’s number means.
| Value | Meaning |
|---|---|
CURRENCY | No description. |
COUNT | No description. |
RATIO | A fraction: 0.024 is 2.4 per cent. |
SECONDS | No description. |
GRAMS | No description. |
MeasureValue
Section titled “MeasureValue”One measure’s value on one row.
measure
Section titled “measure”Measure!
No description.
Decimal!
The number. Read unit to know what it means.
MeasureUnit!
No description.
Money
Populated for every CURRENCY measure, so a client formats money the same way
it formats money everywhere else rather than branching on the measure.
ReportComparison
Section titled “ReportComparison”The comparison period’s rows and totals.
period
Section titled “period”TimeBucket!
No description.
totals
Section titled “totals”[MeasureValue!]!
No description.
changes
Section titled “changes”[MeasureChange!]!
Change per measure, as a fraction. Null where the comparison period was zero.
ReportDefinition
Section titled “ReportDefinition”A stored report request.
measures
Section titled “measures”[Measure!]!
No description.
dimensions
Section titled “dimensions”[Dimension!]!
No description.
granularity
Section titled “granularity”TimeGranularity
No description.
revenueBasis
Section titled “revenueBasis”RevenueBasis!
No description.
period
Section titled “period”ReportPeriodPreset!
A rolling window, so a saved report means the same thing every week.
filters
Section titled “filters”JSON
No description.
Int!
No description.
ReportFrequency
Section titled “ReportFrequency”How often a scheduled report is sent.
| Value | Meaning |
|---|---|
DAILY | No description. |
WEEKLY | Weekly, sent on Saturday — the start of the Iranian week. |
MONTHLY | Monthly, on the first of the Jalali month. |
ReportInput
Section titled “ReportInput”A report to run.
measures
Section titled “measures”[Measure!]!
At least one. Each is checked against the caller’s scopes.
dimensions
Section titled “dimensions”[Dimension!]
What to group by, outermost first. Empty returns a single total row.
More than three produces a table nobody reads and a query nobody should pay for; the platform caps it.
granularity
Section titled “granularity”TimeGranularity
Required when TIME is among the dimensions.
period
Section titled “period”ReportPeriodPreset!
No description.
DateTime
Required when period is CUSTOM.
DateTime
No description.
comparison
Section titled “comparison”ComparisonPeriod
No description.
revenueBasis
Section titled “revenueBasis”RevenueBasis
No description.
filters
Section titled “filters”JSON
Narrowing, reusing the filter shapes from the domains being measured.
JSON because the members depend on which dimensions are in play, and typing
every combination would produce an input object nobody could read.
Query.reportSchema says what is accepted.
sortByMeasure
Section titled “sortByMeasure”Measure
Order by this measure, descending unless ascending.
ascending
Section titled “ascending”Boolean
No description.
Int
No description.
includeTest
Section titled “includeTest”Boolean
Whether test orders are counted.
False, always, unless a merchant is checking their own test setup. A test order in a revenue figure is a wrong number that looks right.
ReportPeriodPreset
Section titled “ReportPeriodPreset”A rolling period, resolved in the shop’s calendar at run time.
Presets rather than fixed dates so a saved report keeps meaning the same thing.
THIS_MONTH is the Jalali month, from its first day — not the last thirty days,
and not the Gregorian month.
| Value | Meaning |
|---|---|
TODAY | No description. |
YESTERDAY | No description. |
LAST_7_DAYS | No description. |
LAST_30_DAYS | No description. |
THIS_WEEK | This Jalali week, from Saturday. |
LAST_WEEK | No description. |
THIS_MONTH | This Jalali month, from its first day. |
LAST_MONTH | No description. |
THIS_QUARTER | No description. |
THIS_YEAR | This Jalali year, from Nowruz. |
LAST_YEAR | No description. |
CUSTOM | Explicit bounds, supplied with the request. |
ReportResult
Section titled “ReportResult”One report’s answer.
[ReportRow!]!
One row per combination of the requested dimensions.
totals
Section titled “totals”[MeasureValue!]!
Every row’s measures added up.
Computed over the whole result, not the returned page — the sum of a truncated page is a number that looks authoritative and is not.
comparison
Section titled “comparison”ReportComparison
The comparison period, when one was asked for.
truncated
Section titled “truncated”Boolean!
Whether rows were dropped to stay inside the limit.
Said plainly rather than left to be inferred: a merchant looking at a truncated best-sellers list has no way to know it was cut.
rowCount
Section titled “rowCount”Int!
No description.
DateTime!
No description.
freshness
Section titled “freshness”DataFreshness!
No description.
ReportRow
Section titled “ReportRow”One row of a report.
dimensions
Section titled “dimensions”[DimensionValue!]!
What this row is grouped by, in the order requested.
measures
Section titled “measures”[MeasureValue!]!
No description.
ReportSchedule
Section titled “ReportSchedule”When a saved report is delivered.
SMS as well as email, because a merchant who checks nothing else reads a text. A weekly summary of six numbers is the report most likely to be looked at.
frequency
Section titled “frequency”ReportFrequency!
No description.
channel
Section titled “channel”MarketingChannel!
No description.
recipientStaffIds
Section titled “recipientStaffIds”[ID!]!
Staff members it goes to.
additionalRecipients
Section titled “additionalRecipients”[String!]!
Numbers or addresses outside the staff list — an accountant, an owner.
nextRunAt
Section titled “nextRunAt”DateTime
No description.
lastSentAt
Section titled “lastSentAt”DateTime
No description.
ReportScheduleInput
Section titled “ReportScheduleInput”When a saved report is delivered.
frequency
Section titled “frequency”ReportFrequency!
No description.
channel
Section titled “channel”MarketingChannel
No description.
recipientStaffIds
Section titled “recipientStaffIds”[ID!]
No description.
additionalRecipients
Section titled “additionalRecipients”[String!]
No description.
ReportSchema
Section titled “ReportSchema”What can be asked for.
Published so a report builder and a coding agent construct the same valid requests from the same source, rather than each guessing.
measures
Section titled “measures”[MeasureDescriptor!]!
No description.
dimensions
Section titled “dimensions”[DimensionDescriptor!]!
No description.
RevenueBasis
Section titled “RevenueBasis”When a sale counts.
There is no single honest answer, so the choice is explicit. An admin should show which basis a figure is on, because two of these differ by days and by real money.
| Value | Meaning |
|---|---|
ORDERED | When the order was placed, whatever its payment state. Overstates: it counts failed gateway attempts and cash-on-delivery parcels that will be refused. Useful for measuring demand rather than income. |
VERIFIED | When payment was verified with the gateway. The default, and the one a merchant means. Excludes AUTHORIZED and UNRESOLVED transactions, which are not yet money. |
SETTLED | When the money reached the merchant’s account. Understates today and lags by days, because settlement is T+1 at best. What an accountant reconciles against a bank statement. |
SavedReport
Section titled “SavedReport”A report a merchant kept.
ID!
No description.
version
Section titled “version”Version!
No description.
String!
No description.
description
Section titled “description”String
No description.
definition
Section titled “definition”ReportDefinition!
What it asks for.
schedule
Section titled “schedule”ReportSchedule
When it is sent, and to whom. Null for one that is only ever opened.
isBuiltIn
Section titled “isBuiltIn”Boolean!
Whether the platform ships it. Built-in reports cannot be edited.
createdBy
Section titled “createdBy”StaffMember
No description.
createdAt
Section titled “createdAt”DateTime!
No description.
lastRunAt
Section titled “lastRunAt”DateTime
No description.
SavedReportConnection
Section titled “SavedReportConnection”A page of saved reports.
[SavedReportEdge!]!
No description.
[SavedReport!]!
No description.
pageInfo
Section titled “pageInfo”PageInfo!
No description.
totalCount
Section titled “totalCount”Int!
No description.
SavedReportEdge
Section titled “SavedReportEdge”One saved report, with its cursor.
cursor
Section titled “cursor”String!
No description.
SavedReport!
No description.
SavedReportInput
Section titled “SavedReportInput”A report to save.
String!
No description.
description
Section titled “description”String
No description.
definition
Section titled “definition”ReportInput!
No description.
schedule
Section titled “schedule”ReportScheduleInput
No description.
SavedReportPayload
Section titled “SavedReportPayload”What the saved-report mutations return.
savedReport
Section titled “savedReport”SavedReport
No description.
userErrors
Section titled “userErrors”[UserError!]!
No description.
TimeBucket
Section titled “TimeBucket”A span of time, with both what the platform computed it from and what a client needs to label it.
from and to are Gregorian UTC, as everywhere. jalali is the same instant’s
coordinates in the shop’s calendar, given as numbers rather than as a rendered
month name because the platform does not compose localized text — see the API
conventions.
DateTime!
No description.
DateTime!
Exclusive, so consecutive buckets never double-count a midnight.
granularity
Section titled “granularity”TimeGranularity!
No description.
jalali
Section titled “jalali”JalaliDate!
The bucket’s start, in the Jalali calendar.
TimeGranularity
Section titled “TimeGranularity”How time is bucketed.
| Value | Meaning |
|---|---|
HOUR | No description. |
DAY | No description. |
WEEK | Starting Saturday — شنبه. The Iranian week, not the ISO one. A weekly report that begins on Monday splits every Iranian working week across two rows: its Saturday and Sunday in one, the rest in the next. |
MONTH | A Jalali month, when the shop’s calendar is Jalali. |
QUARTER | A Jalali quarter — three Jalali months. |
YEAR | A Jalali year, beginning at Nowruz. |