Skip to content

At risk customer win back drafts with a discount cap

Scores each customer for churn risk, reads their support tickets and your retention playbook to explain why, then drafts a win back email and a CRM task. Drafts are never sent, and any offer above your discount cap is rejected before a person sees it.

SalesWorks with Claude Code · OpenAI Agents SDK+2Community example

What it does

  • Scores churn probability with a risk band and top drivers
  • Searches the customer's tickets and the retention playbook for the likely reasons
  • Drafts a win back email grounded in that context
  • Writes a CRM task for the account owner
  • Rejects drafts offering more than the discount cap or a vague unquantified discount

Your approval boundaries

Approval required

These actions always wait for your yes:

  • Sending the win back email
  • Creating or assigning the CRM task
  • Any discount, which a manager approves

You decide what happens next.

More about this workflow

This setup is for founders and small sales teams who want more time for real conversations. It takes a repeat chore off your plate and hands back something you can check quickly.

First, it scores churn probability with a risk band and top drivers. Next, it searches the customer's tickets and the retention playbook for the likely reasons. Then it drafts a win back email grounded in that context. After that, it writes a CRM task for the account owner. Finally, it rejects drafts offering more than the discount cap or a vague unquantified discount. It works with your CRM, help desk and email, each on its own login with limited access.

You get the prep work done and waiting for you. The agent stops and asks for your yes before sending the win back email, creating or assigning the CRM task and any discount, which a manager approves, and says plainly if a step cannot be undone.

“Drafts are never sent; tasks wait for approval.”
Mayank-jaiswal13 Mayank-jaiswal13 on GitHub · Nov 6, 2026
Before you startCRM · Help desk accessScoped permissionsClaude Code or OpenAI Agents SDK
Explore required tools and model recommendations

Tools and access

  • HubSpot CRM

    Handles the crm part of this job. Grant read scopes, plus notes write.

    API required: Yes. Needs a HubSpot private app or OAuth app with the CRM scopes you choose.

  • Zendesk

    Handles the help desk part of this job. Grant a limited agent seat that writes internal notes.

    API required: Yes. Needs an API token or OAuth client created by a Zendesk admin.

  • Gmail

    Handles the email part of this job. Grant read-only plus compose (drafts) scopes.

    API required: Yes. Needs a Google Cloud project with an OAuth app and the Gmail API turned on. The agent signs in through OAuth with only the scopes you pick.

Official links only. Not sponsored, no affiliate links.

Model recommendations

Best pick

Claude Sonnet 5.5

Good balance of speed and quality for briefs and drafts.

$2 per million input tokens, $10 per million output tokens.

Anthropic docs as of October 11, 2026

Cheaper backup

GPT-6 Luna

Very low cost per token for simple research summaries.

$0.10 per million input tokens, $0.50 per million output tokens, for prompts up to 272K tokens.

OpenAI docs as of October 11, 2026

Our own picks. Not sponsored, no affiliate links.

Build your prompt

Add your details, then copy the prompt into your tool.

1Your details

Fill these in and the prompt updates as you type.

e.g. 20 percent

2Your prompt

4 of 4 still empty
Fill these in before you run it: [CUSTOMER AND USAGE EXPORTS] [RETENTION PLAYBOOK] [DISCOUNT CAP: e.g. 20 percent] [RISK BAND CUTOFFS] You are the At risk customer win back drafts with a discount cap agent. Scores each customer for churn risk, reads their support tickets and your retention playbook to explain why, then drafts a win back email and a CRM task. Drafts are never sent, and any offer above your discount cap is rejected before a person sees it. Use only the details filled in above. If any [BRACKETED] item is still blank or unclear, stop and ask for it first. Do not guess. What you do on your own: - Scores churn probability with a risk band and top drivers - Searches the customer's tickets and the retention playbook for the likely reasons - Drafts a win back email grounded in that context - Writes a CRM task for the account owner - Rejects drafts offering more than the discount cap or a vague unquantified discount What you must never do without a yes from a person: - Sending the win back email - Creating or assigning the CRM task - Any discount, which a manager approves Rules: - Before any step on the list above, stop and ask. Say in plain words what you want to do, who it affects, and whether it can be undone. - If something cannot be undone, say so first, in one short line. - Write drafts, not final actions. A person sends, pays, posts, or deletes. - Keep a short log of every action you took and every source you read. - If you are unsure, ask instead of guessing.
View run instructionsPaste into: Claude Code, OpenAI Agents SDK, LangGraph, n8n

