# Qualify leads and book demos

URL: /workflows/guides/qualify-leads-and-book-demos · Id: `guide:qualify-leads-and-book-demos`

> Every new Lead gets a written answer in five minutes; the ones that fit your Offer get a demo on your calendar.

Every new [Lead](/business/nouns/lead) gets a written answer within five minutes. The ones that fit your [Offer](/business/nouns/offer) become a [Deal](/business/nouns/deal) and a [Meeting](/business/nouns/meeting) on your calendar.

Needs: [Take a payment](/systems/finance/take-a-payment)

**Before it runs**

- You leave the chat: Never: it all happens in the chat.

## What you get
- 1 written reply to each new Lead within five minutes (Message)
- 1 fit score per Lead against your Offer’s ideal customer (Lead)
- 1 Deal for each Lead that fits (Deal)
- 1 30-minute demo on your calendar, with the Lead’s answers attached (Meeting)

## Your agent does
**For agents**

- Guide: `guide:qualify-leads-and-book-demos`, status `live`. Page: [/workflows/guides/qualify-leads-and-book-demos.md](/workflows/guides/qualify-leads-and-book-demos.md).
- Approval: none. Run it when the founder asks.
- Leaves the chat: never.
- Needs first: [Take a payment](/systems/finance/take-a-payment).
- Run: call the steps in order, each through the API, SDK, CLI or MCP tab below; a later step passes the `$id` an earlier one returns. Each value marked example is the sample business’s: pass the founder’s own.

| Step | Verb | Inputs (type, required, this guide’s value) | Returns |
| --- | --- | --- | --- |
| 1 | [`Lead.qualify`](/business/nouns/lead/qualify) (`verb:Lead.qualify`) | `lead` Lead (an id), required: the `$id` of the first Lead `Lead.list` returns for `where: status = new`; `offer` Offer (an id), required: the `$id` of the first Offer `Offer.list` returns | `deal` Deal, `lead` Lead |
| 2 | [`Meeting.book`](/business/nouns/meeting/book) (`verb:Meeting.book`) | `contact` Contact (an id), required: the `$id` of the first Lead `Lead.list` returns for `where: status = new`; `at` datetime, required: example `"2026-11-04T16:00:00Z"` | `meeting` Meeting |

Returns: the last call answers with `meeting` and its `action`, whose `status` is `done`, `pending` (waiting on an Approval or a Worker), `failed`, `canceled` or `refused`:

```json
{
  "api": "https://api.sb/leaseline.app",
  "meeting": {
    "$id": "https://api.sb/leaseline.app/meetings/meeting_1",
    "$type": "Meeting",
    "at": "2026-11-04T16:00:00Z"
  },
  "action": {
    "$id": "https://api.sb/leaseline.app/actions/action_1",
    "operation": "Meeting.book",
    "status": "done"
  },
  "links": {
    "self": "https://api.sb/leaseline.app/actions/action_1"
  }
}
```

Next: offer “Only book demos for firms with more than 200 units”, or “Put demos on my calendar Tuesdays and Thursdays only”.

Calls: `Lead.qualify` → `Meeting.book`

Ask:

```text
Qualify leads and book demos.
Answer every new lead within five minutes.
Book a demo with anyone who fits.
```

API:

```bash
# Look up the Lead: Lead.list
LEAD=$(curl "https://api.sb/leaseline.app/leads?where=status%20%3D%20new&limit=1" \
  -H "Authorization: Bearer $STARTUP_BUILDER_API_KEY" | jq -r '.leads[0]["$id"] | split("/") | last')

# Look up the Offer: Offer.list
OFFER=$(curl "https://api.sb/leaseline.app/offers?limit=1" \
  -H "Authorization: Bearer $STARTUP_BUILDER_API_KEY" | jq -r '.offers[0]["$id"] | split("/") | last')

# 1. Lead.qualify
curl -X POST https://api.sb/leaseline.app/leads/$LEAD/qualify \
  -H "Authorization: Bearer $STARTUP_BUILDER_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"offer":"'"$OFFER"'"}'

# 2. Meeting.book
curl -X POST https://api.sb/leaseline.app/meetings/book \
  -H "Authorization: Bearer $STARTUP_BUILDER_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"contact":"'"$LEAD"'","at":"2026-11-04T16:00:00Z"}'
```

SDK:

```ts
import { $ } from 'startup-builder'

const [lead] = await $.Lead.list({ where: 'status = new', limit: 1 })
const [offer] = await $.Offer.list({ limit: 1 })
await $.Lead.qualify({ lead: lead.$id, offer: offer.$id })
await $.Meeting.book({ contact: lead.$id, at: '2026-11-04T16:00:00Z' })
```

CLI:

```bash
LEAD=$(npx startup-builder do Lead.list --json '{"where":"status = new","limit":1}' | jq -r '.leads[0]["$id"] | split("/") | last')
OFFER=$(npx startup-builder do Offer.list --json '{"limit":1}' | jq -r '.offers[0]["$id"] | split("/") | last')
npx startup-builder do Lead.qualify --json '{"lead":"'"$LEAD"'","offer":"'"$OFFER"'"}'
npx startup-builder do Meeting.book --json '{"contact":"'"$LEAD"'","at":"2026-11-04T16:00:00Z"}'
```

MCP:

```json
{
  "name": "do",
  "arguments": {
    "code": "const [lead] = await $.Lead.list({ where: 'status = new', limit: 1 })\nconst [offer] = await $.Offer.list({ limit: 1 })\nawait $.Lead.qualify({ lead: lead.$id, offer: offer.$id })\nreturn await $.Meeting.book({ contact: lead.$id, at: '2026-11-04T16:00:00Z' })"
  }
}
```

## Change it
- Only book demos for firms with more than 200 units.
- Put demos on my calendar Tuesdays and Thursdays only.
- Send everyone else the self-serve signup.

## Under the hood
- Systems: [CRM](/systems/crm), [Scheduling](/systems/scheduling)
- Nouns: [Lead](/business/nouns/lead), [Deal](/business/nouns/deal), [Meeting](/business/nouns/meeting), [Offer](/business/nouns/offer)
- Events: [`Lead.qualified`](/business/events/Lead.qualified), [`Meeting.booked`](/business/events/Meeting.booked)

Speed wins more early deals than polish. A Lead answered in five minutes books more often than one answered tomorrow, and the [Sales Lead](/agents/sales/sales-lead) answers at any hour.