Design an Outcome-Based Billing Ledger for Resolved Conversations
Last updated: November 29, 2026
Quick Overview
Sierra-style pricing charges customers per successful outcome, such as a resolved conversation, rather than per seat. Design the system that decides billable outcomes, records them in a ledger, handles disputes and reversals, and produces accurate monthly invoices.
Sierra
November 29, 20260
0
0 solved
Sierra-style pricing charges customers per successful outcome, such as a resolved conversation, rather than per seat. Design the system that decides billable outcomes, records them in a ledger, handles disputes and reversals, and produces accurate monthly invoices.
Outcome-based pricing is central to Sierra's business model, so billing correctness directly affects customer trust. The interviewer checks immutable ledger design, idempotency, how reversals are modeled, and how billing stays auditable when the definition of an outcome is itself a judgment.
What the Interviewer Expects
- Separate outcome detection from billing records
- Use an append-only, double-entry style ledger with idempotent writes
- Model reversals and adjustments as new entries, not edits
- Version the outcome definition and pricing rules per contract
- Support reconciliation and customer-visible audit trails
Key Topics to Cover
How to Approach This
- Start by clarifying functional and non-functional requirements with the interviewer.
- Estimate the scale: QPS, storage, bandwidth. This drives your design decisions.
- Draw a high-level architecture first, then deep dive into 1-2 critical components.
- Discuss trade-offs explicitly (e.g., consistency vs availability, SQL vs NoSQL).
- Address failure scenarios, monitoring, and how the system handles 10x traffic spikes.
Possible Follow-up Questions
- How do you handle a conversation marked resolved that the customer reopens a day later?
- How would you let a customer audit a sample of billed outcomes?
- How do you change the outcome definition for one customer mid-contract?
Sharpen Your Skills on Codemia
Practice similar problems with our interactive workspace, get AI feedback, and track your progress.
Practice System Design ProblemsSample Answer
Requirements
Detect billable outcomes per contract rules (for example resolved without human handoff and not reopened within 24 hours). Record each charge exactly once. Allow disputes, credits, and reversals. Prod...
High-Level Design
Conversation outcome events flow from the transcript pipeline into an outcome evaluator that applies the customer's versioned rules after a settlement window closes. Qualified outcomes become `Bil...