@tpmjs/tools-health-score-calculate
Calculates a comprehensive customer health score from usage, support, payment, and engagement data. Provides weighted component scores, risk assessment, and actionable recommendations for customer success teams.
Customer must have a non-empty id
Last checked: 3/1/2026, 4:29:54 AM
Test @tpmjs/tools-health-score-calculate (healthScoreCalculateTool) with AI-powered execution
0/2000 characters
Install this tool and use it with the AI SDK
npm install @tpmjs/tools-health-score-calculatepnpm add @tpmjs/tools-health-score-calculateyarn add @tpmjs/tools-health-score-calculatebun add @tpmjs/tools-health-score-calculatedeno add npm:@tpmjs/tools-health-score-calculateimport { healthScoreCalculateTool } from '@tpmjs/tools-health-score-calculate';import { generateText } from 'ai';
import { openai } from '@ai-sdk/openai';
import { healthScoreCalculateTool } from '@tpmjs/tools-health-score-calculate';
const result = await generateText({
model: openai('gpt-4o'),
tools: { healthScoreCalculateTool },
prompt: 'Your prompt here...',
});
console.log(result.text);(customer: { id: string; name: string; usage: { lastLoginDate: string; apiCallsPerDay: number; dailyActiveUsers: number; monthlyActiveUsers: number; featureAdoptionRate: number }; payment: { paymentFailures: number; daysUntilRenewal: number; onTimePaymentRate: number; outstandingBalance: number }; support: { csat: number; openTickets: number; totalTickets: number; escalationRate: number; avgResolutionTime: number } }, weights?: { usage: number; payment: number; support: number; engagement: nu...Available configuration options
customerobjectCustomer data with usage, support, payment, and engagement metrics
weightsobjectComponent weights for health score calculation (must sum to 1.0)
Schema extracted: 3/1/2026, 4:29:53 AM
ERROR: No README data found!
Downloads/month
6
GitHub Stars
0
Quality Score