Diagrams guide

How to make a sequence diagram from Mermaid text

List who takes part, then write one line per message in time order. How to write it as text, draw it on a board and check the order with the people involved.

Diagrams · · 6 minute read

The short answer

  • Name everyone who takes part first, left to right in the order they first act.
  • Write one line per message, in time order, with a verb in every label.
  • Walk the finished sequence with the people who do each step before you share it.

A finished example

This is what the Sequence diagram template can look like once it is filled in. This one is for a shopper tracking an order.

An example made up for this guide. Your own board starts with the headings and prompts, and you add the notes.
Read the example as words
The board
Shopper
Shop app
Order service
Orders database
1. Taps “Track”
2. Sends request
3. Finds the order
4. Returns data
5. Replies
6. Shows “Arriving today”

Write one line for each message, in order

A sequence diagram shows who talks to whom, and in what order. In Mermaid text, you list the people or systems taking part, then write one line per message, from the first request to the last reply.

This guide is for anyone explaining a hand-off between people or systems: a booking, a referral, an order or an approval. You will end with the sequence written as text and drawn on a board, checked by the people who do the work.

A sequence diagram answers a different question from a flowchart. A flowchart shows decisions and paths. A sequence diagram shows the conversation: who asks, who answers and who waits.

On doodleboard, Diagram from text reads Mermaid sequence diagrams as well as flowcharts. Paste the text and the board draws a column for each participant and an arrow for each message. If you would rather draw by hand, a template gives you the columns to start from.

Keep the text as well as the drawing. The text is the precise record, easy to edit and check. The drawing is what people look at in a meeting. Both sit on one board, on every plan including Free.

From a list of messages to a drawn sequence

Allow thirty minutes for a sequence of eight to ten messages.

  • List who takes part, left to right in the order they first act. Keep it to five or fewer.
  • On doodleboard, choose More, then Diagram from text (Mermaid).
  • Write sequenceDiagram on the first line, then a participant line for each, such as participant Patient.
  • Write each message as one line: Patient->>Reception: Asks for repeat. Use ->> for a request and -->> for a reply.
  • Read the lines back before you add them. Every request should have a reply, or a reason it does not.
  • Choose Add to the board. Each participant becomes a column with a line down from it. Each message becomes a numbered arrow, and replies are dashed.
  • Reword or move anything by hand. To add a message later, draw a connector between two of the lines and label it.
  • To keep the text beside the drawing, choose More, then Doc, and paste it in. Title it with the scenario, such as "Repeat prescription: normal route".
  • To start by hand instead, choose More, then Template, and pick the Sequence diagram template. It has four heads with lines down from each.

The finished drawing should read top to bottom exactly as the text does. Frame the doc and the drawing together.

A GP surgery checks its repeat prescription route

Take the admin team at a GP surgery, as an example. Patients complained that repeat prescriptions went missing, and each person blamed a different step.

The practice manager wrote the route as text with five participants: Patient, Online form, Reception, GP and Pharmacy. The first lines read:

  • Patient->>Online form: Requests repeat
  • Online form->>Reception: Adds to the queue
  • Reception->>GP: Sends for signing
  • GP-->>Reception: Signs or queries
  • Reception->>Pharmacy: Sends prescription
  • Pharmacy-->>Patient: Texts when ready

She pasted it into Diagram from text, and the board drew it with the replies dashed. At the team meeting she asked each person to read their own line aloud and say if it was true.

The GP stopped at line four. Queries did not go back to reception; they went to a separate inbox that nobody checked on Fridays. That was where prescriptions vanished.

The manager added two lines for the query route and redrew those arrows. The fix was a named person checking the inbox each Friday, written as an action on the board with an owner and a due date.

Where sequence diagrams mislead

A sequence diagram looks exact, so people trust it. That makes its mistakes more costly than a rough sketch's.

Two stories in one drawing. The normal route and the problem route get mixed, and nobody can tell which arrows happen together. Draw one scenario per diagram. Title each, such as "Normal route" and "When the GP has a query".

Replies left out. Writers note the requests and forget the answers. A request with no reply is either a gap in the process or a gap in the drawing. Check every arrow pointing right has one pointing back.

Too many participants. Beyond five or six, arrows cross the whole board and the order gets hard to follow. Merge minor players, or split the sequence into two parts at a natural pause.

Labels without verbs. An arrow labelled "Prescription" says nothing. "Sends prescription" or "Signs or queries" says what happens. Start every label with a verb.

Drawing what should happen, not what does. Write the first version from what people actually do, even if it is untidy. Fix the process next, as a separate diagram.

Checking the order with the people who do it

A sequence diagram is only right once the people in it agree with their lines. A shared board makes that check quick.

On doodleboard, put the doc and the drawing in one frame, then select Present in the session bar. Everyone on the board sees the same frame while you talk on your video call. Select Bring all if people wander off elsewhere on the board.

Ask each person to read their own lines and say "true", "nearly" or "wrong". A person who only looks can say it aloud; they do not need to edit anything. Note each "nearly" and "wrong" as a comment on the arrow, with the reason.

Comments are on every plan and can be replied to and marked resolved. Type @ and a teammate's name to mention them, and they get it in their inbox and by email.

On Free and Solo, only you edit, so you update the text and the drawing after the check. On Team, the person who owns a step can fix their own line.

Keep both versions while you change the process. If you are on Solo or Team, board history keeps up to 50 recent versions for 30 days.

Questions people ask

Can doodleboard draw a sequence diagram from Mermaid text?

Yes. Choose More, then Diagram from text (Mermaid), and paste text that starts with sequenceDiagram. doodleboard draws a column for each participant and a numbered arrow for each message. Blocks such as loop and alt are left out, so add those by hand.

What is the difference between ->> and -->> in Mermaid?

In a Mermaid sequence diagram, ->> draws a solid arrow, used for a request or an action. A double dash, -->>, draws a dashed arrow, used for a reply. Copy the same difference in your drawing with dashed lines.

How many participants should a sequence diagram have?

Two to five is easy to read. With more, arrows cross the whole page and the order is hard to follow. Merge minor players or split the sequence at a natural pause.

Should I draw a flowchart or a sequence diagram?

Draw a flowchart when the question is what happens next and where the choices are. Draw a sequence diagram when the question is who hands what to whom, and who is waiting.

Features: More than sticky notes

Put it on a shared whiteboard

Start for free with one board and up to three people, or try every feature for 7 days.

Start for freeSee pricing