MCP Control
Аналитика · Чтение

Узнать выручку за период

Считает показатели за выбранный период. Для подтверждённой выручки используется revenue.paid.

metrics_get
Кассовый чек, калькулятор и монеты

Попробуйте три запроса

Выручка сегодня
  1. Вы указываетеФилиал и день
  2. ПомощникРасчёт выручки
  3. Вы получаетеСумма и валюта
Запрос в чат
Покажи подтверждённую выручку за сегодня в выбранном филиале. Укажи валюту и местный часовой пояс.
Учебный пример ответа
Учебная выручка
125 USD
Сравнить продажи
  1. Вы указываетеДаты и филиал
  2. ПомощникПодсчёт заказов
  3. Вы получаетеСравнение по дням
Запрос в чат
Покажи количество заказов за 1 и 2 ноября 2026 года в выбранном филиале по его часовому поясу. Сравни дни на диаграмме.
Учебный пример ответа
1 ноя4
2 ноя7
Уточнить определение
  1. Вы указываетеrevenue.paid
  2. ПомощникОпределение метрики
  3. Вы получаетеПояснение к сумме
Запрос в чат
Для показателя revenue.paid верни определение вместе с результатом за сегодня. Укажи, какие платежи входят в сумму.
Учебный пример ответа
Показатель
revenue.paid
Период
Сегодня
Пример вызова через sabsus_action_call
{
  "name": "metrics_get",
  "arguments": {
    "metrics": [
      "revenue.paid"
    ],
    "period": "today",
    "comparison": "none",
    "includeDefinitions": false
  }
}
Как работает действие

Это чтение. Выберите запись или задайте фильтры в доступной компании.

Описание разработчика

Calculate canonical business metrics (метрики, статистика). For выручка за сегодня / today revenue, request metrics=["revenue.paid"], period="today" and inspect sourceStatus; use calendarLocationId from company_locations_list when reporting timezones differ. revenue.paid sums confirmed positive payments by payment Date, grouped by currency, not order totals or account balances. Also reports inventory stock, finance balances/movement, provider advertising, workforce attendance, orders, leads, tasks, calls, delivery and communications. not_ready/incomplete projection results are unknown, never zero. Accepted metric IDs are in the input schema. analytics.read and underlying native permissions/location restrictions apply to every selected metric. Returns compact values, units, periods and dimensions; includeDefinitions adds only selected metric definitions.

