Datasets and fields

A dataset is a queryable table you name in the FROM clause of a SoloQL query. Each dataset exposes a set of fields — some are dimensions you group and filter by, and some are metrics you measure.

The datasets

Name one of these after FROM:

DatasetWhat it covers
salesConsolidated sales — total, net, and gross sales, orders, customers, discounts, returns, taxes, shipping, and net quantity, sliced by product, channel, customer, or country.
ordersOrder-level metrics — order count, total price, average order value, and financial and fulfillment status.
customersCustomer metrics — customer count, total spent, and average spent.
productsProduct-level performance across your catalog.
inventoryStock levels across locations and stores.
sales_taxesTax collected, broken out for reporting.
payoutsShopify Payments payouts — amounts, fees, and dates.
discountsDiscount usage and performance.
gift_cardsIssued gift cards — balances and status.
draft_ordersDraft and invoiced orders.
abandoned_checkoutsCarts that never became orders.

Every dataset carries the store dimension for multi-store consolidation — see Querying with SoloQL.

Field types and roles

Each field has a type and a role.

Types describe the shape of the value:

  • string — text (a product title, a status).
  • number — a plain count or quantity.
  • money — a currency amount (auto-converted for cross-store totals).
  • date — a date or timestamp.
  • boolean — true or false.
  • percent — a proportion.

Roles describe how a field is used in a query:

  • dimension — something you group or filter by (GROUP BY, WHERE).
  • metric — something you measure in SHOW.

Metrics also carry a default_aggregation — one of sum, avg, min, max, count, or count_distinct — that says how the field rolls up. Dimensions have a null default aggregation.

Discover every field with GET /v1/datasets

GET /v1/datasets is a self-describing catalog — the source of truth for what you can query. Rather than hard-coding field names, call it and read back every dataset with its fields:

curl https://api.ecomsolo.com/v1/datasets \
  -H "Authorization: Bearer esk_live_..."

The response is an array of datasets, each listing its fields:

[
  {
    "name": "sales",
    "title": "Sales",
    "description": "Consolidated sales across all your stores.",
    "fields": [
      {
        "name": "total_sales",
        "title": "Total sales",
        "description": "Gross sales minus discounts and returns, plus taxes and shipping.",
        "type": "money",
        "role": "metric",
        "default_aggregation": "sum"
      },
      {
        "name": "store",
        "title": "Store",
        "description": "The connected store the row belongs to.",
        "type": "string",
        "role": "dimension",
        "default_aggregation": null
      }
    ]
  }
]

tip

Because the catalog is self-describing, an integration can list datasets and fields at runtime and adapt automatically as new fields are added — no schema to maintain in your own code.