Campaign Preview
AI · CampaignPreview, ApprovalCard
A phone campaign an agent wants to start: the contacts with their source (first ones and the total), the first sentence the caller says and the whole script (folded), the calling hours, the budget in minutes and money, and the calendar appointments are booked into.
Approval neededCaller · SalesCommunication20 min
Start the phone campaign “Spring renewals”
41 customers whose plan ends in May; the caller books a call with the account team.
- Calling hours
- Mon–Fri, 9:00–17:00 (customer's time)
- Budget
- 240 min · €36
- Books into
- Account team · Renewals
Contacts41
- Ida Nolan…1234Source: Renewals list
- Jonah Petit…8820Source: Renewals list
- Sun Lee…0457Source: Website form
- and 38 more
First sentence
Hi, this is the assistant of Northwind's account team, calling about your plan that ends in May.
Script
1. Introduce yourself as an AI assistant.
2. Ask whether they want to keep the plan.
3. Offer a 20-minute call with the account team.
4. Book the slot or note a callback time.
5. Never discuss prices; hand over instead.
Runs once after A, never again on its own.
Props
CampaignPreview
| Prop | Type | Notes |
|---|---|---|
title? | ReactNode | |
contacts | CampaignContact[] | Required |
total? | number | All contacts when `contacts` shows only the first ones. |
opening | string | The first sentence the caller says. |
script? | string | The whole script (folded). |
hours? | ReactNode | Worded by you ("Mon–Fri, 9:00–17:00"). |
budget? | { minutes?: number; amount?: number; currency?: string } | |
calendar? | ReactNode | The calendar appointments are booked into. |
facts? | KeyValueItem[] | |
warnings? | ReactNode[] | |
className? | string | Extra class on the root element. |
style? | CSSProperties | Inline style on the root element. |
ApprovalCard
| Prop | Type | Notes |
|---|---|---|
title | ReactNode | Required |
text? | ReactNode | |
children? | ReactNode | |
agent? | string | |
project? | string | |
family? | RiskFamily | |
familyLabel? | string | |
age? | string | |
escalation? | ReactNode | |
trace? | ReactNode | |
note? | ReactNode | |
heading? | string | |
options? | ApprovalOption[] | |
approveLabel? | string | |
onDecide? | (key: ApprovalKey, text?: string) => void | Promise<unknown> | Called with the answer (and the text of B or D). Return a Promise to keep the card busy until it settles: the answer's button spins and every answer is disabled; a rejection shows an error (a rejected string is shown as is) and keeps the card open. Once it resolves, a card without a `decision` prop collapses to its one-line record; with a plain callback, set `decision` yourself. |
decision? | ApprovalDecision | null | The decision record: shown as one line instead of the card; `null` keeps the card open. |
compact? | boolean | Side panels: tighter, the answers in a row, the payload folded behind "Show what runs" (one click, never a summary). |
stepUp? | boolean | Money, legal and infrastructure decisions: A and B (the answers that run something) need a fresh passkey. They show "Needs your passkey"; while `onDecide` is pending the pressed answer says "Confirm with passkey". Do the WebAuthn step-up in `onDecide` and reject if it fails. |
busy? | ApprovalKey | null | The answer being sent, when you track it yourself (controlled busy state). |
error? | ReactNode | An error to show above the answers (controlled); a rejected `onDecide` shows one by itself. |
screen? | boolean | Fills its container, e.g. a deep link on a phone: the content scrolls and A–D stay at the bottom, full width, in thumb reach (with the safe area). |
href? | string | Makes the title a link to the full approval (with `linkAs` for a router's link). |
linkAs? | ElementType | |
onApprove? | () => void | |
onDeny? | () => void | |
onEdit? | (text: string) => void | |
state? | "approved" | "denied" | |
className? | string | Extra class on the root element. |
style? | CSSProperties | Inline style on the root element. |