Skip to content

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  cancelled

Workflow 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:

Possible Transitions:

  • → offered when the first approved expert creates an offer, or when an expert holding a hidden offer on it gets approved
  • → cancelled if 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:

Possible Transitions:

  • → accepted when client completes payment flow
  • → cancelled if client cancels
  • → pending when 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:

  1. Checkout Initiation

    • Client provides billing/shipping address
    • System creates Stripe checkout session
    • Client receives checkout URL
  2. Payment on Stripe

    • Client completes payment on Stripe
    • Stripe processes the transaction
  3. Payment Confirmation

    • 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 accepted state
    • Expert is officially assigned

What This Means:

  • Payment has been processed through Stripe
  • Expert has been assigned to complete the work
  • acceptedOffer field contains the chosen offer details
  • expert field contains the assigned expert information
  • acceptedAt holds the time of acceptance
  • Client and expert see each other's email and phone
  • 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 the expertAmount they offered

Who Can Do What:

Possible Transitions:

  • → completed when 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
  • completedAt holds the time of completion
  • Work appears in history for both parties

Who Can Do What:

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
  • cancellationReason field may contain the reason

Who Can Cancel:

  • Client → From pending or offered states

Cannot Be Cancelled:

  • ❌ From accepted state (payment already completed)
  • ❌ From completed state (work already finished)

Possible Transitions:

  • None (this is a final state)

State Transition Reference ​

Current StateNext StateTriggerActor
pendingofferedApproved expert creates first offer, or an expert holding a hidden offer is approvedExpert / System
pendingcancelledClient cancelsClient
offeredpendingLast visible offer disappears (withdrawn by its expert, or its expert is suspended)Expert / System
offeredacceptedPayment completedClient
offeredcancelledClient cancelsClient
acceptedcompletedExpert uploads documentExpert

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 ​

  1. Client creates testimony (pending)
  2. Expert creates offer (offered)
  3. Client completes payment (accepted)
  4. Expert uploads document (completed)
  5. Client downloads testimony

Early Cancellation ​

  1. Client creates testimony (pending)
  2. Client decides not to proceed
  3. Client cancels (cancelled)

Multiple Offers ​

  1. Client creates testimony (pending)
  2. Expert A creates offer (offered)
  3. Expert B creates offer (still offered)
  4. Expert C creates offer (still offered)
  5. Client chooses Expert B's offer
  6. Client completes payment (accepted with Expert B)

State Properties ​

Pending State ​

  • state: "pending"
  • expert: null
  • acceptedOffer: null
  • invoices, acceptedAt, completedAt: null
  • Visible in offerable testimonies list

Offered State ​

  • state: "offered"
  • expert: null
  • acceptedOffer: null
  • invoices, 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 object
  • acceptedOffer: Chosen offer object
  • acceptedAt: Time of acceptance
  • invoices: The invoices the viewer may download (empty array until generated)
  • Payment completed

Completed State ​

  • state: "completed"
  • expert: Assigned expert object
  • acceptedOffer: Chosen offer object
  • acceptedAt, completedAt: Times of acceptance and completion
  • invoices: The invoices the viewer may download
  • Document available for download

Cancelled State ​

  • state: "cancelled"
  • cancellationReason: Optional reason string