When to use it
Contract approval in a company policy, workflow documentation for an approval system, onboarding material, and any approval where one document passes through several departments: sealing, external correspondence, supplier onboarding. Five roles have one lane each, legal and finance each own a decision point, and all three return paths lead back to drafting, so who checks what at which step is visible at a glance.
Making it yours
- A lane is a
subgraph Name … endblock: remove a department by deleting its block and reconnecting the edges, add one (for example "Procurement") by adding a block. - Decisions are diamond nodes
{ }with the outcome written on the edge:C -- Yes --> D,C -- Revise --> A. To distinguish "return for revision" from "stop", add a nodeZ[Process ends]in the requester's lane. - For amount-based escalation (for example above 50,000 needs the CEO), add a diamond
{Amount within limit?}in the finance lane and route "No" to a new "CEO" lane. - For a long process change
TBon the first line toLR, or switch the direction under "Layout" in the editor, and the lanes run horizontally. - Double-click any node in the preview to edit its text.
Mermaid code
flowchart TB
subgraph Requesting department
A[Draft contract] --> B[Submit for approval]
H[Collect and file contract]
end
subgraph Legal
C{Terms compliant?}
end
subgraph Finance
D{Payment terms and budget OK?}
end
subgraph Executive sponsor
E[Sign-off]
end
subgraph Administration
F[Apply company seal] --> G[Number and archive]
end
B --> C
C -- Yes --> D
C -- Revise --> A
D -- Yes --> E
D -- Revise --> A
E -- Approved --> F
E -- Rejected --> A
G --> HAsk an AI for one with this structure
Send the prompt below to ChatGPT or Claude, then paste the whole reply into the editor; the code inside is detected automatically.
Draw a cross-department approval swimlane diagram in Mermaid flowchart TB syntax. Use one subgraph per lane for [Requesting department, Legal, Finance, Executive sponsor, Administration]; put each role's steps inside its own subgraph and write the edges that cross roles after all the subgraphs. The process: the requesting department drafts and submits a [contract] → legal checks whether the terms are compliant (if not, back to drafting) → finance checks payment terms and budget (if not OK, back to drafting) → the executive sponsor signs off (if rejected, back to drafting) → administration applies the seal, numbers and archives it → the requesting department collects and files it. Use diamond nodes for decisions and label the branches on the edges. Output only the mermaid code block.
FAQ
- Won't three return arrows make the diagram messy?
All three point at the same node
A[Draft contract], and the layout engine gathers them there. If it still looks busy, route the returns to a single "Revise and resubmit" node, or drop the revise branches and keep only the main path, describing the return rules in the text.- Can I show parallel review by several departments?
Yes. Connect the submit node to both legal and finance (
B --> CandB --> D) and route both "Yes" edges to the executive sign-off. The layout engine places the two lanes side by side so the parallel review is obvious; the rule that both must pass has to be stated in the text, since the diagram carries no and/or logic.- How do I get this into Word for a policy document?
"Download Word" on this page gives you a docx with a 3x image and the code appended; after editing the steps, use "Export Word (docx)" in the editor for the same format. To drop it into an existing document, use "Copy PNG to clipboard" and paste.
More in this category
Updated 2026-09-22