Sub topic 8
Decision Points and Branches
This chapter assumes you can already read basic flowchart shapes, and that you have mapped a happy path for a goal. Here you will add the places where a flow splits: decision points and the branches that leave them.
What a decision point is
A decision point is a step where the next step depends on a condition. The condition may come from the user ("Do you have an account?"), from the system ("Are the credentials valid?"), or from the context ("Is the user signed in already?"). In flowchart notation, a decision is a diamond. Each line leaving the diamond is a branch, and each branch carries a label that names the outcome.
A decision point is not a screen. A screen can contain a choice, but the decision in your flow is the fork in the path. Sometimes the user makes it by tapping a button. Sometimes the system makes it silently, and the user never sees it.
Who decides: user choices and system checks
Separating the two kinds of decision makes a flow easier to build and to review.
| Type | Who decides | Example | What the design must provide |
|---|---|---|---|
| User choice | The person, by acting | Sign up or log in | Clear options on a screen |
| System check | The product, by evaluating a rule | Credentials valid? | Rules, feedback, and a response for each outcome |
| Context check | The environment | Is there a network connection? | A fallback when the condition is unfavorable |
User choices show up in the interface as buttons, links, or form fields. System checks show up as messages, redirects, or nothing at all. Because the user does not see a system check, it is easy to forget its failure branch. Many missing error paths begin as an unlabeled system check.
Drawing branches
Follow these conventions so other people can read your diamonds without guessing.
- Put a question or condition inside the diamond. Phrase it so it can be answered with a short label, such as "Has account?"
- Label every outgoing line. "Yes" and "No" work for two outcomes. Use named labels such as "Free", "Pro", "Team" when there are more.
- Make the branches exhaustive. Every possible answer must have a line. If the condition is "Password meets rules?", then both "Yes" and "No" need a destination.
- Make the branches mutually exclusive. A single situation should not match two labels.
- Keep one entry into the diamond. Merge the incoming paths before the decision if needed.
Here is the sign-in flow from the plan, with its two decisions.
The first diamond is a user choice. The second is a system check. The "No" branch of the second diamond loops back to the step before the check, which keeps the user working on the same task.
Branch destinations
Every branch ends in one of three ways. Knowing which one you mean keeps the diagram honest.
- Rejoin. The branch returns to the main path later. In the sign-in flow, the sign-up branch rejoins at the home screen.
- Loop. The branch returns to an earlier step so the user can try again. The error message loops to the credentials step.
- Terminate. The branch reaches its own end point, such as "Account locked" or "Cancelled". Use a terminator shape so it is clear that the end is deliberate.
A branch that stops without a terminator is a dead end. The next chapter covers dead ends in detail, but you can catch many of them here by asking, for each branch, which of the three endings it has.
Binary versus multi-way decisions
Most decisions are binary, and binary decisions are the easiest to read. Some are not.
A multi-way decision has three or more outcomes. Plan selection is an example: Free, Pro, or Team. A diamond with three labeled exits is acceptable in most notations. If the labels grow past four or five, the diagram becomes hard to read, and you have two options.
- Group the outcomes into categories and decide in two steps. "Paid plan?" then "Pro or Team?"
- Move the detail into a table and keep the flow at the category level.
A common mistake is to chain several binary diamonds that really test one thing. Three diamonds asking "Is it Free?", "Is it Pro?", "Is it Team?" in sequence are a multi-way decision drawn in a roundabout way. One diamond with three exits says the same thing more clearly.
Conditions that combine
Real rules often combine several facts. "User can check out if the cart is not empty and the address is saved and the payment method is valid." You can draw this in two ways.
- Sequential diamonds. One diamond per fact, in order. This is easy to read and shows where the user is sent for each missing fact. Use it when each failure needs a different response.
- Single diamond with a combined condition. "Ready to check out?" This is compact. Use it when all failures lead to the same response, or when the detailed rules live in a separate document.
Prefer sequential diamonds when the failure responses differ, since the diagram's job is to show what the user experiences.
A decision with a loop and a rule
The password reset flow below has one decision: whether the new password meets the rules. The "No" branch loops back to the entry step and shows hints.
Notice what the loop does. The user stays on the same step and does not repeat the earlier steps. Sending the person back to the email step would be a design flaw. It would force them to redo work that the system already accepted.
Checking your branches in code
When a flow has many decisions, you can store it as data and check it. The script below represents each step as a key and its next steps as a list. It finds steps that lead nowhere and are not declared end points. It also finds decision steps that have only one exit, which usually means a branch is missing.
const flow = {
open_app: ["has_account"],
has_account: ["login_form", "signup_form"],
login_form: ["credentials_valid"],
signup_form: ["home"],
credentials_valid: ["home", "login_error"],
login_error: ["login_form"],
home: [],
};
const endpoints = new Set(["home"]);
const decisions = new Set(["has_account", "credentials_valid"]);
const deadEnds = Object.entries(flow)
.filter(([step, next]) => next.length === 0 && !endpoints.has(step))
.map(([step]) => step);
const thinDecisions = Object.entries(flow)
.filter(([step, next]) => decisions.has(step) && next.length < 2)
.map(([step]) => step);
console.log(deadEnds); // []
console.log(thinDecisions); // []Both lists are empty, so every non-end step leads somewhere and every decision has at least two exits. If you delete "login_error" from credentials_valid, thinDecisions reports ["credentials_valid"]. That is exactly the missing failure branch.
Common errors
- Unlabeled branches. The reader cannot tell which outcome a line represents. Label every exit.
- Missing outcome. A "Yes" with no "No". This is the most frequent cause of unplanned dead ends.
- Diamonds that are really steps. "Enter password" is an action, not a decision. Use a rectangle.
- Hidden system decisions. The product checks a rule, but the diagram jumps straight to success. Add the diamond.
- Too many decisions in one flow. If a diagram has a dozen diamonds, it probably covers more than one goal. Split it, as discussed in the scoping chapter.
- Looping back too far. A retry should return to the nearest sensible step, not the start.
- Unbounded loops. A retry loop with no limit hides a real requirement. Ask whether the product locks the account or offers another route after several failed attempts, and draw that branch.
Decisions and the happy path
The happy path follows the most likely answer at every diamond. Other branches are alternatives. When you are reviewing, trace the happy path first, then walk each branch out of each diamond in turn until it rejoins, loops, or terminates. Only then is the diagram complete enough to turn into error paths and, later, wireframes.
Summary of the working model
- A decision point is a diamond with one question and labeled exits.
- Decisions are made by the user, the system, or the context. System and context checks are the ones people forget.
- Branches must be exhaustive and mutually exclusive.
- Each branch rejoins, loops, or terminates.
- Prefer sequential diamonds when failures need different responses, and a single multi-way diamond for one choice with several outcomes.
Exercise
A checkout flow has this step: "Check stock." If the item is in stock, the user proceeds to payment. Nothing else is drawn. Name the problem, and describe what you would add so the decision is complete.
Show answer
The decision has only one exit, so the out-of-stock outcome is missing and the branches are not exhaustive. Label the diamond "In stock?" with a "Yes" branch to payment and a "No" branch. The "No" branch needs a destination: for example, show an "Out of stock" message and either loop back to the product page, offer a notify-me sign-up that ends in its own terminator, or suggest an alternative item. Each choice must rejoin, loop, or terminate.
Exercise
You draw three diamonds in a row: "Is plan Free?", "Is plan Pro?", "Is plan Team?" Each "No" leads to the next diamond. How would you redraw this, and why?
Show answer
Replace the three diamonds with one diamond, "Which plan?", with three labeled exits: Free, Pro, and Team. The original chain tests a single fact in a roundabout way, which makes the diagram longer and hides that the outcomes are parallel. A single multi-way diamond is exhaustive and mutually exclusive in one view.