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

Analytics

Enum

What to compare a period against.

ValueMeaning
NONENo description.
PREVIOUS_PERIODThe period immediately before, of the same length.
PREVIOUS_YEARThe 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.
Object

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.

TimeBucket!

The period these cover, with its exact bounds.

Money!

Sales on the basis asked for. See RevenueBasis.

Int!

No description.

Money!

No description.

Int!

New customers in the period.

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.

DashboardPendingActions!

Work waiting on somebody.

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.

DataFreshness!

No description.

Object

The comparison period’s figures, and the change.

TimeBucket!

No description.

Money!

No description.

Int!

No description.

Money!

No description.

Int!

No description.

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.

Float

No description.

Object

Queues with something in them, for a home screen that points at work.

Int!

Orders awaiting fulfillment.

Int!

Card-to-card receipts nobody has looked at.

Int!

Transactions the reconciliation worker has not settled.

Int!

Reviews awaiting moderation.

Int!

Returns awaiting a decision.

Int!

Products at or below their low-stock threshold.

Int!

Official invoices past, or close to, their filing deadline.

Object

How current a figure is.

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.

DateTime

When the next roll-up is due, for a figure that is not live.

Enum

What results can be grouped by.

ValueMeaning
TIMEBucketed in the shop’s own calendar. See TimeGranularity.
PRODUCTNo description.
VARIANTNo description.
COLLECTIONNo description.
CATEGORYNo description.
VENDORNo description.
SALES_CHANNELNo description.
LOCATIONNo description.
PROVINCEThe delivery province — استان. What a merchant plans courier contracts on.
CITYNo description.
CUSTOMER_SEGMENTNo description.
PAYMENT_METHODNo description.
DELIVERY_METHODNo description.
CARRIERNo description.
DISCOUNTNo description.
STAFFThe staff member who took the order, for phone and DM sales.
CAMPAIGNThe campaign an order was attributed to.
CUSTOMER_TYPEFirst-time against returning.
Object

One dimension, and how it behaves.

Dimension!

No description.

Int

Roughly how many distinct values exist, for warning about a huge grouping.

Boolean!

Whether grouping by it requires a filter to keep the result usable.

Object

One dimension’s value on one row.

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

The bucket’s bounds and calendar coordinates. Only for TIME.

Object

A date in the Jalali calendar — هجری شمسی.

Int!

1405, and so on.

Int!

1 for فروردین through 12 for اسفند.

Int!

No description.

Enum

What can be measured.

ValueMeaning
GROSS_SALESEverything charged, before discounts and refunds.
NET_SALESGross less discounts and refunds. What a merchant means by “sales”.
DISCOUNTSNo description.
REFUNDSNo description.
SHIPPING_CHARGEDNo description.
TAX_COLLECTEDNo description.
ORDER_COUNTNo description.
UNITS_SOLDNo description.
AVERAGE_ORDER_VALUENo description.
COST_OF_GOODSWhat the goods cost. Separately scoped, like everywhere else.
GROSS_MARGINNet sales less cost of goods.
MARGIN_RATEGross margin as a fraction of net sales.
CUSTOMER_COUNTNo description.
NEW_CUSTOMER_COUNTNo description.
RETURNING_CUSTOMER_COUNTNo description.
REVENUE_PER_CUSTOMERNet sales divided by customers, over the period.
RETURN_COUNTNo description.
RETURN_RATEUnits returned as a fraction of units sold.
DELIVERY_REFUSAL_RATECash-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.
SESSIONSStorefront 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_RATEOrders divided by sessions.
Object

How one measure moved.

Measure!

No description.

Decimal!

No description.

Float

Null when previousValue is zero — change from nothing is not a percentage.

Object

One measure, and what it can be combined with.

Measure!

No description.

MeasureUnit!

No description.

AccessScope

The scope a caller needs to read it. Null when none is required.

