
How to automate Customer Success with Claude Code
Author: Josh Earle
Last updated
Learn how to automate customer success workflows using Claude Code and Outlit. Five ready-to-run workflows with prompt templates: churn risk triage, expansion identification, QBR prep, escalation response, and weekly CS reporting.
You can automate customer success by connecting your CS data sources to a context layer like Outlit, then running AI agents through Claude Code that query customer context before taking action. This guide covers five workflows you can set up today: churn risk triage, expansion identification, QBR prep, escalation response, and weekly CS reporting. Each workflow includes a ready-to-use prompt template and a complete CLAUDE.md you can drop into a project.
The CS platform is the wrong layer to fix
Your CS team doesn't have a tooling problem. They have a context problem.
Before a CSM can decide what to do with an account, they have to assemble a picture of that account. Last interaction in Intercom. Health score in your sales tool. Usage drop in your product analytics. Open ticket in Jira. Notes from the last call in Notion. That assembly work, pulling context from six places and synthesizing it, is most of what a CS job actually is. According to Gainsight's 2024 CS survey, CSMs spend over 60% of their time gathering and synthesizing data rather than acting on it. The decision itself takes thirty seconds. The context work takes an hour.
Every CS platform sold over the last decade has tried to solve this by centralizing the data into a dashboard. That helps, but it doesn't remove the work. A human still has to log in, navigate, read, and synthesize. The platform made it faster to gather context. It didn't eliminate the need to gather it.
This guide takes a different approach. Instead of making context easier for humans to gather, you make context available to agents before they act. The agent does the synthesis. The human gets the output and makes the call.
- Open Intercom, filter by last active date, scan for quiet accounts
- Cross-reference your sales tool to check health scores
- Pull usage data from your product analytics dashboard
- Check Jira for any open tickets per account
- Write up a triage doc and share it in Slack
- ~90 minutes before the first decision gets made
- Open Slack
- The triage is already there, compiled and ranked
- Each flagged account has a context summary and a recommended action
- The CSM reviews, picks up the phone, or delegates
- ~5 minutes from Slack open to first action taken
By the end of this guide, you'll have a CLAUDE.md and five prompt templates you can copy into a Claude Code project and run today.
What Outlit does
Outlit connects to your existing stack (Intercom, Stripe, PostHog, Jira, your product database) and resolves all of those records into a single customer profile. One customer, one profile, regardless of how fragmented your data sources are. When an agent needs context, it queries Outlit instead of calling five APIs and assembling the picture itself.
How Outlit works. Connect your data sources once (support, billing, product analytics). Outlit resolves every record to an account-level profile and keeps it current. Agents query the profile via API or MCP before taking any action.
How it works with Claude Code
The CLAUDE.md file tells Claude Code what to do: when to query Outlit, what to produce, and what to surface to a human before taking action. Write it once, and the agent follows it every time it runs.
The pattern is always the same: query context first, then act.
# Every workflow follows this pattern 1. Claude Code runs (manual, scheduled, or triggered by webhook) 2. Reads CLAUDE.md (role, scope, workflow instructions) 3. Queries Outlit API (customer ID or account list) 4. Receives unified customer profile (interactions, signals, history) 5. Reasons over context (risk? expansion? action needed?) 6. Produces output (Slack message, draft email, updated record) 7. Surfaces to human if decision required
Five CS workflows you can run through Claude Code today
Each of these workflows follows the same pattern: Claude Code queries Outlit for context, reasons over it, and surfaces an output. No dashboard. No manual triage. A human only gets involved at the decision point.
Schedule Claude Code to run every Monday using /schedule or a cron job. It pulls your full account list from Outlit, flags anything that looks like a churn signal (usage drop, no activity in 14+ days, support volume spike, missed QBR), and posts a prioritized list with recommended actions to your #cs-risk Slack channel via Outlit's Slack integration.
- → Query Outlit for accounts active in last 90 days
- → Score each account against churn signal criteria
- → Rank by risk level, flag top 5 for immediate action
- → Draft recommended next action per flagged account
- → Post to #cs-risk with context summary per account
Claude Code queries Outlit for accounts showing expansion signals: usage at 80%+ of plan limits, team growth, new use cases appearing in interaction history, positive sentiment in recent conversations. It surfaces the top candidates with a draft outreach message per account, ready to send or modify.
- → Query Outlit for usage and interaction signals
- → Identify accounts hitting plan thresholds or showing growth
- → Cross-reference against recent CSM conversation tone
- → Draft personalized expansion outreach per account
- → Post to #cs-expansion with draft copy attached
Before any QBR, a CSM prompts Claude Code with the account name. It queries Outlit for the full account history, including interactions since last QBR, usage trends, open issues, milestones hit, and any risk signals, then produces a structured briefing document. The CSM walks in already knowing the story. The QBR prep that used to take two hours takes five minutes.
- → Query Outlit for account history since last QBR
- → Summarize usage trends, milestones, and open issues
- → Flag any risks or topics that need direct address
- → Produce structured briefing: wins, risks, agenda suggestions
- → Post to #cs-qbr or DM the owning CSM directly
When a high-priority ticket comes in, a webhook triggers Claude Code to run. It queries Outlit for the full account context: who this customer is, their history, similar past issues, and what was promised in the last interaction. It drafts a response grounded in real account data and flags it to the owning CSM in Slack before anything gets sent.
- → Trigger on ticket creation above priority threshold
- → Query Outlit for account context and interaction history
- → Draft response grounded in actual account history
- → Flag owning CSM in Slack with draft + context summary
- → Human approves, edits, or overrides before anything sends
Schedule a Friday afternoon run. Claude Code queries Outlit across your entire account base and compiles the week in CS: accounts that moved positively, accounts that deteriorated, support volume, key wins, and risks going into the following week. It posts to #cs-weekly via Outlit's Slack integration.
- → Query Outlit for all account activity in the past 7 days
- → Identify accounts with meaningful movement in either direction
- → Summarize support volume, NPS signals, and open escalations
- → Call out top wins and top risks for the following week
- → Post formatted report to #cs-weekly every Friday at 4pm
How to set this up
You need three things: an Outlit account with at least one connector active, Claude Code installed, and an API key to connect them. The setup is done once. After that, the agent runs the workflows.
Step 0: Install Claude Code. If you don't have it yet, run this in your terminal. You'll need Node.js 18 or higher.
npm install -g @anthropic-ai/claude-code # Verify install claude --version
Step 1: Connect your first data source. Log into Outlit, go to Connectors, and connect your primary CS tool, usually Intercom. Outlit will start building customer profiles immediately. You don't need all your sources connected before you start. One connector is enough to run the first workflow.
Step 2: Add Outlit to Claude Code via MCP. Run this in your terminal:
# Add Outlit as an MCP server in Claude Code claude mcp add outlit \ --transport http https://mcp.outlit.ai/mcp \ --header "Authorization: Bearer YOUR_API_KEY" # Verify the connection claude mcp list
Step 3: Create your project and write a CLAUDE.md. Create a new directory for your CS agent project. The CLAUDE.md is the file that tells Claude Code what it's supposed to do. Part 2 of this guide gives you a complete one you can use as a starting point.
Step 3b: Connect Slack. If you want agents to post outputs to Slack channels, enable Outlit's Slack integration in the console. This lets agents surface triage results, QBR briefings, and weekly reports directly to channels like #cs-risk or #cs-weekly.
Step 4: Run your first workflow. Start with the churn risk triage. It's the clearest signal of whether context is flowing correctly. If the output is specific and grounded in real account data, the setup is working. If it's generic, check your connector and API key.
Step 5: Schedule recurring workflows. Use Claude Code's /schedule command or a cron job to automate the Monday triage and Friday standup report. For ticket-triggered workflows like escalation response, set up a webhook from your support tool to kick off Claude Code when a high-priority ticket is created.
What to expect on first run. The first output will be imperfect. The CLAUDE.md will need tuning: the output format, the signal criteria, the way it handles edge cases. That's normal. Treat the first week as calibration. Most teams get to a workflow they trust within three to five runs.
What to watch out for
The more connectors you have active in Outlit, the richer the agent's context. Start with one connector and add more as you see gaps in the output.
Every workflow in this guide ends with a human in the loop. An agent can draft an escalation response, but a human should send it. An agent can flag a churn risk, but a human should make the call. Be explicit in your CLAUDE.md about where the agent stops and where the human picks up.
You'll know it's working when your CS team stops spending time gathering context and starts spending time on the decision itself. If QBR prep drops from two hours to five minutes, it's working.
Get started with the CLAUDE.md
Copy the CLAUDE.md below into your project to get started. It contains the agent's role, instructions for querying Outlit, and all five workflow definitions. Below it are individual prompt templates you can run as-is, with variables to swap out per account.
# CS Operations Agent ## Role You are a CS operations agent for this company. Your job is to surface customer context, identify risks and opportunities, and produce outputs that help CSMs take action faster. You do not make consequential decisions autonomously. You produce recommendations, drafts, and summaries. Humans approve before anything gets sent or logged. ## How to use Outlit Before responding to any customer-related request, query Outlit via MCP. Do not reason from memory or general knowledge about a customer. Always fetch the current context first. When querying, pass the canonical customer ID or company name. Outlit will return the unified profile: interaction history, usage signals, account health, open tickets, and CSM notes. If Outlit returns incomplete data, note what's missing in your output. Do not fabricate context to fill gaps. ## Output principles - Be specific. Every recommendation should reference something real from the customer's context. - Be brief. A CSM reading your output in Slack should understand the situation and the recommended action in under 60 seconds. - Be clear about confidence. If the signal is weak, say so. - Never send, post, or log anything without explicit human approval. ## What you should never do autonomously - Send an email or message to a customer - Update a customer record without human confirmation - Escalate a ticket on behalf of a CSM - Mark an account as churned or at-risk in any system of record - Share customer data outside of the designated Slack channels ## Workflow instructions ### Churn risk triage (Monday) 1. Query Outlit for all accounts active in the last 90 days 2. For each account, evaluate: last interaction date, usage trend (last 30 days vs prior 30), support ticket volume, QBR recency 3. Flag any account where two or more signals are negative 4. Rank flagged accounts by severity 5. For each flagged account: write a 2-sentence context summary and a single recommended next action 6. Post to #cs-risk in Slack. Format: account name, risk level, context summary, recommended action. ### Expansion identification (Weekly) 1. Query Outlit for accounts showing: usage at 80%+ of plan limits, team member growth, new use cases in interaction history, positive NPS or CSAT signals in last 60 days 2. Cross-reference: is the account in an active renewal or renewal risk conversation? If yes, exclude from expansion outreach. 3. For each candidate: draft a short, specific outreach message grounded in their actual usage context. No generic upsell copy. 4. Post to #cs-expansion. Format: account name, signal summary, draft outreach message. ### QBR prep briefing (On demand) 1. Query Outlit for all account activity since the last QBR date 2. Summarize: usage trends, milestones hit, open issues, support volume, any commitments made in previous interactions 3. Flag: any topic that needs direct address in the QBR, any risk that the CSM should be prepared to discuss 4. Produce: structured briefing with sections for Wins, Risks, Open items, and Suggested agenda points 5. Post to #cs-qbr or DM the owning CSM. Keep it under one page. ### Escalation response (Triggered) 1. When triggered by a high-priority ticket: query Outlit immediately for the customer's full context 2. Note: account tier, relationship history, tone of recent interactions, any prior escalations and how they were resolved 3. Draft a response that acknowledges the specific issue, references any relevant history, and outlines next steps 4. Do not generalize. The draft should read like it was written by someone who knows this customer well. 5. Flag the owning CSM in Slack with the draft + a 3-bullet context summary. Human sends or modifies. ### Weekly CS standup report (Friday) 1. Query Outlit for all account activity in the past 7 days 2. Identify accounts that moved positively (usage up, positive interaction, issue resolved) and negatively (usage drop, negative interaction, new risk signal) 3. Compile: support volume summary, NPS movement if available, open escalations, notable wins 4. Write top 3 risks going into the following week with one-sentence context each 5. Post to #cs-weekly every Friday at 4pm. Keep it scannable. No wall of text. Bullets and headers only.
Prompt templates
Variables in gold are yours to swap out. Everything else runs as written.
Run the weekly churn risk triage. Query Outlit for all accounts that have been active in the last 90 days. Evaluate each account against the criteria in CLAUDE.md. Flag any account where two or more signals are negative. Post the results to #cs-risk in Slack. For each flagged account, include: account name, risk level (high / medium), a 2-sentence context summary, and one recommended next action. Today is [date]. Do not action anything without my confirmation.
Run the expansion identification workflow.
Query Outlit for accounts showing expansion signals as defined in
CLAUDE.md. Exclude any account currently in renewal risk conversations.
For each candidate, draft a short outreach message grounded in their
actual usage context. Not generic copy. Reference something specific
from their Outlit profile.
Post to #cs-expansion. Include: account name, signal summary,
draft message. Flag me before anything gets sent.
Prepare a QBR briefing for [account name]. Their last QBR was on [date]. Query Outlit for all activity since then. Produce a structured briefing with four sections: - Wins since last QBR - Open risks or issues to address - Open items or commitments from last time - Suggested agenda points Keep it under one page. I want to be able to read it in five minutes and walk into the QBR fully prepared.
A high-priority ticket just came in from [account name]. Ticket summary: [paste ticket text here] Query Outlit for their full context before drafting anything. Look at: interaction history, prior escalations and resolution, account tier, and tone of recent conversations. Draft a response that reads like it was written by someone who knows this customer. Reference their history where relevant. Don't be generic. Post the draft to Slack and tag me. I'll review and send.
Compile the weekly CS standup report for the week ending [date]. Query Outlit for all account activity in the past 7 days. Identify accounts that moved positively and negatively. Summarize support volume and any notable NPS or CSAT movement. Write a report with these sections: - Accounts to watch (top 3 risks going into next week) - Wins this week - Support summary - Open escalations Post to #cs-weekly. Keep it scannable. Bullets and headers only. No wall of text.
Frequently asked questions
How do I automate customer success with AI agents?
Connect your CS data sources (support, billing, product analytics) to a customer context platform like Outlit. Then use an AI agent like Claude Code with a CLAUDE.md that defines your workflows: churn risk triage, expansion identification, QBR prep, escalation response, and weekly reporting. The agent queries customer context before every action and surfaces outputs to Slack for human review.
Can Claude Code replace a CS platform?
Claude Code doesn't replace your existing tools. It sits on top of them. Your support tool, billing system, and analytics stay where they are. Outlit unifies the data from those tools into a single customer profile, and Claude Code queries that profile to run workflows. The difference is that instead of a CSM manually checking five dashboards, the agent does the context work and the CSM makes the decision.
What data sources does Outlit connect to?
Outlit connects to support tools (Intercom, Zendesk), billing platforms (Stripe), product analytics (PostHog, Amplitude), project management tools (Jira), and more. Each connector resolves records to a single account-level customer profile that agents can query via API or MCP.
How long does it take to set up?
The initial setup takes about 30 minutes: install Claude Code, connect your first data source in Outlit, add Outlit as an MCP server, and write your CLAUDE.md. The first workflow runs immediately after setup. Most teams spend the first week calibrating output quality by tuning the CLAUDE.md instructions.
Do I need to know how to code?
No. The setup involves running a few terminal commands and writing a CLAUDE.md file in plain English. The prompt templates in this guide are ready to use as-is. If you can write clear instructions for a person, you can write a CLAUDE.md for an agent.