# KlearFlow Revenue Recovery Decision Engine

> KlearFlow Revenue Recovery Decision Engine is a paid API for AI agents from klearflow.vercel.app, paid per call via x402, $0.05/call, status unknown (last checked 2026-11-03).

Analyzes a revenue loss event (missed call, stale lead, failed payment, etc.) and returns a prioritized, channel-specific recovery action with economic modeling of recoverability.

## Facts

- Endpoint: POST https://klearflow.vercel.app/api/relay/v1/recover-revenue?utm_source=zero.xyz
- Price: $0.05/call
- Payment: x402
- Status: unknown
- Last checked: 2026-11-03
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/klearflow-revenue-recovery-decision-engine-11606300
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_34a8Qzi_1HHfIG_qcCGEp

Status and success rate cover calls made through Zero and Zero's own probes. Third-party monitors may report differently.

## How to call it through Zero

Zero handles the 402 payment challenge and records the run. With the Zero CLI installed (`npm i -g @zeroxyz/cli`):

```sh
zero fetch --capability klearflow-revenue-recovery-decision-engine-11606300 -d '<json body>'
```

Example prompt: A customer named Sam missed a call to my HVAC business, Comfort Air Solutions, about 8 minutes ago — the job is worth roughly $1,200 and this is the first time we've tried to reach them. What's the best way to recover this and what should I say via SMS?

## When to prefer this

Choose this endpoint when you need a data-driven, economics-aware recommendation for how to recover a specific revenue loss event in real time. It is preferable to generic CRM follow-up rules because it models recoverability probability, selects the optimal channel, and generates a personalized message — all in one call. Best suited for AI agents embedded in sales workflows, CRM automations, or customer success systems that need to act within minutes of a revenue event.

## Known failure modes

- Invalid eventType enum value returns a 400 validation error
- minutesSinceEvent or averageOpportunityValue out of allowed range returns a 400 error
- Missing required eventType field returns a 400 bad request
- Payment not completed (x402 flow incomplete) results in a 402 Payment Required response
- Network or server error on the upstream model returns a 500 with no decision packet
- priorAttempts exceeding 100 triggers a validation rejection

## How this service works

Machine-paid revenue intelligence and recovery APIs. Discovery is free; successful execution is paid in Base USDC through x402.

## Output

Returns a structured decision packet including: whether to act (shouldAct), priority level (e.g. immediate), a recommended channel (sms/email/phone_task), a personalized recovery message, action type, time window to execute within, economic modeling (opportunity value, expected recoverable value, modeled recovery probability), and a safety flag confirming the action requires caller execution rather than being auto-executed.

## Request schema (JSON Schema)

```json
{
 "type": "object",
 "properties": {
  "industry": {
   "type": "string",
   "description": "Optional business industry."
  },
  "eventType": {
   "enum": [
    "missed_call",
    "stale_lead",
    "quote_unanswered",
    "appointment_no_show",
    "payment_failed"
   ],
   "type": "string",
   "description": "The revenue event that needs a recovery decision."
  },
  "bookingUrl": {
   "type": "string",
   "description": "Optional booking URL to include for rescheduling or callbacks."
  },
  "paymentUrl": {
   "type": "string",
   "description": "Optional secure retry URL for failed-payment recovery."
  },
  "businessName": {
   "type": "string",
   "description": "Optional business name."
  },
  "priorAttempts": {
   "type": "number",
   "maximum": 100,
   "minimum": 0,
   "description": "Number of prior recovery attempts."
  },
  "preferredChannel": {
   "enum": [
    "auto",
    "sms",
    "email",
    "phone_task"
   ],
   "type": "string",
   "description": "Preferred recovery channel or auto-selection."
  },
  "customerFirstName": {
   "type": "string",
   "description": "Optional first name for message personalization."
  },
  "minutesSinceEvent": {
   "type": "number",
   "maximum": 5256000,
   "minimum": 0,
   "description": "Minutes elapsed since the revenue event occurred."
  },
  "averageOpportunityValue": {
   "type": "number",
   "maximum": 10000000,
   "minimum": 0,
   "description": "Estimated value of the opportunity in USD."
  }
 }
}
```

## Response schema (JSON Schema)

```json
{
 "type": "json",
 "example": {
  "result": {
   "mode": "decision_packet",
   "safety": {
    "externalActionExecuted": false,
    "requiresCallerExecution": true
   },
   "priority": "immediate",
   "economics": {
    "modelType": "heuristic",
    "opportunityValue": 1200,
    "expectedRecoverableValue": 420,
    "modeledRecoveryProbability": 0.35
   },
   "shouldAct": true,
   "capability": "recover_revenue",
   "recommendedAction": {
    "channel": "sms",
    "message": "Hi Sam, thanks for calling Example HVAC Co. Sorry we missed you. What can we help with?",
    "actionType": "acknowledge_and_reopen",
    "executeWithinMinutes": 5
   }
  },
  "payment": {
   "payer": "0x0000000000000000000000000000000000000000",
   "network": "eip155:8453",
   "protocol": "x402",
   "transaction": "0x0000000000000000000000000000000000000000000000000000000000000000"
  },
  "proofId": "00000000-0000-4000-8000-000000000000",
  "priceUsd": 0.05,
  "chargedUnit": "recovery_decision"
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/klearflow-revenue-recovery-decision-engine-11606300/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from klearflow.vercel.app](https://www.zero.xyz/host/klearflow.vercel.app/llms.txt)