[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.

Enum

What a measure’s number means.

ValueMeaning
CURRENCYNo description.
COUNTNo description.
RATIOA fraction: 0.024 is 2.4 per cent.
SECONDSNo description.
GRAMSNo description.
Object

One measure’s value on one row.

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.

Object

The comparison period’s rows and totals.

TimeBucket!

No description.

[MeasureValue!]!

No description.

[MeasureChange!]!

Change per measure, as a fraction. Null where the comparison period was zero.

Object

A stored report request.

[Measure!]!

No description.

[Dimension!]!

No description.

TimeGranularity

No description.

RevenueBasis!

No description.

ReportPeriodPreset!

A rolling window, so a saved report means the same thing every week.

JSON

No description.

Int!

No description.

Enum

How often a scheduled report is sent.

ValueMeaning
DAILYNo description.
WEEKLYWeekly, sent on Saturday — the start of the Iranian week.
MONTHLYMonthly, on the first of the Jalali month.
Input

A report to run.

[Measure!]!

At least one. Each is checked against the caller’s scopes.

[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.

TimeGranularity

Required when TIME is among the dimensions.

ReportPeriodPreset!

No description.

DateTime

Required when period is CUSTOM.

DateTime

No description.

ComparisonPeriod

No description.

RevenueBasis

No description.

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.

Measure

Order by this measure, descending unless ascending.

Boolean

No description.

Int

No description.

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.

Enum

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.

ValueMeaning
TODAYNo description.
YESTERDAYNo description.
LAST_7_DAYSNo description.
LAST_30_DAYSNo description.
THIS_WEEKThis Jalali week, from Saturday.
LAST_WEEKNo description.
THIS_MONTHThis Jalali month, from its first day.
LAST_MONTHNo description.
THIS_QUARTERNo description.
THIS_YEARThis Jalali year, from Nowruz.
LAST_YEARNo description.
CUSTOMExplicit bounds, supplied with the request.
Object

One report’s answer.

[ReportRow!]!

One row per combination of the requested dimensions.

[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.

ReportComparison

The comparison period, when one was asked for.

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.

Int!

No description.

DateTime!

No description.

DataFreshness!

No description.

Object

One row of a report.

[DimensionValue!]!

What this row is grouped by, in the order requested.

[MeasureValue!]!

No description.

Object

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.

ReportFrequency!

No description.

MarketingChannel!

No description.

[ID!]!

Staff members it goes to.

[String!]!

Numbers or addresses outside the staff list — an accountant, an owner.

DateTime

No description.

DateTime

No description.

Input

When a saved report is delivered.

ReportFrequency!

No description.

MarketingChannel

No description.

[ID!]

No description.

[String!]

No description.

Object

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.

[MeasureDescriptor!]!

No description.

[DimensionDescriptor!]!

No description.

Enum

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.

ValueMeaning
ORDEREDWhen 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.
VERIFIEDWhen payment was verified with the gateway. The default, and the one a merchant means. Excludes AUTHORIZED and UNRESOLVED transactions, which are not yet money.
SETTLEDWhen 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.
Object

A report a merchant kept.

ID!

No description.

Version!

No description.

String!

No description.

String

No description.

ReportDefinition!

What it asks for.

ReportSchedule

When it is sent, and to whom. Null for one that is only ever opened.

Boolean!

Whether the platform ships it. Built-in reports cannot be edited.

StaffMember

No description.

DateTime!

No description.

DateTime

No description.

Object

A page of saved reports.

[SavedReportEdge!]!

No description.

[SavedReport!]!

No description.

PageInfo!

No description.

Int!

No description.

Object

One saved report, with its cursor.

String!

No description.

SavedReport!

No description.

Input

A report to save.

String!

No description.

String

No description.

ReportInput!

No description.

ReportScheduleInput

No description.

Object

What the saved-report mutations return.

SavedReport

No description.

[UserError!]!

No description.

Object

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.

TimeGranularity!

No description.

JalaliDate!

The bucket’s start, in the Jalali calendar.

Enum

How time is bucketed.

ValueMeaning
HOURNo description.
DAYNo description.
WEEKStarting 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.
MONTHA Jalali month, when the shop’s calendar is Jalali.
QUARTERA Jalali quarter — three Jalali months.
YEARA Jalali year, beginning at Nowruz.