Design a Customer Onboarding Pipeline

System Design
Medium
Salesforce
31.3K views

Design an automated, multi-step pipeline for onboarding new customers. Focus on state machines, task persistence, and handling external service dependencies.

Why Interviewers Ask This

Interviewers ask this to evaluate your ability to design resilient, event-driven systems that handle complex business logic. Specifically, they want to see if you can model state transitions correctly, ensure data consistency across distributed tasks, and gracefully manage failures when integrating with external CRM or payment services typical of enterprise platforms like Salesforce.

How to Answer This Question

1. Clarify requirements by defining the onboarding stages (e.g., signup, verification, provisioning) and non-functional needs like idempotency. 2. Propose a State Machine architecture where each customer record has an explicit status field to track progress. 3. Design a durable task queue system, such as using Kafka or SQS, to decouple triggers from execution. 4. Detail persistence strategies for the state machine, emphasizing atomic updates to prevent race conditions during concurrent retries. 5. Address external dependencies by implementing circuit breakers and retry policies with exponential backoff to handle third-party API outages without blocking the pipeline.

Key Points to Cover

  • Explicitly define state transitions and valid paths within the state machine
  • Demonstrate understanding of idempotency to prevent duplicate processing
  • Explain how to persist state changes atomically to avoid race conditions
  • Detail a strategy for handling external API failures with circuit breakers
  • Emphasize audit logging and observability for enterprise-grade reliability

Sample Answer

To design a robust onboarding pipeline, I would start by modeling the process as a finite state machine. Each customer journey moves through distinct states: Pending, Verified, Provisioning, Active, or Failed. We would p…

Common Mistakes to Avoid

  • Treating the pipeline as a simple linear script without accounting for failure states or retries
  • Ignoring the need for idempotency, leading to potential double-charging or duplicate account creation
  • Failing to specify how the system recovers from partial failures in multi-step workflows
  • Overlooking the importance of immutable logs for compliance and debugging complex issues

Sound confident on this question in 5 minutes

Answer once and get a 30-second AI critique of your structure, content, and delivery. First attempt is free — no signup needed.

Try it free

Related Interview Questions

Browse all 173 System Design questionsBrowse all 49 Salesforce questions