call_crosstab
Build a crosstab matrix of call counts by source and status across multiple sub-accounts, supporting configurable row/column dimensions and date filters.
Instructions
Build a source × status crosstab matrix across sub-accounts.
Fetches calls for the given account_ids + date range and returns a matrix where rows are one dimension (default: source) and columns are another (default: status), with cell values = call counts.
Designed to answer "break down call volume by source and status for accounts X, Y, Z this week" in a single call instead of fanning out multiple filtered disposition reports.
Rows/cols dimensions: source, status, agent, tracking_number, receiving_number, tag, queue, day_of_week, campaign, campaign_id, keyword, ad_group, ad_group_id, ad_network, ad_match_type, medium, paid_source.
The campaign/keyword/ad_group dimensions read CTM's per-call "paid" attribution object (populated for Google/Bing/Meta click-through calls) — this is real ad-platform data, not CTM's own tracking-source label ("source"/"paid_source" above is that CTM label; "paid_source" pulls the ad platform itself, e.g. "google"). For Search traffic, Google sometimes withholds keyword-level text for privacy reasons even when the call is clearly attributable — campaign_id and ad_group_id are numeric IDs and much more reliably populated than the human-readable "campaign"/"keyword" names, so prefer those two when the readable names come back mostly "(not provided)".
Use start_date/end_date (ISO format) or time_duration (e.g. 'today', 'yesterday', 'wtd', 'last7days'). Increase max_calls for accounts with heavy volume.
Pass exclude_status (e.g. 'in progress') to omit in-flight calls for a point-in-time completed-calls view. Live calls that haven't finished ring as 'in progress' — they're counted by default since this is a real-time snapshot, but if you want only terminal states (answered, no answer, failed, etc.), pass exclude_status='in progress'.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| cols | No | status | |
| rows | No | source | |
| end_date | No | ||
| max_calls | No | ||
| start_date | No | ||
| account_ids | No | ||
| time_duration | No | ||
| account_status | No | ||
| exclude_status | No |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |