# Dataset to Executive Report (`junipr/dataset-to-executive-report`) Actor

Turn structured JSON, CSV, or Apify dataset rows into deterministic executive summaries, KPI rollups, anomalies, recommendations, and Markdown report artifacts.

- **URL**: https://apify.com/junipr/dataset-to-executive-report.md
- **Developed by:** [junipr](https://apify.com/junipr) (community)
- **Categories:** Developer tools
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $6.50 / 1,000 item processeds

This Actor is paid per event. You are not charged for the Apify platform usage, but only a fixed price for specific events.

Learn more: https://docs.apify.com/platform/actors/running/actors-in-store#pay-per-event

## What's an Apify Actor?

Actors are a software tools running on the Apify platform, for all kinds of web data extraction and automation use cases.
In Batch mode, an Actor accepts a well-defined JSON input, performs an action which can take anything from a few seconds to a few hours,
and optionally produces a well-defined JSON output, datasets with results, or files in key-value store.
In Standby mode, an Actor provides a web server which can be used as a website, API, or an MCP server.
Actors are written with capital "A".

## How to integrate an Actor?

If asked about integration, you help developers integrate Actors into their projects.
You adapt to their stack and deliver integrations that are safe, well-documented, and production-ready.
The best way to integrate Actors is as follows.

In JavaScript/TypeScript projects, use official [JavaScript/TypeScript client](https://docs.apify.com/api/client/js.md):

```bash
npm install apify-client
```

In Python projects, use official [Python client library](https://docs.apify.com/api/client/python.md):

```bash
pip install apify-client
```

In shell scripts, use [Apify CLI](https://docs.apify.com/cli/docs.md):

````bash
# MacOS / Linux
curl -fsSL https://apify.com/install-cli.sh | bash
# Windows
irm https://apify.com/install-cli.ps1 | iex
```bash

In AI frameworks, you might use the [Apify MCP server](https://docs.apify.com/platform/integrations/mcp.md).

If your project is in a different language, use the [REST API](https://docs.apify.com/api/v2.md).

For usage examples, see the [API](#api) section below.

For more details, see Apify documentation as [Markdown index](https://docs.apify.com/llms.txt) and [Markdown full-text](https://docs.apify.com/llms-full.txt).


# README

## Dataset to Executive Report

<!-- FIXED_INCLUSIVE_PPE_20260707_START -->
### Store Positioning

**Store title:** Dataset to Executive Report

**Short description:** Turn structured JSON, CSV, or Apify dataset rows into deterministic executive summaries, KPI rollups, anomalies, recommendations, and Markdown report artifacts.

**SEO title:** Dataset to Executive Report — evidence-backed report and intelligence workflow

**SEO description:** Turn structured JSON, CSV, or Apify dataset rows into deterministic executive summaries, KPI rollups, anomalies, recommendations, and Markdown report artifacts. Use it to turn sources into decision-ready rollups, executive summaries, and evidence-backed recommendations.

**Categories:** DEVELOPER_TOOLS

**Keywords:** dataset, executive, report, apify actor, structured data, csv qa, data qa, dataset qa, api testing, premium report/intelligence actor

### Fixed-Inclusive PPE Pricing

This actor uses pay-per-event pricing. Event prices include Apify platform usage; users are not expected to pay a separate platform-usage pass-through charge for the configured pricing model.

- Tier: R1 — Premium report/intelligence actor
- Primary event: `row-analyzed` at $0.00892 base
- Default max charge: $25.00
- Store discounts: FREE/BRONZE base, SILVER discounted, GOLD deepest approved discount

Event set:

- `actor-start`: base $0.02000, GOLD $0.01600. Dataset To Executive Report: charged when actor start is completed. The price includes Apify platform usage; no separate usage pass-through is intended.
- `row-analyzed`: base $0.00892, GOLD $0.00714. Dataset To Executive Report: charged when row analyzed is completed. The price includes Apify platform usage; no separate usage pass-through is intended.
- `finding-emitted`: base $0.00892, GOLD $0.00714. Dataset To Executive Report: charged when finding emitted is completed. The price includes Apify platform usage; no separate usage pass-through is intended.
- `report-section-generated`: base $0.03600, GOLD $0.02880. Dataset To Executive Report: charged when report section generated is completed. The price includes Apify platform usage; no separate usage pass-through is intended.
- `executive-report-generated`: base $0.25000, GOLD $0.20000. Dataset To Executive Report: charged when executive report generated is completed. The price includes Apify platform usage; no separate usage pass-through is intended.

### Public Task Concepts

- Build a Dataset to Executive stakeholder brief from source rows
- Prioritize Dataset to Executive findings with evidence and confidence
- Summarize Dataset to Executive metrics into recommended actions
- Prepare a Dataset to Executive source table with uncertainty notes
- Export Dataset to Executive decision rows for review
<!-- FIXED_INCLUSIVE_PPE_20260707_END -->

Turn structured JSON, CSV, or Apify dataset rows into an executive-ready report: KPI rollups, grouped performance tables, anomaly signals, template-based recommendations, and Markdown/JSON artifacts.

### What does Dataset To Executive Report do?

Dataset To Executive Report converts rows you already have into a decision-ready summary without calling paid LLMs or external APIs. It is built for operators, agencies, founders, and internal automation workflows that need a repeatable report from exports, scraper output, sales tables, support queues, or monitoring datasets.

It produces:

- A single structured dataset row with the complete report.
- Overall KPI rollups with target and previous-period comparisons.
- Ranked group rollups by fields such as region, segment, team, source, or category.
- Rule-based anomaly detection for target misses, adverse changes, and group outliers.
- Deterministic executive summary text, key findings, and recommendations.
- Optional Markdown and JSON report artifacts in the default key-value store.

### Why Use This Actor

| Option | Best For | Output | Setup | Cost Control |
| --- | --- | --- | --- | --- |
| Dataset To Executive Report | Repeatable executive summaries from structured rows | Dataset row plus Markdown/JSON report | Zero-config sample, JSON, CSV, or dataset ID | L1 PPE: $6.50 per 1K processed rows |
| Spreadsheet pivot tables | Manual one-off analysis | Charts or sheets | Manual formulas and formatting | Free, but manual time grows |
| BI dashboard setup | Long-lived dashboards | Interactive dashboard | Requires modeling, permissions, and maintenance | Usually subscription-based |
| Ad-hoc LLM summaries | Narrative drafts | Text summary | Requires prompt design and data handling | Can become expensive and inconsistent |

This actor is intentionally deterministic. The same input produces the same style of report, with no hidden model call, no vendor key, and no scraped external data.

### How to Use

Run it with the default input to see a small revenue report, or provide your own rows.

```json
{
  "reportTitle": "Monthly Revenue Executive Brief",
  "records": [
    {
      "region": "North America",
      "segment": "Enterprise",
      "revenue": 184000,
      "previousRevenue": 166000,
      "pipeline": 312000,
      "conversionRate": 0.18,
      "churnRisk": 0.06
    }
  ],
  "groupBy": ["region", "segment"],
  "includeReport": true,
  "llmMode": "off"
}
````

1. Open the actor input.
2. Paste JSON records, paste CSV text, or provide an Apify dataset ID.
3. Configure KPI metrics if the inferred numeric fields are not enough.
4. Choose grouping fields such as `region`, `segment`, `team`, `source`, or `category`.
5. Run the actor and use the default dataset row or KVS report artifacts.

#### Revenue Brief

Use `revenue`, `previousRevenue`, `pipeline`, `conversionRate`, and `churnRisk` metrics to create a monthly leadership brief.

#### Support Operations Brief

Use fields such as `team`, `priority`, `ticketsClosed`, `slaRate`, `backlog`, and `csat` to summarize service performance.

#### Dataset ID Brief

Provide `datasetId` and a low `maxItems` cap to summarize an existing Apify dataset sample before creating a scheduled reporting task.

### Input Configuration

| Field | Type | Default | Description |
| --- | --- | --- | --- |
| `records` | array | sample revenue rows | Inline JSON object rows. |
| `csvText` | string | empty | CSV-like text with a header row. Used before `records` when provided. |
| `datasetId` | string | empty | Optional Apify dataset ID. Used before inline data when provided. |
| `reportTitle` | string | `Monthly Revenue Executive Brief` | Title for dataset and Markdown output. |
| `reportContext` | string | empty | Optional metadata for your own workflow. No LLM call is made. |
| `audience` | string | `executive` | Audience label. Supported values: `executive`, `operator`, `sales`, `investor`, `board`. |
| `groupBy` | string\[] | `["region", "segment"]` | Fields used for group rollups. |
| `metrics` | array | revenue sample metrics | KPI definitions: field, label, aggregation, format, target, previous field, good direction. |
| `maxItems` | integer | `50` | Maximum source rows to process. Hard cap: 10,000. |
| `topGroups` | integer | `8` | Maximum ranked group rows included. |
| `anomalyThresholdPct` | number | `0.25` | Relative anomaly threshold. `0.25` and `25` both mean 25%. |
| `includeReport` | boolean | `true` | Write Markdown and JSON artifacts after charges succeed. |
| `llmMode` | string | `off` | Only `off` is supported. External LLM calls are disabled. |
| `maxChargeUsd` | number | `10` | Hard run-level PPE cap; stops before paid work or withholds uncharged reports. |
| `debug` | boolean | `false` | Enables additional logs. |

### Output Format

The actor pushes one report row to the default dataset.

```json
{
  "reportId": "7b8f8f899b6df84c",
  "reportTitle": "Monthly Revenue Executive Brief",
  "sourceType": "inline-json",
  "sourceId": "inline-records",
  "rowsProcessed": 5,
  "status": "watch",
  "headline": "Revenue is $489,000, with watch-list items that should be reviewed before decisions are finalized.",
  "executiveSummary": "Processed 5 structured rows into a deterministic executive report...",
  "keyFindings": ["Revenue is $489,000 (+4.5% vs previous) and is classified as watch."],
  "kpis": [],
  "groupRollups": [],
  "anomalies": [],
  "recommendations": [],
  "dataQualityWarnings": [],
  "markdownReport": "# Monthly Revenue Executive Brief\n...",
  "artifactKeys": ["EXECUTIVE_REPORT.md", "EXECUTIVE_REPORT.json"],
  "pricingTemplate": "L1",
  "pricingEventName": "row-analyzed",
  "llmUsed": false
}
```

When `includeReport` is true, the key-value store also contains:

- `EXECUTIVE_REPORT.md`: Human-readable Markdown report.
- `EXECUTIVE_REPORT.json`: Full structured report.
- `EXECUTIVE_REPORT_SUMMARY.json`: Compact run summary.

### Integration Examples

#### Python

```python
from apify_client import ApifyClient

client = ApifyClient("YOUR_APIFY_TOKEN")
run = client.actor("junipr/dataset-to-executive-report").call(run_input={
    "records": [{"region": "EMEA", "revenue": 128000, "previousRevenue": 121000}],
    "metrics": [{
        "field": "revenue",
        "label": "Revenue",
        "aggregation": "sum",
        "format": "currency",
        "previousField": "previousRevenue",
        "goodDirection": "up"
    }],
    "groupBy": ["region"]
})

items = list(client.dataset(run["defaultDatasetId"]).iterate_items())
print(items[0]["headline"])
```

#### Node.js

```js
import { ApifyClient } from 'apify-client';

const client = new ApifyClient({ token: process.env.APIFY_TOKEN });
const run = await client.actor('junipr/dataset-to-executive-report').call({
  csvText: 'region,revenue,previousRevenue\nNorth America,184000,166000\nEMEA,128000,121000',
  groupBy: ['region'],
  includeReport: true,
});

const { items } = await client.dataset(run.defaultDatasetId).listItems();
console.log(items[0].executiveSummary);
```

### Tips and Advanced Usage

#### Metric Configuration

Use `sum` for totals such as revenue, pipeline, leads, tickets, or cost. Use `average` for rates, ratios, percentages, scores, or cycle times. Add `target` and `previousField` when you want target misses and period-over-period change signals.

#### Grouping

Good group fields are low-cardinality dimensions: region, segment, team, priority, source, owner, category, plan, or product line. Avoid grouping by unique IDs because every row will become its own group.

#### LLM Mode

`llmMode` is fixed to `off`. The actor does not call OpenAI, Anthropic, Gemini, or any other external model. If future LLM enhancement is added, it should be separately priced and disabled by default.

#### Data Privacy

This actor does not scrape or enrich data. It only processes rows you provide or datasets your run can access. Do not upload sensitive data unless you are authorized to process it in Apify.

### Limitations

- The report is deterministic and does not call an LLM, so narrative analysis is based only on supplied rows, configured metrics, and local scoring rules.
- It summarizes structured datasets; it does not clean unstructured documents or infer facts not present in the input.
- Large datasets should be sampled or capped with `maxItems` before running because each processed row can be billable in production.
- Recommendations are operational prompts for review, not financial, legal, medical, or compliance advice.

### FAQ

#### Does this actor call an LLM?

No. It is deterministic and returns `llmUsed: false`.

#### Can I use CSV instead of JSON?

Yes. Paste CSV with a header row into `csvText`. Numbers, currency-like values, booleans, and percentages are normalized where possible.

#### What happens if my metrics are not configured?

The actor tries the default revenue-style metrics when those fields exist. Otherwise it infers up to six numeric fields and chooses reasonable formats and aggregations.

#### Are report artifacts written before charges?

No. In production, row-processing charges must succeed before the dataset report row or KVS report artifacts are written.

#### Can this summarize large datasets?

#### Does this modify my source dataset?

No. It reads rows, generates a report, and writes output to the run dataset and key-value store.

### Related Actors

- Dataset QA Auditor
- CSV Deduper Normalizer
- Actor Pricing Simulator
- URL Canonicalizer
- Text Cleaner For RAG

### Changelog

- `1.0.0`: Initial local-first package with deterministic KPI rollups, grouping, anomaly detection, recommendations, Markdown/JSON reports, L1 PPE billing guards, examples, and fixture tests.

# Actor input Schema

## `records` (type: `array`):

Structured object rows to summarize. Leave the default sample for a tiny zero-config run, or replace with rows from your dataset.

## `csvText` (type: `string`):

Optional CSV-like input with a header row. If provided, CSV Text is used instead of Inline JSON Records.

## `datasetId` (type: `string`):

Optional Apify dataset ID to read. If provided, the actor reads from this dataset instead of inline rows or CSV text.

## `reportTitle` (type: `string`):

Title used for the dataset row and Markdown report artifact.

## `reportContext` (type: `string`):

Optional business context for your own tracking. It is accepted as metadata but the report remains deterministic.

## `audience` (type: `string`):

Target audience label for your workflow. The deterministic report format does not call an LLM.

## `groupBy` (type: `array`):

Top-level fields used for group rollups. Leave blank to infer common dimensions such as region and segment.

## `metrics` (type: `array`):

Metric definitions for KPI rollups. If omitted, numeric fields are inferred. Supported aggregations: sum, average, count, min, max.

## `maxItems` (type: `integer`):

Maximum source rows to process. Defaults low so the prefilled run finishes quickly and cheaply.

## `topGroups` (type: `integer`):

Maximum number of ranked group rollups to include.

## `anomalyThresholdPct` (type: `number`):

Relative change threshold for anomaly detection. Use 0.25 for 25%, or 25 for 25%.

## `includeReport` (type: `boolean`):

Store Markdown and JSON report artifacts in the default key-value store after row-processing charges succeed.

## `llmMode` (type: `string`):

Reserved for a future optional LLM enhancement. This actor does not call external LLM APIs and only supports off.

## `maxChargeUsd` (type: `number`):

Hard local spending cap for actor-start, per-item, and report events. The actor stops before work or withholds uncharged output when the next event would exceed this amount.

## `dryRun` (type: `boolean`):

Validate input and write a dry-run summary without PPE charges or dataset output.

## `debug` (type: `boolean`):

Enable additional logs for troubleshooting parsing and metric decisions.

## Actor input object example

```json
{
  "records": [
    {
      "month": "2026-04",
      "region": "North America",
      "segment": "Enterprise",
      "revenue": 184000,
      "previousRevenue": 166000,
      "pipeline": 312000,
      "activeCustomers": 38,
      "conversionRate": 0.18,
      "churnRisk": 0.06
    },
    {
      "month": "2026-04",
      "region": "North America",
      "segment": "SMB",
      "revenue": 62000,
      "previousRevenue": 71000,
      "pipeline": 92000,
      "activeCustomers": 116,
      "conversionRate": 0.12,
      "churnRisk": 0.14
    },
    {
      "month": "2026-04",
      "region": "EMEA",
      "segment": "Enterprise",
      "revenue": 128000,
      "previousRevenue": 121000,
      "pipeline": 206000,
      "activeCustomers": 24,
      "conversionRate": 0.16,
      "churnRisk": 0.08
    },
    {
      "month": "2026-04",
      "region": "EMEA",
      "segment": "SMB",
      "revenue": 44000,
      "previousRevenue": 58000,
      "pipeline": 63000,
      "activeCustomers": 82,
      "conversionRate": 0.09,
      "churnRisk": 0.19
    },
    {
      "month": "2026-04",
      "region": "APAC",
      "segment": "Enterprise",
      "revenue": 71000,
      "previousRevenue": 52000,
      "pipeline": 142000,
      "activeCustomers": 17,
      "conversionRate": 0.21,
      "churnRisk": 0.05
    }
  ],
  "csvText": "",
  "datasetId": "",
  "reportTitle": "Monthly Revenue Executive Brief",
  "reportContext": "",
  "audience": "executive",
  "groupBy": [
    "region",
    "segment"
  ],
  "metrics": [
    {
      "field": "revenue",
      "label": "Revenue",
      "aggregation": "sum",
      "format": "currency",
      "target": 500000,
      "previousField": "previousRevenue",
      "goodDirection": "up"
    },
    {
      "field": "pipeline",
      "label": "Pipeline",
      "aggregation": "sum",
      "format": "currency",
      "goodDirection": "up"
    },
    {
      "field": "activeCustomers",
      "label": "Active Customers",
      "aggregation": "sum",
      "format": "number",
      "goodDirection": "up"
    },
    {
      "field": "conversionRate",
      "label": "Conversion Rate",
      "aggregation": "average",
      "format": "percent",
      "target": 0.15,
      "goodDirection": "up"
    },
    {
      "field": "churnRisk",
      "label": "Churn Risk",
      "aggregation": "average",
      "format": "percent",
      "target": 0.1,
      "goodDirection": "down"
    }
  ],
  "maxItems": 50,
  "topGroups": 8,
  "anomalyThresholdPct": 0.25,
  "includeReport": true,
  "llmMode": "off",
  "maxChargeUsd": 10,
  "dryRun": false,
  "debug": false
}
```

# Actor output Schema

## `report` (type: `string`):

Structured report rows containing KPIs, findings, anomalies, recommendations, and Markdown.

## `markdownReport` (type: `string`):

Human-readable executive report when includeReport is enabled.

## `jsonReport` (type: `string`):

Machine-readable report artifact when includeReport is enabled.

# API

You can run this Actor programmatically using our API. Below are code examples in JavaScript, Python, and CLI, as well as the OpenAPI specification and MCP server setup.

## JavaScript example

```javascript
import { ApifyClient } from 'apify-client';

// Initialize the ApifyClient with your Apify API token
// Replace the '<YOUR_API_TOKEN>' with your token
const client = new ApifyClient({
    token: '<YOUR_API_TOKEN>',
});

// Prepare Actor input
const input = {};

// Run the Actor and wait for it to finish
const run = await client.actor("junipr/dataset-to-executive-report").call(input);

// Fetch and print Actor results from the run's dataset (if any)
console.log('Results from dataset');
console.log(`💾 Check your data here: https://console.apify.com/storage/datasets/${run.defaultDatasetId}`);
const { items } = await client.dataset(run.defaultDatasetId).listItems();
items.forEach((item) => {
    console.dir(item);
});

// 📚 Want to learn more 📖? Go to → https://docs.apify.com/api/client/js/docs

```

## Python example

```python
from apify_client import ApifyClient

# Initialize the ApifyClient with your Apify API token
# Replace '<YOUR_API_TOKEN>' with your token.
client = ApifyClient("<YOUR_API_TOKEN>")

# Prepare the Actor input
run_input = {}

# Run the Actor and wait for it to finish
run = client.actor("junipr/dataset-to-executive-report").call(run_input=run_input)

# Fetch and print Actor results from the run's dataset (if there are any)
print("💾 Check your data here: https://console.apify.com/storage/datasets/" + run["defaultDatasetId"])
for item in client.dataset(run["defaultDatasetId"]).iterate_items():
    print(item)

# 📚 Want to learn more 📖? Go to → https://docs.apify.com/api/client/python/docs/quick-start

```

## CLI example

```bash
echo '{}' |
apify call junipr/dataset-to-executive-report --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "command": "npx",
            "args": [
                "mcp-remote",
                "https://mcp.apify.com/?tools=junipr/dataset-to-executive-report",
                "--header",
                "Authorization: Bearer <YOUR_API_TOKEN>"
            ]
        }
    }
}

```

## OpenAPI specification

```json
{
    "openapi": "3.0.1",
    "info": {
        "title": "Dataset to Executive Report",
        "description": "Turn structured JSON, CSV, or Apify dataset rows into deterministic executive summaries, KPI rollups, anomalies, recommendations, and Markdown report artifacts.",
        "version": "1.0",
        "x-build-id": "kIh12ROy8XXliGAfl"
    },
    "servers": [
        {
            "url": "https://api.apify.com/v2"
        }
    ],
    "paths": {
        "/acts/junipr~dataset-to-executive-report/run-sync-get-dataset-items": {
            "post": {
                "operationId": "run-sync-get-dataset-items-junipr-dataset-to-executive-report",
                "x-openai-isConsequential": false,
                "summary": "Executes an Actor, waits for its completion, and returns Actor's dataset items in response.",
                "tags": [
                    "Run Actor"
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/inputSchema"
                            }
                        }
                    }
                },
                "parameters": [
                    {
                        "name": "token",
                        "in": "query",
                        "required": true,
                        "schema": {
                            "type": "string"
                        },
                        "description": "Enter your Apify token here"
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK"
                    }
                }
            }
        },
        "/acts/junipr~dataset-to-executive-report/runs": {
            "post": {
                "operationId": "runs-sync-junipr-dataset-to-executive-report",
                "x-openai-isConsequential": false,
                "summary": "Executes an Actor and returns information about the initiated run in response.",
                "tags": [
                    "Run Actor"
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/inputSchema"
                            }
                        }
                    }
                },
                "parameters": [
                    {
                        "name": "token",
                        "in": "query",
                        "required": true,
                        "schema": {
                            "type": "string"
                        },
                        "description": "Enter your Apify token here"
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/runsResponseSchema"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/acts/junipr~dataset-to-executive-report/run-sync": {
            "post": {
                "operationId": "run-sync-junipr-dataset-to-executive-report",
                "x-openai-isConsequential": false,
                "summary": "Executes an Actor, waits for completion, and returns the OUTPUT from Key-value store in response.",
                "tags": [
                    "Run Actor"
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/inputSchema"
                            }
                        }
                    }
                },
                "parameters": [
                    {
                        "name": "token",
                        "in": "query",
                        "required": true,
                        "schema": {
                            "type": "string"
                        },
                        "description": "Enter your Apify token here"
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK"
                    }
                }
            }
        }
    },
    "components": {
        "schemas": {
            "inputSchema": {
                "type": "object",
                "properties": {
                    "records": {
                        "title": "Inline JSON Records",
                        "type": "array",
                        "description": "Structured object rows to summarize. Leave the default sample for a tiny zero-config run, or replace with rows from your dataset.",
                        "items": {
                            "type": "object"
                        },
                        "default": [
                            {
                                "month": "2026-04",
                                "region": "North America",
                                "segment": "Enterprise",
                                "revenue": 184000,
                                "previousRevenue": 166000,
                                "pipeline": 312000,
                                "activeCustomers": 38,
                                "conversionRate": 0.18,
                                "churnRisk": 0.06
                            },
                            {
                                "month": "2026-04",
                                "region": "North America",
                                "segment": "SMB",
                                "revenue": 62000,
                                "previousRevenue": 71000,
                                "pipeline": 92000,
                                "activeCustomers": 116,
                                "conversionRate": 0.12,
                                "churnRisk": 0.14
                            },
                            {
                                "month": "2026-04",
                                "region": "EMEA",
                                "segment": "Enterprise",
                                "revenue": 128000,
                                "previousRevenue": 121000,
                                "pipeline": 206000,
                                "activeCustomers": 24,
                                "conversionRate": 0.16,
                                "churnRisk": 0.08
                            },
                            {
                                "month": "2026-04",
                                "region": "EMEA",
                                "segment": "SMB",
                                "revenue": 44000,
                                "previousRevenue": 58000,
                                "pipeline": 63000,
                                "activeCustomers": 82,
                                "conversionRate": 0.09,
                                "churnRisk": 0.19
                            },
                            {
                                "month": "2026-04",
                                "region": "APAC",
                                "segment": "Enterprise",
                                "revenue": 71000,
                                "previousRevenue": 52000,
                                "pipeline": 142000,
                                "activeCustomers": 17,
                                "conversionRate": 0.21,
                                "churnRisk": 0.05
                            }
                        ]
                    },
                    "csvText": {
                        "title": "CSV Text",
                        "type": "string",
                        "description": "Optional CSV-like input with a header row. If provided, CSV Text is used instead of Inline JSON Records.",
                        "default": ""
                    },
                    "datasetId": {
                        "title": "Apify Dataset ID",
                        "type": "string",
                        "description": "Optional Apify dataset ID to read. If provided, the actor reads from this dataset instead of inline rows or CSV text.",
                        "default": ""
                    },
                    "reportTitle": {
                        "title": "Report Title",
                        "type": "string",
                        "description": "Title used for the dataset row and Markdown report artifact.",
                        "default": "Monthly Revenue Executive Brief"
                    },
                    "reportContext": {
                        "title": "Report Context",
                        "type": "string",
                        "description": "Optional business context for your own tracking. It is accepted as metadata but the report remains deterministic.",
                        "default": ""
                    },
                    "audience": {
                        "title": "Audience",
                        "enum": [
                            "executive",
                            "operator",
                            "sales",
                            "investor",
                            "board"
                        ],
                        "type": "string",
                        "description": "Target audience label for your workflow. The deterministic report format does not call an LLM.",
                        "default": "executive"
                    },
                    "groupBy": {
                        "title": "Group By Fields",
                        "type": "array",
                        "description": "Top-level fields used for group rollups. Leave blank to infer common dimensions such as region and segment.",
                        "items": {
                            "type": "string"
                        },
                        "default": [
                            "region",
                            "segment"
                        ]
                    },
                    "metrics": {
                        "title": "Metrics",
                        "type": "array",
                        "description": "Metric definitions for KPI rollups. If omitted, numeric fields are inferred. Supported aggregations: sum, average, count, min, max.",
                        "items": {
                            "type": "object",
                            "properties": {
                                "field": {
                                    "title": "Field",
                                    "description": "Source row field name used for this metric.",
                                    "type": "string"
                                },
                                "label": {
                                    "title": "Label",
                                    "description": "Human-readable metric label in the generated report.",
                                    "type": "string"
                                },
                                "aggregation": {
                                    "title": "Aggregation",
                                    "description": "Aggregation method used for this metric.",
                                    "type": "string",
                                    "enum": [
                                        "sum",
                                        "average",
                                        "count",
                                        "min",
                                        "max"
                                    ]
                                },
                                "format": {
                                    "title": "Format",
                                    "description": "Display format for the metric value.",
                                    "type": "string",
                                    "enum": [
                                        "number",
                                        "currency",
                                        "percent"
                                    ]
                                },
                                "target": {
                                    "title": "Target",
                                    "description": "Optional target value used for gap and status calculations.",
                                    "type": "number"
                                },
                                "previousField": {
                                    "title": "Previous Field",
                                    "description": "Optional source row field containing the prior-period value.",
                                    "type": "string"
                                },
                                "goodDirection": {
                                    "title": "Good Direction",
                                    "description": "Whether higher, lower, or neutral movement is preferable.",
                                    "type": "string",
                                    "enum": [
                                        "up",
                                        "down",
                                        "neutral"
                                    ]
                                },
                                "precision": {
                                    "title": "Precision",
                                    "description": "Decimal places used when formatting this metric.",
                                    "type": "integer",
                                    "minimum": 0,
                                    "maximum": 4
                                }
                            }
                        },
                        "default": [
                            {
                                "field": "revenue",
                                "label": "Revenue",
                                "aggregation": "sum",
                                "format": "currency",
                                "target": 500000,
                                "previousField": "previousRevenue",
                                "goodDirection": "up"
                            },
                            {
                                "field": "pipeline",
                                "label": "Pipeline",
                                "aggregation": "sum",
                                "format": "currency",
                                "goodDirection": "up"
                            },
                            {
                                "field": "activeCustomers",
                                "label": "Active Customers",
                                "aggregation": "sum",
                                "format": "number",
                                "goodDirection": "up"
                            },
                            {
                                "field": "conversionRate",
                                "label": "Conversion Rate",
                                "aggregation": "average",
                                "format": "percent",
                                "target": 0.15,
                                "goodDirection": "up"
                            },
                            {
                                "field": "churnRisk",
                                "label": "Churn Risk",
                                "aggregation": "average",
                                "format": "percent",
                                "target": 0.1,
                                "goodDirection": "down"
                            }
                        ]
                    },
                    "maxItems": {
                        "title": "Maximum Rows",
                        "minimum": 1,
                        "maximum": 10000,
                        "type": "integer",
                        "description": "Maximum source rows to process. Defaults low so the prefilled run finishes quickly and cheaply.",
                        "default": 50
                    },
                    "topGroups": {
                        "title": "Top Groups",
                        "minimum": 1,
                        "maximum": 50,
                        "type": "integer",
                        "description": "Maximum number of ranked group rollups to include.",
                        "default": 8
                    },
                    "anomalyThresholdPct": {
                        "title": "Anomaly Threshold",
                        "minimum": 0.05,
                        "maximum": 100,
                        "type": "number",
                        "description": "Relative change threshold for anomaly detection. Use 0.25 for 25%, or 25 for 25%.",
                        "default": 0.25
                    },
                    "includeReport": {
                        "title": "Write Report Artifacts",
                        "type": "boolean",
                        "description": "Store Markdown and JSON report artifacts in the default key-value store after row-processing charges succeed.",
                        "default": true
                    },
                    "llmMode": {
                        "title": "LLM Mode",
                        "enum": [
                            "off"
                        ],
                        "type": "string",
                        "description": "Reserved for a future optional LLM enhancement. This actor does not call external LLM APIs and only supports off.",
                        "default": "off"
                    },
                    "maxChargeUsd": {
                        "title": "Maximum Charge (USD)",
                        "minimum": 0,
                        "maximum": 1000,
                        "type": "number",
                        "description": "Hard local spending cap for actor-start, per-item, and report events. The actor stops before work or withholds uncharged output when the next event would exceed this amount.",
                        "default": 10
                    },
                    "dryRun": {
                        "title": "Dry Run",
                        "type": "boolean",
                        "description": "Validate input and write a dry-run summary without PPE charges or dataset output.",
                        "default": false
                    },
                    "debug": {
                        "title": "Debug Logging",
                        "type": "boolean",
                        "description": "Enable additional logs for troubleshooting parsing and metric decisions.",
                        "default": false
                    }
                }
            },
            "runsResponseSchema": {
                "type": "object",
                "properties": {
                    "data": {
                        "type": "object",
                        "properties": {
                            "id": {
                                "type": "string"
                            },
                            "actId": {
                                "type": "string"
                            },
                            "userId": {
                                "type": "string"
                            },
                            "startedAt": {
                                "type": "string",
                                "format": "date-time",
                                "example": "2025-01-08T00:00:00.000Z"
                            },
                            "finishedAt": {
                                "type": "string",
                                "format": "date-time",
                                "example": "2025-01-08T00:00:00.000Z"
                            },
                            "status": {
                                "type": "string",
                                "example": "READY"
                            },
                            "meta": {
                                "type": "object",
                                "properties": {
                                    "origin": {
                                        "type": "string",
                                        "example": "API"
                                    },
                                    "userAgent": {
                                        "type": "string"
                                    }
                                }
                            },
                            "stats": {
                                "type": "object",
                                "properties": {
                                    "inputBodyLen": {
                                        "type": "integer",
                                        "example": 2000
                                    },
                                    "rebootCount": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "restartCount": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "resurrectCount": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "computeUnits": {
                                        "type": "integer",
                                        "example": 0
                                    }
                                }
                            },
                            "options": {
                                "type": "object",
                                "properties": {
                                    "build": {
                                        "type": "string",
                                        "example": "latest"
                                    },
                                    "timeoutSecs": {
                                        "type": "integer",
                                        "example": 300
                                    },
                                    "memoryMbytes": {
                                        "type": "integer",
                                        "example": 1024
                                    },
                                    "diskMbytes": {
                                        "type": "integer",
                                        "example": 2048
                                    }
                                }
                            },
                            "buildId": {
                                "type": "string"
                            },
                            "defaultKeyValueStoreId": {
                                "type": "string"
                            },
                            "defaultDatasetId": {
                                "type": "string"
                            },
                            "defaultRequestQueueId": {
                                "type": "string"
                            },
                            "buildNumber": {
                                "type": "string",
                                "example": "1.0.0"
                            },
                            "containerUrl": {
                                "type": "string"
                            },
                            "usage": {
                                "type": "object",
                                "properties": {
                                    "ACTOR_COMPUTE_UNITS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATASET_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATASET_WRITES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "KEY_VALUE_STORE_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "KEY_VALUE_STORE_WRITES": {
                                        "type": "integer",
                                        "example": 1
                                    },
                                    "KEY_VALUE_STORE_LISTS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "REQUEST_QUEUE_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "REQUEST_QUEUE_WRITES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATA_TRANSFER_INTERNAL_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATA_TRANSFER_EXTERNAL_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "PROXY_RESIDENTIAL_TRANSFER_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "PROXY_SERPS": {
                                        "type": "integer",
                                        "example": 0
                                    }
                                }
                            },
                            "usageTotalUsd": {
                                "type": "number",
                                "example": 0.00005
                            },
                            "usageUsd": {
                                "type": "object",
                                "properties": {
                                    "ACTOR_COMPUTE_UNITS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATASET_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATASET_WRITES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "KEY_VALUE_STORE_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "KEY_VALUE_STORE_WRITES": {
                                        "type": "number",
                                        "example": 0.00005
                                    },
                                    "KEY_VALUE_STORE_LISTS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "REQUEST_QUEUE_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "REQUEST_QUEUE_WRITES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATA_TRANSFER_INTERNAL_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATA_TRANSFER_EXTERNAL_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "PROXY_RESIDENTIAL_TRANSFER_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "PROXY_SERPS": {
                                        "type": "integer",
                                        "example": 0
                                    }
                                }
                            }
                        }
                    }
                }
            }
        }
    }
}
```