Your answers stay in this browser only.

Run your workflow

Connect your tools with only the access this setup needs, then follow these steps.

Steps

Do these in order. Test on old data before it touches live work.

  1. 1Connect HubSpot CRM with its own login, not yours. Grant read scopes, plus notes write.
  2. 2Connect Zendesk with its own login, not yours. Grant a limited agent seat that writes internal notes.
  3. 3Connect Gmail with its own login, not yours. Grant read-only plus compose (drafts) scopes.
  4. 4Paste the prompt where your harness takes instructions. See the note under the Copy button.
  5. 5Do a dry run on old or test data first. Check every draft and every stop point by hand before you let it near live work.
  6. 6Read its log after the first real run. Only widen access once a week of runs looks clean.

Safeguards and trust score

The score describes this example setup’s access, approval boundaries, ability to undo changes, and scope.

Access18 / 30

Can draft things that send or spend, so it sits close to risky actions.

Human approval30 / 30

Waits for a yes on: sending the win back email, creating or assigning the crm task, any discount, which a manager approves.

Undo and logs14 / 20

Proposes changes to live records, so the setup needs a change log and a way back.

Scope16 / 20

Runs on its own login across 3 tools. Fewer connections means a smaller blast radius.

How to raise it

  • Access: Take away its ability to send, post or spend. Let it only write drafts, and have a person press send or pay from their own account +6
  • Undo and logs: Stop it from editing live records. Have it write the change as a proposal you apply, and keep a log of every change with a way to roll it back +3
  • Scope: Cut it down from 3 connected tools to the 2 it needs most, each with its own limited login instead of your full account +2

Do all of these to reach 89, up from 78.

Want help getting there? Get an AI Trust Audit from Pixeldesigns

Reviewed by Trustcase (example setup). How scoring works

Embed badge

Show this trust score on your site or README. It links back here.

Trustcase trust score badge
Markdown
[![Trustcase trust score for At risk customer win back drafts with a discount cap](https://trustcase.dev/badge/at-risk-customer-win-back-drafts-with-a-discount-cap.svg)](https://trustcase.dev/use-cases/at-risk-customer-win-back-drafts-with-a-discount-cap)
HTML
<a href="https://trustcase.dev/use-cases/at-risk-customer-win-back-drafts-with-a-discount-cap"><img src="https://trustcase.dev/badge/at-risk-customer-win-back-drafts-with-a-discount-cap.svg" alt="Trustcase trust score for At risk customer win back drafts with a discount cap" height="20"></a>
  • Outreach campaigns ranked by good calls, not replies

    Joins your email sequencer with your call recorder so each campaign is judged by the calls it produced, not its reply rate. It also checks whether your lead lists drifted from your ideal customer and drafts a pre call note when someone replies.

  • Nightly at-risk lead review matched to aged stock

    Every night it reviews open leads across your stores, flags the ones going cold or whose wanted item sold, and matches each to the best units sitting in stock, favoring aged ones. Managers get a ranked morning queue of follow up drafts and tasks to approve. Nothing is sent and no stock is moved by the agent.

  • RFP compliance matrix and first draft answers

    Turns a request for proposal into a list of requirements, checks each against what your company can actually deliver, and drafts answers only from that evidence. Gaps go straight to a person and export stays locked until the bid team approves every answer.

  • Event guest list to scored leads with drafts

    After an event, it scores each attendee against your ideal customer, sorts them best first and drafts a first note for each. You read the drafts and send the ones you like yourself.

Other workflows that use the same tools

  • Review request texts after a sale

    Marketing. When a sale or service is marked done, it waits two days and texts the customer a link to leave a review, then one reminder. It checks opt outs first and tells the owner if a text fails.

  • Daily request intake and client progress page

    Operations. Each morning it reads the latest meeting transcript, recent client emails and a drop folder, files every document and turns every request into a task on one list. Before the next meeting it builds a short what's new page from the progress since the last one.

  • Delayed order triage with approval queue

    Ecommerce and resale. When an order is flagged late, the agent reads the order, shipment and customer records, looks up the shipping policy, and decides a severity and resolution with the evidence attached. Low risk cases run on their own and the rest wait in an approval queue before a ticket and customer email go out.