Testimony Workflow
This guide explains the complete testimony workflow from creation through completion, including all states, transitions, and available actions.
Overview
A testimony progresses through multiple states as clients and experts interact with it:
pending ⇄ offered → accepted → completed
↓ ↓
cancelled cancelledWorkflow Stages
1. Pending - Awaiting Offers
Initial State: When a client creates a testimony, it starts in the pending state.
What This Means:
- Testimony is visible to experts serving the real estate's region; while the region is unknown (geocoding still running, or without a result — see Create Testimony) it is visible to every expert
- Once the region is known, its experts who keep testimony alerts on are notified by e-mail
- No visible offers yet — offers from experts still awaiting approval (or suspended) stay hidden and leave the state untouched
- Experts who have not made an offer on it yet can view it in offerable testimonies
Who Can Do What:
- Experts → Create offers with price and timeline
- Client → Cancel testimony
Possible Transitions:
- →
offeredwhen the first approved expert creates an offer, or when an expert holding a hidden offer on it gets approved - →
cancelledif client cancels
2. Offered - Receiving Expert Offers
Trigger: An approved expert creates an offer
What This Means:
- One or more approved experts have submitted offers
- Client can review and compare different offers
- Multiple experts can compete with different prices and timelines
Who Can Do What:
- Client → Initiate checkout for any offer
- Client → Cancel testimony
- Additional Experts → Create more offers
Possible Transitions:
- →
acceptedwhen client completes payment flow - →
cancelledif client cancels - →
pendingwhen no visible offer remains — the only expert(s) holding an offer withdrew it or got suspended (or unapproved in the sandbox)
Key Features:
- Multiple offers supported — one live offer per expert per testimony
- An expert may withdraw their offer while the testimony is open and the offer is not paid for, and bid again; the client is told by email, and the expert follows their offers in List Own Offers
- Offers from experts whose account is not yet approved stay hidden until approval — they surface (and the client is emailed) once the expert is approved
- The testimony stays listed in offerable testimonies for experts who have not made an offer on it yet
- Competitive pricing possible
- Client chooses preferred expert
3. Accepted - Work in Progress
Trigger: Client completes the payment flow
The acceptance process involves three steps:
- Client provides billing/shipping address
- System creates Stripe checkout session
- Client receives checkout URL
Payment on Stripe
- Client completes payment on Stripe
- Stripe processes the transaction
- Client confirms with the offer ID and the Stripe session ID (Stripe's webhook performs the same acceptance if it arrives first)
- Testimony transitions to
acceptedstate - Expert is officially assigned
What This Means:
- Payment has been processed through Stripe
- Expert has been assigned to complete the work
acceptedOfferfield contains the chosen offer detailsexpertfield contains the assigned expert informationacceptedAtholds the time of acceptance- Client and expert see each other's
emailandphone - Invoices are generated and listed in
invoices— both the platform invoice and the expert's invoice for the client, the expert's invoice for the expert - The platform keeps its commission from the paid
price; the expert is paid theexpertAmountthey offered
Who Can Do What:
- Expert → Upload final document
Possible Transitions:
- →
completedwhen expert uploads the final document
Important Notes:
- Cannot be cancelled after payment
- Other offers are no longer relevant — their experts are notified by email
- Only the assigned expert can complete the work
See Payment Integration Guide for detailed payment integration.
4. Completed - Work Delivered
Trigger: Expert uploads final testimony document
What This Means:
- Expert has uploaded the final PDF testimony
- Transaction is complete
- Client has access to the document
completedAtholds the time of completion- Work appears in history for both parties
Who Can Do What:
- Client and Expert → Download testimony anytime
- Both → View in testimonies history
Possible Transitions:
- None (this is a final state)
5. Cancelled - No Longer Active
Trigger: Client cancels the testimony
What This Means:
- Testimony is no longer active
- No longer visible in active testimonies
- Cannot receive new offers or be accepted
cancellationReasonfield may contain the reason
Who Can Cancel:
- Client → From
pendingorofferedstates
Cannot Be Cancelled:
- ❌ From
acceptedstate (payment already completed) - ❌ From
completedstate (work already finished)
Possible Transitions:
- None (this is a final state)
State Transition Reference
| Current State | Next State | Trigger | Actor |
|---|---|---|---|
pending | offered | Approved expert creates first offer, or an expert holding a hidden offer is approved | Expert / System |
pending | cancelled | Client cancels | Client |
offered | pending | Last visible offer disappears (withdrawn by its expert, or its expert is suspended) | Expert / System |
offered | accepted | Payment completed | Client |
offered | cancelled | Client cancels | Client |
accepted | completed | Expert uploads document | Expert |
State Flow Diagram
┌─────────┐
│ pending │
└────┬────┘
│
┌──────────────┴──────────────┐
│ │
[first offer created] [client cancels]
│ │
↓ │
┌─────────┐ │
│ offered │ │
└────┬────┘ │
│ │
┌──────┴──────┐ │
│ │ │
[payment [client cancels] │
completed] │ │
│ └──────────────┬───────┘
│ │
↓ ↓
┌──────────┐ ┌───────────┐
│ accepted │ │ cancelled │
└────┬─────┘ └───────────┘
│ (final)
│
[expert uploads document]
│
↓
┌───────────┐
│ completed │
└───────────┘
(final)Not drawn: offered returns to pending when its last visible offer disappears — its expert withdrew it or was suspended.
Common Scenarios
Happy Path
- Client creates testimony (
pending) - Expert creates offer (
offered) - Client completes payment (
accepted) - Expert uploads document (
completed) - Client downloads testimony
Early Cancellation
- Client creates testimony (
pending) - Client decides not to proceed
- Client cancels (
cancelled)
Multiple Offers
- Client creates testimony (
pending) - Expert A creates offer (
offered) - Expert B creates offer (still
offered) - Expert C creates offer (still
offered) - Client chooses Expert B's offer
- Client completes payment (
acceptedwith Expert B)
State Properties
Pending State
state:"pending"expert:nullacceptedOffer:nullinvoices,acceptedAt,completedAt:null- Visible in offerable testimonies list
Offered State
state:"offered"expert:nullacceptedOffer:nullinvoices,acceptedAt,completedAt:null- Has one or more associated offers
- Still visible in the offerable testimonies list of experts who have not made an offer
Accepted State
state:"accepted"expert: Assigned expert objectacceptedOffer: Chosen offer objectacceptedAt: Time of acceptanceinvoices: The invoices the viewer may download (empty array until generated)- Payment completed
Completed State
state:"completed"expert: Assigned expert objectacceptedOffer: Chosen offer objectacceptedAt,completedAt: Times of acceptance and completioninvoices: The invoices the viewer may download- Document available for download
Cancelled State
state:"cancelled"cancellationReason: Optional reason string