Analytics
Analytics skills let agents generate reports and insights about platform usage, revenue, and performance.
report.analytics
Generate analytics reports with customizable metrics.
{
"skill": "report.analytics",
"input": {
"startDate": "2026-01-01",
"endDate": "2026-12-31",
"metrics": ["revenue", "transaction_count", "success_rate"],
"groupBy": "day"
}
}
Query Parameters
| Parameter | Type | Description |
|---|---|---|
startDate | String | Start date (YYYY-MM-DD) |
endDate | String | End date (YYYY-MM-DD) |
metrics | Array | Metrics to include |
groupBy | String | hour, day, week, month |
channelId | Long | Filter by channel |
currency | String | Filter by currency |
Available Metrics
| Metric | Description |
|---|---|
revenue | Total revenue processed |
transaction_count | Number of transactions |
success_rate | Percentage of successful transactions |
average_amount | Average transaction amount |
refund_rate | Percentage of refunded transactions |
channel_breakdown | Breakdown by payment channel |
Response
{
"code": 200,
"data": {
"metrics": {
"revenue": 4523189,
"transaction_count": 15234,
"success_rate": 0.98
},
"breakdown": [
{
"date": "2026-08-01",
"revenue": 150000,
"transaction_count": 500,
"success_rate": 0.98
}
]
}
}
Code Example
Node.js
const report = await client.skills.report.analytics({
startDate: '2026-01-01',
endDate: '2026-12-31',
metrics: ['revenue', 'transaction_count'],
groupBy: 'month',
});