Skip to content
TheThinkLoop

Template - Revenue

Choice

Sales routing

Which sales motion an inbound inquiry belongs to.

A choice decision that routes buying inquiries to self-serve, a sales-assisted team, or enterprise sales, and filters out messages that aren't sales inquiries.

The decision

ChoiceOne of the listed values, a confidence value, and a probability for every option.

Which sales motion should handle this inbound inquiry?

Choices

  1. •self_serve: Small team or individual who can buy online with a card.
  2. •sales_assisted: Mid-size team that wants a demo or has pricing questions.
  3. •enterprise: Large organization, a procurement process, or a custom contract.
  4. •other: Not a buying inquiry: a support issue, job application, or spam.

Evidence checks (asked in the same request)

  • Team size fits: The company or team size is 20 people or more.
  • Buying timeline: The sender states a timeline or an active evaluation.

Expected output: One of the four values, a confidence value, and a probability for every option, plus one probability per evidence check.

Input

The Decisions API reads one input. Combine these fields into it as labeled text so the model sees the facts the decision depends on.

Input fields
FieldTypeRequiredDescription
messagestringYesThe customer's message, verbatim. Include the subject line if there is one.
enrichmentstringNoEmployee count and industry from your enrichment provider.

Worked examples

  1. Large company running a formal process

    We have 2,400 employees and are running an RFP for support automation. Procurement needs your security documentation and an MSA before we can proceed.

    A careful reviewer would say: enterprise. Company size, an RFP, and procurement requirements all indicate an enterprise sale.

    Run this example
  2. Small team ready to pay by card

    Hi, we're a small team of 6 people at a startup. Can I just sign up with a credit card on the monthly plan?

    A careful reviewer would say: self_serve. A small team that wants to buy without talking to anyone.

    Run this example

Expected answers are human judgments written for this template, not model output.

How it works

Routing rules based on a company-size field break when the field is empty or wrong. This decision reads the inquiry itself, where buyers describe their process, and uses enrichment data when you provide it.

Put your real segment boundaries in the option descriptions. "Mid-size" should say what you mean, for example 20 to 500 employees.

Human review and thresholds

Recommended review policy

Automate routing to self-serve and sales-assisted. Have a person confirm enterprise routes if they consume scarce senior time, and check the "other" bucket for misfiled buyers.

Choosing thresholds

Sending an enterprise buyer to a self-serve page can lose a large deal. Sending a small team to an enterprise rep wastes a call. If the first cost dominates, treat any substantial probability of enterprise as a reason for a person to look.

Starting automation threshold
80%
Starting don’t-decide threshold
50%

Starting points for the playground, not recommendations. The right values depend on your costs and on how the model’s confidence tracks accuracy on your data. Calibrate them.

Limitations

  • Company size is often absent from the message. Without enrichment, expect lower confidence and more review.
  • Large companies sometimes buy small. A ten-seat pilot at a big company may still belong in self-serve.
  • Territory, named-account, and round-robin rules still belong in your CRM. This decides the motion, not the rep.

Use it in your code

The template definition is plain JSON: the question, the evidence checks, the input fields, and the starting policy. The SDK call below sends the same question and checks to the Decisions API from your server.

sales-routing.jsonjson
{
  "$format": "thethinkloop.template/v1",
  "slug": "sales-routing",
  "title": "Sales routing",
  "decides": "Which sales motion an inbound inquiry belongs to.",
  "question": {
    "name": "decision",
    "type": "choice",
    "instructions": "Which sales motion should handle this inbound inquiry?",
    "choices": [
      {
        "value": "self_serve",
        "description": "Small team or individual who can buy online with a card."
      },
      {
        "value": "sales_assisted",
        "description": "Mid-size team that wants a demo or has pricing questions."
      },
      {
        "value": "enterprise",
        "description": "Large organization, a procurement process, or a custom contract."
      },
      {
        "value": "other",
        "description": "Not a buying inquiry: a support issue, job application, or spam."
      }
    ]
  },
  "evidenceChecks": [
    {
      "name": "factor_1",
      "label": "Team size fits",
      "type": "predicate",
      "instructions": "The company or team size is 20 people or more."
    },
    {
      "name": "factor_2",
      "label": "Buying timeline",
      "type": "predicate",
      "instructions": "The sender states a timeline or an active evaluation."
    }
  ],
  "inputs": [
    {
      "name": "message",
      "type": "string",
      "required": true,
      "description": "The customer's message, verbatim. Include the subject line if there is one."
    },
    {
      "name": "enrichment",
      "type": "string",
      "required": false,
      "description": "Employee count and industry from your enrichment provider."
    }
  ],
  "expectedOutput": "One of the four values, a confidence value, and a probability for every option, plus one probability per evidence check.",
  "examples": [
    {
      "title": "Large company running a formal process",
      "input": "We have 2,400 employees and are running an RFP for support automation. Procurement needs your security documentation and an MSA before we can proceed.",
      "expected": "enterprise"
    },
    {
      "title": "Small team ready to pay by card",
      "input": "Hi, we're a small team of 6 people at a startup. Can I just sign up with a credit card on the monthly plan?",
      "expected": "self_serve"
    }
  ],
  "startingPolicy": {
    "automateAt": 0.8,
    "abstainBelow": 0.5,
    "note": "A starting point for exploration, not a recommendation. Calibrate against your own labeled examples."
  }
}
Equivalent SDK calljavascript
import OpenAI from "openai"; // openai >= 7.30.0

const client = new OpenAI(); // reads OPENAI_API_KEY on the server

const decision = await client.decisions.create({
  model: "gpt-6-luna",
  input: "We have 2,400 employees and are running an RFP for support automation. Procurement needs your security documentation and an MSA before we can proceed.",
  questions: [
    {
      type: "choice",
      name: "decision",
      instructions: "Which sales motion should handle this inbound inquiry?",
      choices: [
        {
          value: "self_serve",
          description: "Small team or individual who can buy online with a card."
        },
        {
          value: "sales_assisted",
          description: "Mid-size team that wants a demo or has pricing questions."
        },
        {
          value: "enterprise",
          description: "Large organization, a procurement process, or a custom contract."
        },
        {
          value: "other",
          description: "Not a buying inquiry: a support issue, job application, or spam."
        }
      ]
    },
    {
      type: "predicate",
      name: "factor_1",
      instructions: "The company or team size is 20 people or more."
    },
    {
      type: "predicate",
      name: "factor_2",
      instructions: "The sender states a timeline or an active evaluation."
    }
  ],
});

// Answers come back in question order. A question can also be refused.
const [main, ...checks] = decision.answers;
if (main.type === "refusal") throw new Error("The model declined to answer.");
if (main.type === "choice") {
  console.log(main.choice, main.confidence, main.probabilities);
}

Download it as sales-routing.json, or browse all developer resources.

Need this decision tuned to your policy?

We are running a small number of pilots with B2B teams: your policy, your examples, your thresholds. Request early access.