Параметры запроса
metrics
Distinct registered metric IDs. Finance account snapshots require accountIds; inventory stock requires productIds and locationId; advertising requires a period and accepts campaignId; workforce attendance requires employeeId and a period. Shared native calls are batched. Request includeDefinitions for precise definitions of your selected metrics. обязательно по схеме · array · до элементов 20
filters
Default filters for each selection without its own filters. Every supplied filter must be supported by that metric. необязательно · object
period
Explicit reporting period; short calendar presets are supported. Custom from is inclusive and to exclusive. необязательно · object / string
compare
Shortcut for previous_period comparison; cannot contradict comparison. необязательно · boolean
comparison
Server-resolved comparison for period metrics only. Snapshot values in a mixed query have no comparison. обязательно по схеме · string · по умолчанию "none" · варианты none, previous_period, previous_year
calendarLocationId
Optional authorized establishment whose configured timezone sets operational and attendance calendar boundaries. This selects the reporting clock, not a data filter. When omitted, company establishments must have one consistent valid timezone. Advertising retains its native UTC provider-day calendar. необязательно · string · до символов 128
reportingTimezone
Explicit IANA calendar for operational and attendance period reporting. Changes the reporting clock, never company or location authorization. Omit to use the configured establishment calendar. Cannot be combined with calendarLocationId. Advertising retains its UTC provider-day calendar. необязательно · string · до символов 100
includeDefinitions
Include the precise business definitions and supported filters/periods/dimensions of the requested authorized metrics alongside their values. The complete registry is never returned implicitly. обязательно по схеме · boolean · по умолчанию false
Что вернёт команда
calculatedAt
Server clock captured once for the batch; source data synchronization may be older. обязательно по схеме · string
results
Compact metrics in requested order, without raw orders, transactions or source profiles. обязательно по схеме · array · до элементов 20
Поля и технические схемы
Входные поля и поля ответа metrics_get
Вход · JSON Schema
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "type": "object",
  "properties": {
    "metrics": {
      "minItems": 1,
      "maxItems": 20,
      "type": "array",
      "items": {
        "anyOf": [
          {
            "type": "string",
            "enum": [
              "inventory.low_stock",
              "inventory.out_of_stock",
              "finance.deposits",
              "finance.withdrawals",
              "employees.on_shift",
              "employees.open_shifts",
              "customers.new",
              "customers.count",
              "bookings.orders",
              "bookings.cancelled_orders",
              "bookings.upcoming_orders",
              "orders.count",
              "orders.value",
              "orders.average",
              "orders.paid",
              "orders.unpaid",
              "orders.partially_paid",
              "orders.cancelled",
              "orders.customers",
              "revenue.paid",
              "revenue.refunded",
              "revenue.net",
              "leads.new",
              "leads.count",
              "leads.unprocessed",
              "leads.unassigned",
              "leads.linked_orders",
              "tasks.created",
              "tasks.active",
              "tasks.completed",
              "tasks.due",
              "tasks.overdue",
              "calls.count",
              "calls.answered",
              "calls.missed",
              "calls.failed",
              "calls.completed",
              "calls.ai",
              "calls.average_duration",
              "communications.messages",
              "communications.failed_outbound",
              "delivery.routes",
              "delivery.average_distance",
              "delivery.average_duration",
              "delivery.active_couriers",
              "delivery.completed",
              "delivery.started_unfinished",
              "delivery.past_planned_finish",
              "inventory.recorded_quantity",
              "finance.account_opening_balance",
              "finance.account_movement",
              "finance.account_balance",
              "ads.spend",
              "ads.clicks",
              "ads.impressions",
              "ads.leads",
              "ads.cost_per_lead",
              "ads.orders",
              "ads.bookings",
              "ads.reported_conversions",
              "ads.reported_conversion_value",
              "workforce.worked_minutes",
              "workforce.shift_count"
            ]
          },
          {
            "type": "object",
            "properties": {
              "id": {
                "type": "string",
                "enum": [
                  "inventory.low_stock",
                  "inventory.out_of_stock",
                  "finance.deposits",
                  "finance.withdrawals",
                  "employees.on_shift",
                  "employees.open_shifts",
                  "customers.new",
                  "customers.count",
                  "bookings.orders",
                  "bookings.cancelled_orders",
                  "bookings.upcoming_orders",
                  "orders.count",
                  "orders.value",
                  "orders.average",
                  "orders.paid",
                  "orders.unpaid",
                  "orders.partially_paid",
                  "orders.cancelled",
                  "orders.customers",
                  "revenue.paid",
                  "revenue.refunded",
                  "revenue.net",
                  "leads.new",
                  "leads.count",
                  "leads.unprocessed",
                  "leads.unassigned",
                  "leads.linked_orders",
                  "tasks.created",
                  "tasks.active",
                  "tasks.completed",
                  "tasks.due",
                  "tasks.overdue",
                  "calls.count",
                  "calls.answered",
                  "calls.missed",
                  "calls.failed",
                  "calls.completed",
                  "calls.ai",
                  "calls.average_duration",
                  "communications.messages",
                  "communications.failed_outbound",
                  "delivery.routes",
                  "delivery.average_distance",
                  "delivery.average_duration",
                  "delivery.active_couriers",
                  "delivery.completed",
                  "delivery.started_unfinished",
                  "delivery.past_planned_finish",
                  "inventory.recorded_quantity",
                  "finance.account_opening_balance",
                  "finance.account_movement",
                  "finance.account_balance",
                  "ads.spend",
                  "ads.clicks",
                  "ads.impressions",
                  "ads.leads",
                  "ads.cost_per_lead",
                  "ads.orders",
                  "ads.bookings",
                  "ads.reported_conversions",
                  "ads.reported_conversion_value",
                  "workforce.worked_minutes",
                  "workforce.shift_count"
                ],
                "description": "Canonical metric identifier from this action schema."
              },
              "filters": {
                "description": "Per-metric typed filters. Overrides the request-level filters for this selection.",
                "type": "object",
                "properties": {
                  "productIds": {
                    "$ref": "#/$defs/_mcp0"
                  },
                  "locationId": {
                    "$ref": "#/$defs/_mcp1"
                  },
                  "accountIds": {
                    "$ref": "#/$defs/_mcp2"
                  },
                  "campaignId": {
                    "$ref": "#/$defs/_mcp3"
                  },
                  "employeeId": {
                    "$ref": "#/$defs/_mcp4"
                  },
                  "pointOfSaleId": {
                    "description": "Exact native establishment filter.",
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 128,
                    "pattern": "^[A-Za-z0-9_-]+$"
                  },
                  "clientId": {
                    "description": "Exact native customer filter.",
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 128,
                    "pattern": "^[A-Za-z0-9_-]+$"
                  },
                  "pipelineId": {
                    "description": "Exact native lead pipeline filter.",
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 128,
                    "pattern": "^[A-Za-z0-9_-]+$"
                  },
                  "stageId": {
                    "description": "Exact native lead stage filter.",
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 128,
                    "pattern": "^[A-Za-z0-9_-]+$"
                  },
                  "status": {
                    "$ref": "#/$defs/_mcp5"
                  },
                  "channel": {
                    "$ref": "#/$defs/_mcp6"
                  },
                  "source": {
                    "description": "Exact native lead source filter.",
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 128,
                    "pattern": "^[A-Za-z0-9_-]+$"
                  },
                  "resourceId": {
                    "$ref": "#/$defs/_mcp7"
                  },
                  "productId": {
                    "description": "Exact native product ID filter.",
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 128,
                    "pattern": "^[A-Za-z0-9_-]+$"
                  },
                  "categoryId": {
                    "description": "Exact native category ID filter.",
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 128,
                    "pattern": "^[A-Za-z0-9_-]+$"
                  }
                },
                "additionalProperties": false
              },
              "groupBy": {
                "description": "Supported native dimension. No arbitrary field names or client-side aggregation.",
                "type": "string",
                "enum": [
                  "account",
                  "currency",
                  "product",
                  "employee",
                  "pointOfSale",
                  "status",
                  "channel",
                  "source",
                  "pipeline",
                  "stage",
                  "resource"
                ]
              }
            },
            "required": [
              "id"
            ],
            "additionalProperties": false
          }
        ]
      },
      "description": "Distinct registered metric IDs. Finance account snapshots require accountIds; inventory stock requires productIds and locationId; advertising requires a period and accepts campaignId; workforce attendance requires employeeId and a period. Shared native calls are batched. Request includeDefinitions for precise definitions of your selected metrics."
    },
    "filters": {
      "description": "Default filters for each selection without its own filters. Every supplied filter must be supported by that metric.",
      "type": "object",
      "properties": {
        "productIds": {
          "$ref": "#/$defs/_mcp0"
        },
        "locationId": {
          "$ref": "#/$defs/_mcp1"
        },
        "accountIds": {
          "$ref": "#/$defs/_mcp2"
        },
        "campaignId": {
          "$ref": "#/$defs/_mcp3"
        },
        "employeeId": {
          "$ref": "#/$defs/_mcp4"
        },
        "pointOfSaleId": {
          "description": "Exact native establishment filter.",
          "type": "string",
          "minLength": 1,
          "maxLength": 128,
          "pattern": "^[A-Za-z0-9_-]+$"
        },
        "clientId": {
          "description": "Exact native customer filter.",
          "type": "string",
          "minLength": 1,
          "maxLength": 128,
          "pattern": "^[A-Za-z0-9_-]+$"
        },
        "pipelineId": {
          "description": "Exact native lead pipeline filter.",
          "type": "string",
          "minLength": 1,
          "maxLength": 128,
          "pattern": "^[A-Za-z0-9_-]+$"
        },
        "stageId": {
          "description": "Exact native lead stage filter.",
          "type": "string",
          "minLength": 1,
          "maxLength": 128,
          "pattern": "^[A-Za-z0-9_-]+$"
        },
        "status": {
          "$ref": "#/$defs/_mcp5"
        },
        "channel": {
          "$ref": "#/$defs/_mcp6"
        },
        "source": {
          "description": "Exact native lead source filter.",
          "type": "string",
          "minLength": 1,
          "maxLength": 128,
          "pattern": "^[A-Za-z0-9_-]+$"
        },
        "resourceId": {
          "$ref": "#/$defs/_mcp7"
        },
        "productId": {
          "description": "Exact native product ID filter.",
          "type": "string",
          "minLength": 1,
          "maxLength": 128,
          "pattern": "^[A-Za-z0-9_-]+$"
        },
        "categoryId": {
          "description": "Exact native category ID filter.",
          "type": "string",
          "minLength": 1,
          "maxLength": 128,
          "pattern": "^[A-Za-z0-9_-]+$"
        }
      },
      "additionalProperties": false
    },
    "period": {
      "description": "Explicit reporting period; short calendar presets are supported. Custom from is inclusive and to exclusive.",
      "anyOf": [
        {
          "type": "object",
          "properties": {
            "preset": {
              "type": "string",
              "enum": [
                "today",
                "yesterday",
                "this_week",
                "last_week",
                "last_7_days",
                "last_30_days",
                "this_month",
                "last_month",
                "this_quarter",
                "last_quarter",
                "this_year",
                "last_year",
                "custom",
                "all_time"
              ],
              "description": "Explicit calendar period. Weeks start Monday; last_7_days/last_30_days include today. Current periods include the complete current calendar unit. all_time is never implicit and is available only for metrics that support it."
            },
            "from": {
              "description": "For custom only: inclusive local calendar date YYYY-MM-DD in the server-resolved reporting timezone.",
              "type": "string",
              "format": "date",
              "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$"
            },
            "to": {
              "description": "For custom only: exclusive local calendar date YYYY-MM-DD in the server-resolved reporting timezone.",
              "type": "string",
              "format": "date",
              "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$"
            },
            "start": {
              "description": "Custom inclusive start date; alias of from. Supply start/end together, without from/to.",
              "type": "string",
              "format": "date",
              "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$"
            },
            "end": {
              "description": "Custom exclusive end date; alias of to. Supply start/end together, without from/to.",
              "type": "string",
              "format": "date",
              "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$"
            }
          },
          "required": [
            "preset"
          ],
          "additionalProperties": false
        },
        {
          "type": "string",
          "enum": [
            "today",
            "yesterday",
            "week",
            "month",
            "quarter",
            "year",
            "all_time"
          ]
        }
      ]
    },
    "compare": {
      "description": "Shortcut for previous_period comparison; cannot contradict comparison.",
      "type": "boolean"
    },
    "comparison": {
      "default": "none",
      "description": "Server-resolved comparison for period metrics only. Snapshot values in a mixed query have no comparison.",
      "type": "string",
      "enum": [
        "none",
        "previous_period",
        "previous_year"
      ]
    },
    "calendarLocationId": {
      "description": "Optional authorized establishment whose configured timezone sets operational and attendance calendar boundaries. This selects the reporting clock, not a data filter. When omitted, company establishments must have one consistent valid timezone. Advertising retains its native UTC provider-day calendar.",
      "type": "string",
      "minLength": 1,
      "maxLength": 128,
      "pattern": "^[A-Za-z0-9_-]+$"
    },
    "reportingTimezone": {
      "description": "Explicit IANA calendar for operational and attendance period reporting. Changes the reporting clock, never company or location authorization. Omit to use the configured establishment calendar. Cannot be combined with calendarLocationId. Advertising retains its UTC provider-day calendar.",
      "type": "string",
      "maxLength": 100
    },
    "includeDefinitions": {
      "default": false,
      "description": "Include the precise business definitions and supported filters/periods/dimensions of the requested authorized metrics alongside their values. The complete registry is never returned implicitly.",
      "type": "boolean"
    }
  },
  "required": [
    "metrics",
    "comparison",
    "includeDefinitions"
  ],
  "additionalProperties": false,
  "$defs": {
    "_mcp0": {
      "description": "Existing product IDs for inventory quantities, in their native units.",
      "minItems": 1,
      "maxItems": 50,
      "type": "array",
      "items": {
        "type": "string",
        "minLength": 1,
        "maxLength": 128,
        "pattern": "^[A-Za-z0-9_-]+$"
      }
    },
    "_mcp1": {
      "description": "Inventory establishment ID. This actually filters stock; it is not a timezone selector.",
      "type": "string",
      "minLength": 1,
      "maxLength": 128,
      "pattern": "^[A-Za-z0-9_-]+$"
    },
    "_mcp2": {
      "description": "Existing financial account IDs. Balances remain separate for every account and currency.",
      "minItems": 1,
      "maxItems": 50,
      "type": "array",
      "items": {
        "type": "string",
        "minLength": 1,
        "maxLength": 128,
        "pattern": "^[A-Za-z0-9_-]+$"
      }
    },
    "_mcp3": {
      "description": "Existing advertising campaign ID, or omit for the native company advertising summary.",
      "type": "string",
      "minLength": 1,
      "maxLength": 128,
      "pattern": "^[A-Za-z0-9_-]+$"
    },
    "_mcp4": {
      "description": "Existing employee ID for attendance metrics.",
      "type": "string",
      "minLength": 1,
      "maxLength": 128,
      "pattern": "^[A-Za-z0-9_-]+$"
    },
    "_mcp5": {
      "description": "Exact current normalized native status filter.",
      "type": "string",
      "minLength": 1,
      "maxLength": 128,
      "pattern": "^[A-Za-z0-9_-]+$"
    },
    "_mcp6": {
      "description": "Exact source channel or integration ID.",
      "type": "string",
      "minLength": 1,
      "maxLength": 128,
      "pattern": "^[A-Za-z0-9_-]+$"
    },
    "_mcp7": {
      "description": "Existing table/resource identifier where supported.",
      "type": "string",
      "minLength": 1,
      "maxLength": 128,
      "pattern": "^[A-Za-z0-9_-]+$"
    }
  }
}
Выход · JSON Schema
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "type": "object",
  "properties": {
    "calculatedAt": {
      "type": "string",
      "description": "Server clock captured once for the batch; source data synchronization may be older."
    },
    "results": {
      "maxItems": 20,
      "type": "array",
      "items": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "maxLength": 100,
            "pattern": "^[a-z][a-z0-9_]*\\.[a-z][a-z0-9_]*$",
            "description": "Canonical metric identifier requested."
          },
          "unit": {
            "type": "string",
            "description": "Metric unit; money currency and product identity are carried by dimensions."
          },
          "timeBehavior": {
            "type": "string",
            "enum": [
              "PERIOD",
              "SNAPSHOT",
              "COHORT"
            ],
            "description": "Meaning of the time window for this metric."
          },
          "definition": {
            "description": "Exact definition of this selected authorized metric, only when includeDefinitions is true. No unrelated registry entries.",
            "type": "object",
            "properties": {
              "id": {
                "type": "string",
                "maxLength": 100,
                "pattern": "^[a-z][a-z0-9_]*\\.[a-z][a-z0-9_]*$",
                "description": "Stable canonical metric identifier."
              },
              "group": {
                "type": "string",
                "description": "Existing business metric subdivision, not another MCP tool."
              },
              "displayName": {
                "type": "string",
                "description": "Business name of this exact measurement."
              },
              "description": {
                "type": "string",
                "description": "Precise business meaning, including important exclusions."
              },
              "type": {
                "type": "string",
                "const": "number",
                "description": "Numeric measurement type; null values remain unknown."
              },
              "unit": {
                "type": "string",
                "description": "Measurement unit; currencies and products remain separate dimensions."
              },
              "sourceOfTruth": {
                "type": "string",
                "description": "Existing native calculation reused by this metric."
              },
              "timeBehavior": {
                "type": "string",
                "enum": [
                  "PERIOD",
                  "SNAPSHOT",
                  "COHORT"
                ],
                "description": "Whether the measurement represents a period, current state, or a defined cohort."
              },
              "supportedPeriods": {
                "type": "array",
                "items": {
                  "type": "string"
                },
                "description": "Explicit supported presets. Empty for snapshots; unsupported all_time is absent."
              },
              "requiredFilters": {
                "type": "array",
                "items": {
                  "type": "string"
                },
                "description": "Typed filter names required by this metric."
              },
              "supportedFilters": {
                "type": "array",
                "items": {
                  "type": "object",
                  "properties": {
                    "name": {
                      "type": "string",
                      "description": "Predefined filter name."
                    },
                    "type": {
                      "type": "string",
                      "enum": [
                        "id",
                        "id[]"
                      ],
                      "description": "Exact ID or bounded ID list."
                    },
                    "required": {
                      "type": "boolean",
                      "description": "Whether this filter must be supplied."
                    },
                    "description": {
                      "type": "string",
                      "description": "Business meaning of this filter."
                    }
                  },
                  "required": [
                    "name",
                    "type",
                    "required",
                    "description"
                  ],
                  "additionalProperties": false
                },
                "description": "Closed filter contract; arbitrary fields or operators are not accepted."
              },
              "supportedDimensions": {
                "type": "array",
                "items": {
                  "type": "string"
                },
                "description": "Supported native grouping dimensions."
              },
              "comparisonSupport": {
                "type": "array",
                "items": {
                  "type": "string",
                  "enum": [
                    "none",
                    "previous_period",
                    "previous_year"
                  ]
                },
                "description": "Available server-resolved comparison policies."
              },
              "timezoneBehavior": {
                "type": "string",
                "description": "Native reporting clock and timezone resolution policy."
              }
            },
            "required": [
              "id",
              "group",
              "displayName",
              "description",
              "type",
              "unit",
              "sourceOfTruth",
              "timeBehavior",
              "supportedPeriods",
              "requiredFilters",
              "supportedFilters",
              "supportedDimensions",
              "comparisonSupport",
              "timezoneBehavior"
            ],
            "additionalProperties": false
          },
          "period": {
            "anyOf": [
              {
                "$ref": "#/$defs/_mcp2"
              },
              {
                "type": "null"
              }
            ],
            "description": "Actual interval and timezone, or null for a current snapshot."
          },
          "comparisonPeriod": {
            "anyOf": [
              {
                "$ref": "#/$defs/_mcp2"
              },
              {
                "type": "null"
              }
            ],
            "description": "Actual comparison interval, if requested and meaningful."
          },
          "values": {
            "maxItems": 100,
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "value": {
                  "description": "Native aggregate value. Null stays unknown/incomplete; no zero is invented.",
                  "type": [
                    "number",
                    "null"
                  ]
                },
                "dimensions": {
                  "type": "object",
                  "properties": {
                    "resourceId": {
                      "description": "Native table/resource grouping key.",
                      "type": [
                        "string",
                        "null"
                      ]
                    },
                    "pointOfSaleId": {
                      "description": "Native establishment grouping key.",
                      "type": [
                        "string",
                        "null"
                      ]
                    },
                    "status": {
                      "description": "Native normalized status grouping key.",
                      "type": [
                        "string",
                        "null"
                      ]
                    },
                    "channel": {
                      "description": "Native channel grouping key.",
                      "type": [
                        "string",
                        "null"
                      ]
                    },
                    "source": {
                      "description": "Native source grouping key.",
                      "type": [
                        "string",
                        "null"
                      ]
                    },
                    "pipelineId": {
                      "description": "Native pipeline grouping key.",
                      "type": [
                        "string",
                        "null"
                      ]
                    },
                    "stageId": {
                      "description": "Native stage grouping key.",
                      "type": [
                        "string",
                        "null"
                      ]
                    },
                    "accountId": {
                      "description": "Native financial account dimension.",
                      "type": "string"
                    },
                    "productId": {
                      "description": "Native product dimension; quantities of different products are not summed.",
                      "type": "string"
                    },
                    "employeeId": {
                      "description": "Native employee dimension.",
                      "type": "string"
                    },
                    "currency": {
                      "description": "Unchanged native currency label/code. Null is unknown, and different currencies are never combined.",
                      "type": [
                        "string",
                        "null"
                      ]
                    }
                  },
                  "additionalProperties": false,
                  "description": "Native grouping keys; source records are not returned."
                },
                "comparisonValue": {
                  "description": "Matching dimension in the comparison interval; null if absent or unknown.",
                  "type": [
                    "number",
                    "null"
                  ]
                },
                "change": {
                  "description": "Current minus comparison value when both are known.",
                  "type": [
                    "number",
                    "null"
                  ]
                },
                "changePercent": {
                  "description": "100 times change divided by the absolute comparison value; null when unknown or the comparison is zero.",
                  "type": [
                    "number",
                    "null"
                  ]
                },
                "lastSyncedAt": {
                  "description": "Native advertising synchronization timestamp, when reported.",
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "comparisonLastSyncedAt": {
                  "description": "Native comparison-period advertising synchronization timestamp, when reported.",
                  "type": [
                    "string",
                    "null"
                  ]
                }
              },
              "required": [
                "value",
                "dimensions"
              ],
              "additionalProperties": false
            },
            "description": "Separate values per native dimension. Empty native data remains an empty series."
          },
          "entityIds": {
            "description": "Bounded source IDs returned only by the attention summary.",
            "maxItems": 10,
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "detailTool": {
            "description": "Existing read Action for inspecting the source records.",
            "type": "string"
          },
          "projectedAt": {
            "description": "Newest source projection timestamp; asynchronous delivery can lag.",
            "type": [
              "string",
              "null"
            ]
          },
          "sourceStatus": {
            "description": "Source coverage: not_ready and incomplete are unknown, never zero.",
            "type": "string"
          },
          "completeness": {
            "description": "Native coverage indication; partial and unknown values are preserved.",
            "type": [
              "string",
              "null"
            ]
          },
          "attribution": {
            "description": "Native conversion attribution caveat; reported conversions are not unique customers.",
            "type": [
              "string",
              "null"
            ]
          },
          "comparisonSourceStatus": {
            "description": "Native completeness status for the comparison interval, independently of the current interval.",
            "type": "string"
          },
          "comparisonCompleteness": {
            "description": "Native comparison coverage indication; a numeric change does not establish complete coverage.",
            "type": [
              "string",
              "null"
            ]
          },
          "comparisonAttribution": {
            "description": "Native comparison-period conversion attribution caveat.",
            "type": [
              "string",
              "null"
            ]
          }
        },
        "required": [
          "id",
          "unit",
          "timeBehavior",
          "period",
          "comparisonPeriod",
          "values"
        ],
        "additionalProperties": false
      },
      "description": "Compact metrics in requested order, without raw orders, transactions or source profiles."
    }
  },
  "required": [
    "calculatedAt",
    "results"
  ],
  "additionalProperties": false,
  "$defs": {
    "_mcp2": {
      "type": "object",
      "properties": {
        "preset": {
          "type": "string",
          "description": "Requested preset or the server-selected comparison label."
        },
        "from": {
          "description": "Inclusive UTC instant, or null for explicitly supported all_time.",
          "type": [
            "string",
            "null"
          ]
        },
        "to": {
          "description": "Exclusive UTC instant, or null for explicitly supported all_time.",
          "type": [
            "string",
            "null"
          ]
        },
        "localFrom": {
          "description": "Inclusive calendar date in timeZone.",
          "type": [
            "string",
            "null"
          ]
        },
        "localTo": {
          "$ref": "#/$defs/_mcp0"
        },
        "requestedTo": {
          "$ref": "#/$defs/_mcp1"
        },
        "timeZone": {
          "type": "string",
          "description": "Actual server-resolved IANA timezone used for calendar boundaries, including DST."
        }
      },
      "required": [
        "preset",
        "from",
        "to",
        "localFrom",
        "localTo",
        "timeZone"
      ],
      "additionalProperties": false
    },
    "_mcp0": {
      "description": "Requested exclusive calendar date in timeZone. Current attendance can end earlier at the server clock; requestedTo then preserves the full calendar bound.",
      "type": [
        "string",
        "null"
      ]
    },
    "_mcp1": {
      "description": "Original exclusive calendar-boundary UTC instant when the actual to is clipped to an observed attendance interval.",
      "type": "string"
    }
  }
}