Skip to content

Sales closing

Your qualified leads taken to signed orders by a commissioned closer, with agents on the briefs and proposals; billed only on collected revenue.

Kind
Service
Price
$268.20 per signed order
Your time
40 minutes
Approval
A person does a step
Deal.close
You, to your agent

Close my 12 qualified leads this month at $268.20 a signed Order, billed only once they pay, and show me the plan first.

curl -X POST "https://api.sb/leaseline.app/deals/close?mode=try" \
  -H "Authorization: Bearer $SB_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"goal":"Close my 12 qualified leads this month at $268.20 a signed Order, billed only once they pay, and show me the plan first.","budget":{"amount":3218.4,"currency":"USD"}}'
npx startup-builder do Deal.close --try --data '{"goal":"Close my 12 qualified leads this month at $268.20 a signed Order, billed only once they pay, and show me the plan first.","budget":{"amount":3218.4,"currency":"USD"}}'
{
  "name": "do",
  "arguments": {
    "mode": "try",
    "code": "return await $.Deal.close({ goal: 'Close my 12 qualified leads this month at $268.20 a signed Order, billed only once they pay, and show me the plan first.', budget: { amount: 3218.4, currency: 'USD' } })"
  }
}
import { $ } from 'startup-builder'

const result = await $.try.Deal.close({ goal: 'Close my 12 qualified leads this month at $268.20 a signed Order, billed only once they pay, and show me the plan first.', budget: { amount: 3218.4, currency: 'USD' } })
Response
{
  "mode": "try",
  "stored": false,
  "estimate": "About $1.27 per 3 signed Orders",
  "bills": "$268.20 a signed Order on the $1,788 plan",
  "sample": {
    "account": "Harborview Property Management",
    "value": "$1,788 a year",
    "signed": "2026-12-09",
    "first payment": "cleared 2027-01-08",
    "billed": "$268.20"
  }
}
Try mode reads, stores nothing and spends nothingAPI referenceIts Nouns

What you get

  • 3 signed orders · Your qualified leads taken to signed orders by a commissioned closer, with agents on the briefs and proposals; billed only on collected revenue. · Order
  • orders[] · Each signed order: the account, the value, the date its first payment cleared, and the lead and Play behind it.
  • lost[] · Each deal the closer lost, with the buyer’s reason and the next step; none is billed.
  • bill · 15% of each cleared order’s first-year value.

Connect once: Google Calendar, Stripe. How long: About 2 to 6 weeks a deal, from handoff to a cleared first payment.

Trigger

It runs when you call it, or on any Trigger you set.

TypeScript
await $.Workflow.create({ verb: 'Deal.close', trigger: { schedule: 'weekly' } })

Steps

Your agent does these steps, one row per step; each step’s check is part of its row and its price.

StepVerbReturnsPriceApproval
1. Brief the closer on each dealDeal.briefWhy they are buying now, the objection to expect and who signsAbout $1.11Runs on its own
2. The closer runs discovery and the demoDeal.advanceThe buyer’s need, the decision date and who signs, recorded on the dealFreeA person does this step
3. Draft the proposalDeal.proposeA proposal on your offer, at or above its floor, sent within 5 business days of the first callAbout 8¢Runs on its own
4. Answer security and reference asksContent.draftQuestionnaire answers from your trust page, and a reference from an opted-in customerAbout 8¢Runs on its own
5. The closer gets the signatureOrder.placeA signed order on your offerFreeA person does this step
6. Read the first payment past the refund windowCollection.queryEach order paid and past 30 days, or refunded and creditedFreeRuns on its own

Calls: Deal.brief, then Deal.advance, then Deal.propose, then Content.draft, then Order.place, then Collection.query.

About $1.27 per 3 signed orders, each time it runs, capped at $5.00.

Example: give it a goal

Close my 12 qualified leads this month at $268.20 a signed order, billed only once they pay, and show me the plan first.

The plan it shows runs 6 steps, priced before it spends anything; Run it above shows the result it returns.

When something fails

Each failure, and what happens next
WhenThen
A buyer asks for a price under the floorThe proposal waits for your approval; the closer never offers below it on their own.
A lead goes quiet before the first callIt comes back to you after 14 days with the last touch, and bills nothing.
An order is refunded inside 30 daysIt is credited, and the reason is written to the deal.

Each step retries three times, then falls through to the next route; one item's failure lands in skipped with its reason, never failing the call. Before a step would cross maxCost it stops and returns what it has, with a resume link. Each step's idempotency key is the call's key plus the step and the item: leaseline-deal-close-1-<step>-<item>.

What it promises

TermThis Service
DoneA signed order from a qualified lead you handed over, its first payment collected and past the 30-day refund window.
Counted byOrder.paid
Billed$268.20 a signed order on the $1,788 plan, on acceptance
TargetEvery qualified lead you hand over gets a proposal within 5 business days of its first call.
Accepted whenAccepted when the first payment clears the 30-day refund window.
CreditedAn order refunded inside 30 days.
RemedyA deal the closer loses bills nothing and comes back with the buyer’s reason and the next step; an order refunded inside 30 days is credited.
EvaluatorCode reads Order.placed and the first Order.paid from Stripe, and the close of the refund window.
Window90 days from handoff for each lead.
Assuranceattested, the weakest check on the way to done
Oversightperforms-step, because high-stakes

