Orderly Helper icon

Orderly Helper

Build Orderly protobuf JSON objects for Orderly actions

Actions107

Order → Create Statistics Query

AI-generated

Summary

Builds an Orderly StatisticsQuery object for use with List Stats. It combines the account, statistic types, date, and increment fields with any advanced query JSON, then converts the result to Orderly protobuf JSON for each input item.

Inputs

  • Account ID JSON — Whole AccountId object; defaults to the incoming item’s AccountId or {}. An empty object is omitted from the query.
  • Statistic Type IDs — Comma-separated StatisticId values. Each trimmed, non-empty value becomes an entry in Types with an Id.
  • From — Date/time value assigned to the query’s From field when provided.
  • Increment — Statistic interval: Unknown, Hourly, Daily, Weekly, Monthly, or Yearly. Defaults to Daily in the UI.
  • Additional Query JSON — JSON object whose fields are merged into the query before the common fields above are applied. Common fields override matching fields; unknown fields are ignored during protobuf conversion.

Output shape

One item per input item, each containing a StatisticsQuery JSON object.

The helper builds the query object; it does not call List Stats. Invalid JSON or a non-object Additional Query JSON value causes an error. With Continue On Fail enabled, the affected item contains an error field instead.

Links

Discussion