Home/Tools/@tpmjs/churn-risk-score

churnRiskScoreTool

@tpmjs/churn-risk-score

Scores customer churn risk based on usage, engagement, and support signals. Provides risk score (0-100) with detailed contributing factors and recommendations.

Official
cx
v0.1.1
MIT
⚠️

This tool is currently broken

Execution Failed
Runtime error with test parameters
Customer ID and name are required

Last checked: 2/28/2026, 3:58:13 AM

Interactive Playground

Test @tpmjs/churn-risk-score (churnRiskScoreTool) with AI-powered execution

0/2000 characters

Installation & Usage

Install this tool and use it with the AI SDK

1. Install the package

npm install @tpmjs/churn-risk-score
pnpm add @tpmjs/churn-risk-score
yarn add @tpmjs/churn-risk-score
bun add @tpmjs/churn-risk-score
deno add npm:@tpmjs/churn-risk-score

2. Import the tool

import { churnRiskScoreTool } from '@tpmjs/churn-risk-score';

3. Use with AI SDK

import { generateText } from 'ai';
import { openai } from '@ai-sdk/openai';
import { churnRiskScoreTool } from '@tpmjs/churn-risk-score';

const result = await generateText({
  model: openai('gpt-4o'),
  tools: { churnRiskScoreTool },
  prompt: 'Your prompt here...',
});

console.log(result.text);

AI Agent Integration

How AI agents can use this tool

Use Case

Use this tool to identify at-risk customers, prioritize retention efforts, and proactively reduce churn. Ideal for customer success teams and account managers.

Limitations

Requires comprehensive customer data. Risk scoring is heuristic-based and should be combined with human judgment for critical decisions.

Examples

  • Identify customers at high risk of churning
  • Prioritize outreach for retention campaigns
  • Monitor customer health scores over time

Signature

(customer: { id: string; name: string; npsScore: number; totalSeats: number; billingIssues: boolean }) => Promise<unknown>

Tags

analytics
based
churn
customer
customer-success
cx
engagement
provides
retention
risk
score
scores
signals
support
tpmjs
usage

Parameters

Available configuration options

Auto-extracted
customer
Required
Type: object

Customer data with activity metrics including usage, engagement, and support interactions

Schema extracted: 2/28/2026, 3:58:13 AM

README

ERROR: No README data found!

Statistics

Downloads/month

22

GitHub Stars

0

Quality Score

79%

Bundle Size

NPM Keywords

tpmjs
cx
churn
retention
customer-success
analytics

Maintainers

thomasdavis(thomasalwyndavis@gmail.com)

Frameworks

vercel-ai