AlmondTill/G3N API

dashboardMetrics

query · in the family Reading your records

What it does

One dashboard’s widgets answered with live figures — counts and per-currency totals computed at read time, each stamped with when it was read.

One dashboard's widgets answered: each canned metric computed at read time, ordinal-ordered. The lanes: the status counts (orders_open = open/held/placed off the folded count row · cs_open_cases = cases where work remains · fraud_alerts_open = awaiting first triage, each a bounded walk) · windowed sales sums per currency off the daily sales ledger · loyalty_signups_30d (members created in the trailing 30 days — a signup is a birth event, status-blind) · inventory_value (Σ on-hand × weighted-average cost per currency; items without a cost basis are excluded) · sell_through_30d · review_average (the published-review aggregate — the average ×100 beside its census) · low_stock_count (the per-organization buy-desk snapshots summed — every active organization must have been desk-evaluated, asOf = the oldest evaluation; an unevaluated organization refuses naming it) · units_by_day_30d · the money series: sales_by_day_30d (net sales per day, one lane per currency) · transactions_by_day_30d (orders placed per day, a count series) · returns_by_day_30d (returns refunded per day, a count series) · tender_mix_30d (the money applied per tender type per day, signed, one lane per tender type and currency) · sales_by_organization_30d (net sales per selling organization per day, one lane per organization and currency); a money series above 16 lanes answers unavailable with the too-many-lanes reason · the stats section: org_census (the record counts that matter — eighteen kinds, active and all, counted once a day by the census sweep; each kind's row shows only when your role may list that family; no census yet answers unavailable with its reason) · api_calls_month and ai_calls_month (this month's calls off the daily usage rollups — the 1st reads one day, the 31st thirty-one) · storage_mib (the records + blob MiB the daily storage snapshot last measured, as of that day; no snapshot yet answers unavailable). The OP binding: the three meters stand on the billing reads (usageReport · aiUsage) — a role without them reads the not-permitted reason and the lane is never read. Every answer is honest-or-absent: a lane whose rows exceed the per-lane walk cap (2000), nothing to measure yet, a count past the wire's integer ceiling, or a money total past what the money grammar can carry answers available:false with a plain-words reason — never a clipped figure. The open-orders count: orders_open reads ONE folded count row kept current as orders change (the sum of open · held · placed) — it answers instantly for a store of any size; before the row exists, or while out-of-order events still settle, it answers available:false with its reason. The money string: every money figure — the sales tiles, the inventory value, the comparison figures and the money lanes' points — is a signed decimal string in the currency's major units, never minor units. The lens: every metric names the record families it reads (sales and open orders → Order · sales by day, transactions by day and the tender mix → Order · returns by day → Return · sales by organization → Order + Organization · inventory value, sell-through and units by day → InventoryItem · low stock → Organization + InventoryItem · service cases → CsCase · reviews → Review · loyalty signups → LoyaltyMember · fraud alerts → FraudAlert); a family your role may not list answers available:false with the not-permitted reason and its lane is never read — the same binding the report run applies. One read, two doors: name the layout exactly one way — id (a saved dashboard in your org group) or widgets (1..20 canned metric tokens, each once — a starter layout with no saved row; dashboardId answers null); both or neither refuse VALIDATION/INVALID. Group-wide (the construct's own scope). Requires authentication (template class).

Before you call

A bearer session from an API key (see Authentication and key hygiene) or a signed-in user.

Capability area: Reading your records — Looking up and listing the records of your organization.

Roles that may call it:

What happens

Read-only. Every tile answers honestly or not at all: a figure that cannot be totaled truthfully (too many records for one glance, or a summary that has not been built yet) says so in plain words instead of guessing.

Arguments

NameTypeRequiredNotes
idIDnoThe id of the record.
widgetsDashboardMetric [DashboardMetric!]noOne of the values of [DashboardMetric](/types/DashboardMetric/).

Returns

DashboardMetrics DashboardMetrics! — The dashboardMetrics answer — the layout's widgets, each realized at read time.: dashboardId is null when the read came through the widgets door (a starter layout — no saved row).

Example request

graphql
query ExampleDashboardMetrics($id: ID) {
  dashboardMetrics(id: $id) {
    dashboardId
  }
}

Variables:

json
{
  "id": "01900000-0000-7000-8000-37386ae00000"
}

Example response

json
{
  "data": {
    "dashboardMetrics": {
      "dashboardId": "01900000-0000-7000-8000-11f6d87b0000"
    }
  },
  "extensions": {
    "at": {
      "callId": "01EXAMPLE-CALL-ID",
      "version": {
        "requested": null,
        "serviced": {
          "name": "genesis",
          "number": 0
        }
      }
    }
  }
}

Errors this call can answer

Used in