Nirnaya v1
← cookbooks
salesbring your own workflow

Lead qualification

Turn a form submission and a couple of enrichment facts into a routing decision.

Sales teams already have rubrics for this; they are just applied by hand. Write the rubric as score questions and let every lead get the same treatment in 200 ms.

Fit this to your own qualified leads and it learns your definition of a good one, rather than a generic notion of fit.

The questions

routechoice

Who should handle this lead?

self_serveSend the docs and a signup link.
sdrA sales development rep qualifies further.
account_executiveAn AE should reach out directly.
partnerRoute to a solutions partner.
fitscore

How well does this lead fit the ideal customer profile?

0Poor fit.
1Weak fit.
2Reasonable fit.
3Strong fit.
4Ideal customer.
intentscore

How ready is this lead to buy?

0Just browsing.
1Researching.
2Evaluating options.
3Ready to pilot.
compliance_sensitivenoul

This deal will involve regulated or sensitive data.

falseno, the statement does not hold
trueyes, the statement holds

Acting on the answers

  • fit level 4 and intent level 3: account_executive, today.
  • compliance_sensitive true: attach the security questionnaire before the first call.

request

{
  "state": {
    "form": {
      "company": "Brightline Health",
      "role": "Head of Platform",
      "employees": "200-500",
      "message": "We run 40k support tickets a month and want to stop paying per-token for triage. Can we pilot next quarter?"
    },
    "enrichment": {
      "industry": "healthcare",
      "funding": "Series B",
      "website_tech": [
        "Zendesk",
        "Salesforce"
      ],
      "existing_customer": false
    }
  },
  "questions": {
    "route": {
      "type": "choice",
      "instructions": "Who should handle this lead?",
      "criteria": {
        "self_serve": "Send the docs and a signup link.",
        "sdr": "A sales development rep qualifies further.",
        "account_executive": "An AE should reach out directly.",
        "partner": "Route to a solutions partner."
      }
    },
    "fit": {
      "type": "score",
      "instructions": "How well does this lead fit the ideal customer profile?",
      "criteria": [
        "Poor fit.",
        "Weak fit.",
        "Reasonable fit.",
        "Strong fit.",
        "Ideal customer."
      ]
    },
    "intent": {
      "type": "score",
      "instructions": "How ready is this lead to buy?",
      "criteria": [
        "Just browsing.",
        "Researching.",
        "Evaluating options.",
        "Ready to pilot."
      ]
    },
    "compliance_sensitive": {
      "type": "noul",
      "instructions": "This deal will involve regulated or sensitive data."
    }
  }
}

call it

import { loadEngine } from "nirnaya";     // the same call this site makes

const engine = await loadEngine();          // loads once, then cached by the browser
const answers = await engine.decide(
  "{\"form\":{\"company\":\"Brightline Health\",\"role\":\"Head of Platform\",\"employees\":\"200-500\",\"message\":\"We run 40k support tickets a month and want to stop paying per-token for triage. Can we pilot next quarter?\"},\"enrichment\":{\"industry\":\"healthcare\",\"funding\":\"Series B\",\"website_tech\":[\"Zendesk\",\"Salesforce\"],\"existing_customer\":false}}",
  {
    "route": {
      "type": "choice",
      "instructions": "Who should handle this lead?",
      "criteria": {
        "self_serve": "Send the docs and a signup link.",
        "sdr": "A sales development rep qualifies further.",
        "account_executive": "An AE should reach out directly.",
        "partner": "Route to a solutions partner."
      }
    },
    "fit": {
      "type": "score",
      "instructions": "How well does this lead fit the ideal customer profile?",
      "criteria": [
        "Poor fit.",
        "Weak fit.",
        "Reasonable fit.",
        "Strong fit.",
        "Ideal customer."
      ]
    },
    "intent": {
      "type": "score",
      "instructions": "How ready is this lead to buy?",
      "criteria": [
        "Just browsing.",
        "Researching.",
        "Evaluating options.",
        "Ready to pilot."
      ]
    },
    "compliance_sensitive": {
      "type": "noul",
      "instructions": "This deal will involve regulated or sensitive data."
    }
  }
);
for (const a of answers) console.log(a.qid, a.answer, a.p);

curl and Python target nirnaya_serve, the Jev-compatible server in the release; the browser snippet is exactly what this site does.