December: 12 qualified leads handed to the closer from Demand generation.

CountWhat happened
12Ordered
3Delivered
9First calls held; 3 leads went quiet before the call and came back to you.
4Proposals sent, each within 5 business days.
3Orders signed.
1Refunded inside 30 days: credited.
2Accepted, billed 2 × $268.20 = $536.40

Change it

AskCompiles to
Hand over only leads with 50 or more units.Deal.close
Offer annual prepay at 2 months free on every proposal.Deal.propose
Send me each lost deal’s reason every Monday.Metric.query
TypeScript
import { $, Service } from 'startup-builder'

export default Service({
  name: 'deal-close',
  verb: 'Deal.close',
  input: { leads: 'string[]', offer: 'string', handoffWithin: 'string' },
  maxCost: 5,
  builtFrom: ['Deal.brief', 'Lead.route'],
  oversight: { posture: 'performs-step', reason: 'high-stakes' },          // a commissioned closer runs the calls and gets the signature
  contract: {
    done: 'Order.paid', accept: { after: 'refund-window', window: '30d' }, assurance: 'attested',
    bills: { share: 0.15, of: 'first-year-value' }, credits: ['refunded-within-30d'], remedy: 'return-with-reason',
  },
  execute: async (ctx, { leads, offer, handoffWithin = '5d' }) => {
    for (const lead of leads) {
      const brief = await ctx.step(`brief:${lead}`, () => $.Deal.brief({ lead, maxCost: 0.2 }))
      const call = await ctx.task(`call:${lead}`, { to: 'role:sales-lead', brief })                  // a person runs it
      if (call.outcome !== 'advance') continue
      await ctx.step(`propose:${lead}`, () => $.Deal.propose({ deal: call.deal, offer, within: handoffWithin }))
    }
  },
})

Extend it with extends: 'Deal.close' and base(), or compose your own from these steps.

Works with

Plays that order it: Closer handoff, Data residency, Paid pilot, Risk-reversal offers, Trust pack, Written references.

Built fromKindIts own price
Account briefAgent taskAbout 9.3¢ a brief
Inbound routingWorkflowAbout 0.4¢ an inbound

It serves Convert visitors. It deepens Sell and Sales closing.

For agents

For agents: the guide, its approvals, retries and lookups
FactValue
GuideDeal.close
Guide approvalask
GoalClose my 12 qualified leads this month at $268.20 a signed order, billed only once they pay, and show me the plan first. It may change counts, the order of steps, soft filters and the route a read takes, and it stops early when the goal is met. It never relaxes your words, raises its own budget, answers its own approval, calls a Play or acts outside your standing approval.
RetryThree times with backoff, then the next route; the same idempotency key never charges, sends or posts twice
Idempotency keyleaseline-deal-close-1
LookupsA find: input asks unless exactly one record fits
Step
1. Brief the closer on each deal
2. The closer runs discovery and the demo
3. Draft the proposal
4. Answer security and reference asks
5. The closer gets the signature Action class spend
6. Read the first payment past the refund window

The amounts live once, on the hub (approvals).

Who does each step, and how it is checked
StepFunctionDoerCheckerAssuranceInputs
1. Brief the closer on each dealagenticThe AE agentA second model checks each fact in the brief against its sourcegraded$0.leads
2. The closer runs discovery and the demohumanA person in the AE seatThe call’s notes and next step read back onto the deal within 2 hoursattested$1.briefs
3. Draft the proposalagenticThe AE agentA second model checks the proposal against your offer and its price floorgraded$2.deals, $0.offer
4. Answer security and reference asksagenticThe SE agentEach answer quotes your trust page or a signed reference, checked by a second modelgraded$3.asks
5. The closer gets the signaturehumanA person in the AE seatCode reads Order.placed back from Stripeattested$3.proposals
6. Read the first payment past the refund windowcodeCodeStripe’s Order.paid, read back after the 30-day refund window closesmeasured$5.orders

The doer is never the checker, and the weakest assurance on the path is the whole call’s.

Under the hood

Under the hood: the Systems, Nouns and Events it touches
KindWhat it touches
SystemsCRM, sites and content
NounsDeal, Content, Order, Collection
EventsDeal.advanced, Deal.proposed, Content.drafted, Order.placed, Collection.queried

Reference

Inputs, outputs, its Event and its errors
NameTypeDefaultMeaning
leadsLead[]RequiredThe qualified leads you hand over, each with its sourcing Play.
offerOfferRequiredWhat the closer sells, with its price floor; nothing is offered below it without your approval.
handoffWithinstring'5d'How soon each lead gets a proposal after its first call.

Emits Deal.closed. Refuses with max-cost before it spends, and with the Data calls and Accounts groups (refusals).

Contents