Skip to content

Life of an order

One catalog audit from the buyer's brief to the last earned line: quote, intake, checked work, delivery in batches, acceptance and the charge.

An Order for a Service carries one buyer's job from brief to earned fee. This chapter follows Northfield Outfitters' audit of 8,200 listings at Catalogmend, the builder's calls shown on api.sb.

The brief and the price

The catalog's size sets the price, so the buyer asks first. Its Quote request carries the brief as data, because the brief becomes the scope the Order buys.

TypeScript
const { deal } = await $.Quote.request({
  offers: ['offer_RsXZDgtfIz'],
  brief: { listings: 8_200, styleGuide: 'house', turnaround: 'P21D' },
})

The Sales Engineer prices it as three lines, one per batch, and sends it, which freezes the lines and the total. The buyer accepts, and the Quote becomes the Order with payment authorized, not captured.

TypeScript
const { order } = await $.Quote.accept({ quote: 'qt_oxAMwPUeCH', party: 'contact_q2FdXFGLVN' })

Intake

Order.start checks what arrived against the brief. The catalog came without its size chart, so the Order stays in intake and asks one Question.

TypeScript
await $.Order.start({ order: 'order_ibQcS3tTJh', received: { listings: 7_940 } })

The deadline starts when the answer arrives. Deadline clocks covers what stops the clock and what does not.

The work, checked

Each step runs as an Action by its doer and is graded by its checker. The audit agent finds the errors, the fix agent fixes them, and an Evaluator on a different model grades every fix.

A reviewer checks a sample of each batch from the review queue. A failing verdict sends the batch back for another pass, inside the deadline and at no cost to the buyer.

Delivered in batches

Order.deliver hands over the lines it names, with their Evidence frozen at that moment, and opens each line's acceptance window.

TypeScript
await $.Order.deliver({
  order: 'order_ibQcS3tTJh',
  lines: ['batch-a'],
  work: { catalog: 'file_yuU4SBmeOW', report: 'file_tzzKMkoOKn' },
})

Northfield Outfitters reads batch one in its Portal while batch two is in work.

Accepted line by line

Inside each window the buyer confirms, revises or disputes. It confirms batches one and two and sends batch three back once, for capitalization in titles.

TypeScript
await $.Order.confirm({ order: 'order_ibQcS3tTJh', lines: ['batch-a', 'batch-b'] })

A window that closes in silence confirms the line. A revision past the contract's allowance becomes a Dispute, and the remedy starts.

Earned

Each confirmed line's share is captured on Order.confirmed and posts as revenue then. The Order closes when every line is confirmed or refunded. Delivery and acceptance has every field and Verb on the way.

Next

The lifecycle page lists every state an Order and a Service move through.