Implement a Restaurant Onboarding Workflow From Five Internal and External Steps

Quick Overview

A coding exercise to implement a restaurant onboarding workflow from five provided internal and external functions, succeeding only when all five succeed and tracking restaurant and onboarding ids separately. It tests clarifying a vague spec, result checking, retries, idempotency and recovery from partial failure.

Implement a Restaurant Onboarding Workflow From Five Internal and External Steps

Company: DoorDash

Role: Software Engineer

Category: Software Engineering Fundamentals

Difficulty: medium

Interview Round: Onsite

In an AI-assisted coding round, you are given a restaurant onboarding class and must implement its five functions so that a restaurant can be onboarded onto the platform. The functions come in two kinds, internal and external, and an onboarding counts as successful only if all five calls succeed, so the result of every one of them must be checked. The implementation must record both a restaurant id and an onboarding id; they are different identifiers. You may use your own AI coding assistant while sharing your screen, but the coding platform does not let you copy the problem text out, so you must describe the task to the assistant yourself. The interviewer expects you to understand the problem, explain your plan, and own the code, not to hand the whole task to the assistant. The report does not say what each of the five functions does. Treat them as five provided steps and settle their contracts with the interviewer before coding. ```hint Two identifiers, two lifetimes Ask which identifier names the restaurant across every attempt and which names a single attempt, and which of them each step needs. ``` ```hint A call that returns is not a success Think about how a step can report failure without raising an error, and what the overall status should be once one of the five steps has failed. ``` ### Clarifying Questions - What does each of the five functions do, which are internal and which external, and must they run in a fixed order? - What does "internal" versus "external" mean here: calls to our own systems versus third-party services, or private helpers versus the public interface? - How does each function report failure: a return value, an exception, or a status object? Can a call time out? - If one step fails, should earlier steps be undone, retried, or left in place for a later retry of the same onboarding? - Where do the restaurant id and the onboarding id come from, and can one restaurant have several onboarding attempts? - Must the class be safe when two onboardings for the same restaurant run at the same time? ### What a Strong Answer Covers - Restating the problem and agreeing on each function's contract before writing or generating code - Tracking the restaurant id and the onboarding id separately, with one onboarding record per attempt - Checking the result of every step, and reporting success only when all five succeed - Failure handling: retries for transient external errors, idempotency so a retried step does not take effect twice, and resumable state or compensation for partial progress - Tests for the success path and for a failure at each step - Using the AI assistant for well-scoped pieces, reviewing what it writes, and explaining the design throughout ### Follow-up Questions - An external call times out and you do not know whether it took effect. How do you retry it safely? - The process crashes after the third step. How does a later run resume the same onboarding? - How would you run the external steps in parallel when they do not depend on each other? - How would you show the onboarding status to the restaurant and to support staff?

Overview: A coding exercise to implement a restaurant onboarding workflow from five provided internal and external functions, succeeding only when all five succeed and tracking restaurant and onboarding ids separately. It tests clarifying a vague spec, result checking, retries, idempotency and recovery from partial failure.

Read the full DoorDash Software Engineer interview experience this question came from

DoorDash logo
DoorDash
Aug 1, 2026
mediumSoftware EngineerOnsiteSoftware Engineering Fundamentals
0
0

In an AI-assisted coding round, you are given a restaurant onboarding class and must implement its five functions so that a restaurant can be onboarded onto the platform. The functions come in two kinds, internal and external, and an onboarding counts as successful only if all five calls succeed, so the result of every one of them must be checked. The implementation must record both a restaurant id and an onboarding id; they are different identifiers.

You may use your own AI coding assistant while sharing your screen, but the coding platform does not let you copy the problem text out, so you must describe the task to the assistant yourself. The interviewer expects you to understand the problem, explain your plan, and own the code, not to hand the whole task to the assistant.

The report does not say what each of the five functions does. Treat them as five provided steps and settle their contracts with the interviewer before coding.

Clarifying Questions Guidance

  • What does each of the five functions do, which are internal and which external, and must they run in a fixed order?
  • What does "internal" versus "external" mean here: calls to our own systems versus third-party services, or private helpers versus the public interface?
  • How does each function report failure: a return value, an exception, or a status object? Can a call time out?
  • If one step fails, should earlier steps be undone, retried, or left in place for a later retry of the same onboarding?
  • Where do the restaurant id and the onboarding id come from, and can one restaurant have several onboarding attempts?
  • Must the class be safe when two onboardings for the same restaurant run at the same time?

What a Strong Answer Covers Guidance

  • Restating the problem and agreeing on each function's contract before writing or generating code
  • Tracking the restaurant id and the onboarding id separately, with one onboarding record per attempt
  • Checking the result of every step, and reporting success only when all five succeed
  • Failure handling: retries for transient external errors, idempotency so a retried step does not take effect twice, and resumable state or compensation for partial progress
  • Tests for the success path and for a failure at each step
  • Using the AI assistant for well-scoped pieces, reviewing what it writes, and explaining the design throughout

Follow-up Questions Guidance

  • An external call times out and you do not know whether it took effect. How do you retry it safely?
  • The process crashes after the third step. How does a later run resume the same onboarding?
  • How would you run the external steps in parallel when they do not depend on each other?
  • How would you show the onboarding status to the restaurant and to support staff?