Get a ready-to-import CSV of daily conversation stats per teammate — without writing a single line of code. Claude does all the heavy lifting by querying your Customerly workspace through the MCP server.
What you'll get
A CSV file with one row per teammate per day, covering the last 30 days:
Column | Description |
|---|---|
| Day in YYYY-MM-DD format |
| Assignee name |
| Conversations created that day assigned to this person |
| Messages sent by the teammate in those conversations |
| Conversations last active on that day that are currently closed |
This is ideal for weekly performance reviews, capacity planning, or exporting into your BI tool of choice.
Prerequisites
Claude Code installed and the Customerly MCP server connected
→ Not set up yet? See Connect Customerly to Claude Code via MCP belowA Customerly account with at least one active inbox
How to run it
Open your terminal, start Claude Code, and paste the following prompt:
# Teammate Daily Report
Generate a CSV report with daily conversation stats for the last month per teammate from Customerly MCP.
## CSV columns
- **Date** (YYYY-MM-DD)
- **Teammate/Team** (assignee name)
- **Conversations Assigned** (conversations created on that date assigned to this entity)
- **Replies** (account-type messages sent in those conversations)
- **Closed Conversations** (conversations with last_activity_at on that date that are currently closed)
## How to build it
1. Call `list_inboxes` to get all account IDs/names and team IDs/names.
2. Call `list_conversations` paginated (per_page=50, order=oldest_first) with `created_at_start_time` and `created_at_end_time` for the desired date range. Paginate using `cursor` until null. For each conversation store: `conversation_id`, `assigner.type`, `assigner.id`, `assigner.name`, `created_at`, `is_open`, `last_activity_at`.
3. For each conversation, call `list_conversation_messages` paginated (per_page=50, order=oldest_first). Count messages where `sender_type == "account"`. This gives replies. Use `sender.account_id` and message `date` to attribute replies to specific teammates on specific days.
4. Use `last_activity_at` as a proxy for closed date (no `closed_at` field exists). For conversations where `is_open == false`, convert `last_activity_at` to YYYY-MM-DD and count as closed on that date per assignee.
5. Group everything by (date, assignee) and output the CSV.
Claude will start querying your workspace immediately. Depending on your conversation volume, it may take a few minutes to paginate through all data.
What Claude does behind the scenes
Understanding the steps helps you troubleshoot and adapt the prompt if needed.
1. Discover your inboxes
Claude calls list_inboxes to map all account (teammate) IDs and team IDs to their names. This is what populates the Teammate/Team column.
2. Fetch all conversations
Claude paginates through list_conversations in batches of 50, filtering by the last 30 days. For each conversation it captures the assignee, creation date, open/closed status, and last activity timestamp.
3. Count replies per teammate per day
For every conversation, Claude fetches its messages and counts those sent by account-type senders (i.e., your teammates, not customers). Each reply is attributed to a specific person on a specific day.
4. Approximate closed date
Customerly doesn't expose a closed_at field. Claude uses last_activity_at as a proxy — the timestamp of the last action on the conversation (typically a CSAT rating, an auto-close event, or the teammate's last message).
5. Group and output
All data is aggregated by (date, assignee) and written to a CSV you can open directly in Excel, Google Sheets, or any BI tool.
Adjusting the date range
By default the prompt covers the last 30 days. To change the range, add a line at the top of the prompt:
Use 2024-05-01 to 2024-05-31 as the date range instead of the last 30 days.Or ask Claude interactively after pasting the prompt:
Use the last 7 days only.Known limitations
Team-assigned conversations
If a conversation is assigned to a team rather than an individual, the Teammate/Team column will show the team name. The replies data still reveals who actually responded, but the "Conversations Assigned" count rolls up to the team level, not to individuals.
Closed date is approximatelast_activity_at reflects the last action on a conversation — usually accurate, but it may include CSAT messages or automated close events that happen slightly after a teammate actually resolved the ticket.
Large workspaces take longer
The report requires one API call per conversation page. For workspaces with thousands of conversations per month, expect Claude to take several minutes. You can narrow the date range or filter by a specific inbox to speed things up:
Only include conversations from the "Support" inbox.Saving the CSV
When Claude finishes, it will output the CSV content directly in the terminal. To save it to a file, run Claude Code with output redirection, or simply copy the CSV block and paste it into a new file with a .csv extension.
Alternatively, ask Claude to write it to disk:
Save the output as teammate_report.csv in my current directory.What to do with the report
Once you have the CSV, you can:
Import it into Google Sheets or Excel to build pivot tables by teammate or week
Load it into Looker, Metabase, or Tableau for ongoing reporting
Feed it back to Claude for further analysis:
Here is my teammate_report.csv. Who had the highest reply volume last week? Are there any teammates with a low close rate?