zyvron-lead-recovery-engine
v0.1.0
Published
Rule-based TypeScript engine for analyzing service-business enquiries and prioritizing follow-up
Maintainers
Readme
Which enquiries need follow-up first?
|
v
analyzeLead(input)
|
v
intent + after-hours risk + priority score + opportunity estimate + next manual actionMost service businesses do not lose leads only because demand is low. They lose leads when enquiries arrive after hours, replies are delayed, pricing questions are missed, and follow-ups are not prioritized.
This engine turns a single enquiry into a structured follow-up decision.
This is one public feature from Zyvron SaaS. This is not the full Zyvron SaaS.
This repository contains the public, generic 70% to 75% version of one Zyvron SaaS feature. The production Zyvron SaaS keeps private integrations, workflows, scoring, reporting, and operational logic closed.
Public Boundary
| Public in this repo | Private in Zyvron SaaS | | --- | --- | | Rule-based enquiry classification | Managed product integrations | | After-hours risk detection | Production data and account systems | | Generic priority scoring | Billing, activation, and setup workflows | | Single-enquiry opportunity estimate | Dashboard, admin, and reporting workflows | | Manual next-action recommendation | Production scoring and automation logic | | Private tag redaction | Operational playbooks and managed services | | Local adapters for copied text, CSV rows, and web forms | Client-specific configuration and infrastructure |
Quick Start
This package is package-ready but not published to npm yet.
Clone the repository:
git clone https://github.com/vighnesh-kamble/zyvron-lead-recovery-engine.git
cd zyvron-lead-recovery-engine
npm install
npm run test
npm run buildAfter a future npm release, package usage will look like this:
npm install zyvron-lead-recovery-engineUse fake data while testing:
import { analyzeLead } from "zyvron-lead-recovery-engine";
const result = analyzeLead({
messageReceivedAt: "22:45",
businessHours: {
open: "10:00",
close: "21:00"
},
customerMessage: "Hi, what is the price for hair spa?",
averageBookingValue: 1500,
estimatedConversionRate: 0.25,
lastReplyDelayMinutes: 180
});
console.log(result);Example output:
{
"intent": "pricing",
"isAfterHours": true,
"urgency": "high",
"followUpPriority": 82,
"estimatedOpportunityValue": 375,
"recommendedAction": "reply_with_pricing",
"explanation": [
"The enquiry came after business hours.",
"The reply delay is high.",
"The customer asked about pricing."
],
"disclaimer": "This is a rough prioritization estimate only. It does not guarantee bookings, conversion, or revenue."
}Features
| Module | Purpose |
| --- | --- |
| classifyEnquiry | Classifies intent as pricing, availability, booking, complaint, general, or unknown. |
| detectAfterHours | Detects whether the enquiry arrived outside business hours. |
| calculateFollowUpPriority | Returns a 0-100 public priority score and urgency label. |
| estimateOpportunityValue | Estimates single-enquiry opportunity value without revenue guarantees. |
| recommendNextAction | Recommends one manual next action. |
| analyzeLead | Combines the public modules into one result. |
| adapters | Normalizes copied text, CSV rows, or web form fields. |
| redactPrivateTags | Replaces <private>...</private> content with [REDACTED]. |
What It Does
- Analyzes enquiry intent.
- Detects after-hours risk.
- Scores follow-up priority.
- Estimates single-enquiry opportunity value.
- Recommends a manual next action.
- Redacts private tags.
- Works locally with no external API calls.
What It Does Not Do
- Does not connect to external platforms.
- Does not include production database, billing, or account logic.
- Does not include the Zyvron dashboard or admin console.
- Does not include managed setup, reporting, or automation workflows.
- Does not include internal prompts or private Zyvron scoring.
- Does not store customer data.
- Does not guarantee bookings, conversion, or revenue.
Zero Runtime Dependencies
This package is designed to run locally with zero runtime dependencies, no network calls, no storage, and no external services.
Development uses TypeScript and Node test tooling only.
Adapters
Adapters normalize manually copied enquiry text, generic CSV rows, or web form fields into the AnalyzeLeadInput shape.
They are not connectors. This package does not connect to external messaging, CRM, billing, database, or automation systems.
Workflow Diagram
flowchart LR
A["Lead input"] --> B["Redact private data"]
B --> C["Classify intent"]
C --> D["Detect timing risk"]
D --> E["Score priority"]
E --> F["Estimate opportunity"]
F --> G["Recommend action"]For LLM Agents
- Use fake/sample data.
- Do not paste real customer phone numbers or emails.
- Do not add platform integration code.
- Do not add private product, billing, database, reporting, or automation logic.
- Keep the disclaimer visible.
- Do not represent estimates as guaranteed revenue.
- Treat this as a public generic feature only.
Safety And Privacy
- No storage.
- No external calls.
- No secrets.
- No customer data required.
<private>...</private>redaction is supported.- No guaranteed bookings, conversion, or revenue.
License
MIT.
The MIT license applies to the code in this repository. The Zyvron name, logo, website, and managed SaaS product are not included in the license.
