C4 diagrams explain a system’s static structure: its people, software systems, containers, and components. A sequence diagram adds a runtime view, showing how selected participants exchange messages over time. It supplements the C4 views; it does not replace them. The official C4 model describes dynamic and deployment diagrams as supporting diagrams, and is otherwise notation- and tooling-independent.

When to use a sequence diagram
Use one when the order and timing of interactions are important to understanding a specific scenario, such as:

When to use a sequence diagram
Use one when the order and timing of interactions are important to understanding a specific scenario, such as:
-
A request that passes through several services or components.
-
A workflow with important responses, callbacks, retries, or timeouts.
-
A conditional flow where different outcomes lead to different interactions.
-
An asynchronous process where a request and its later result need to be distinguished.
-
A security- or reliability-sensitive path that needs review, such as authentication or payment processing.
A sequence diagram is especially useful when readers need to follow a scenario from start to finish. It can also help teams check whether the interactions they intend to build are consistent with their architectural decisions. Use it selectively: a trivial request or a flow already obvious in the C4 container or component view may not need its own diagram.
Choose a C4 dynamic diagram instead when the main point is which elements collaborate, rather than a precise timeline. Dynamic diagrams can show numbered interactions in a more flexible layout; sequence diagrams use lifelines and ordered messages.
-
A request that passes through several services or components.
-
A workflow with important responses, callbacks, retries, or timeouts.
-
A conditional flow where different outcomes lead to different interactions.
-
An asynchronous process where a request and its later result need to be distinguished.
-
A security- or reliability-sensitive path that needs review, such as authentication or payment processing.
A sequence diagram is especially useful when readers need to follow a scenario from start to finish. It can also help teams check whether the interactions they intend to build are consistent with their architectural decisions. Use it selectively: a trivial request or a flow already obvious in the C4 container or component view may not need its own diagram.
Choose a C4 dynamic diagram instead when the main point is which elements collaborate, rather than a precise timeline. Dynamic diagrams can show numbered interactions in a more flexible layout; sequence diagrams use lifelines and ordered messages.
Key concepts and purpose
A sequence diagram has a small set of core concepts:

-
Participants: People, systems, containers, or components involved in the scenario. Give them names that match the C4 model.
-
Lifelines: Vertical lines representing participants over the course of the interaction.
-
Messages: Arrows showing calls, events, responses, or other communications.
-
Activation bars: Optional markers showing when a participant is performing work.
-
Control-flow fragments: Blocks such as
altfor alternatives,loopfor repetition, andparfor concurrent work. -
Scope: A single scenario, not every possible behavior of the system.
The purpose is to make runtime behavior visible while keeping it connected to the static architecture. That connection matters: if a diagram introduces a new service or component, readers should be able to find it in the relevant C4 view—or know that the sequence diagram is describing a proposed design.
PlantUML examples
These examples use ordinary PlantUML sequence syntax. Participant names are chosen to align with C4 concepts; the sequence notation is not, by itself, a formal C4 diagram type.
1. Synchronous request and response

@startuml
title Checkout: place an order
actor Customer
participant "Web Store" as Web
participant "Checkout API" as Checkout
database "Order DB" as DB
Customer -> Web: Submit order
Web -> Checkout: POST /orders
activate Checkout
Checkout -> DB: Save pending order
DB --> Checkout: Order ID
Checkout --> Web: 201 Created + order ID
deactivate Checkout
Web --> Customer: Show confirmation
@enduml
This is a good fit when the main question is the order of a request, internal work, and response.
2. Alternative outcomes

@startuml
title Checkout: payment outcome
participant "Checkout API" as Checkout
participant "Payment Gateway" as Payment
database "Order DB" as DB
Checkout -> Payment: Authorize payment
alt Payment approved
Payment --> Checkout: Approved
Checkout -> DB: Mark order confirmed
DB --> Checkout: Updated
Checkout --> Checkout: Return success result
else Payment declined
Payment --> Checkout: Declined
Checkout -> DB: Mark payment failed
DB --> Checkout: Updated
Checkout --> Checkout: Return failure result
end
@enduml
Keep alternatives focused on outcomes that change the interaction. Don’t expand every business rule into its own branch unless that detail is important to the audience.
3. Asynchronous work and retry

@startuml
title Order processing: asynchronous fulfillment
participant "Checkout API" as Checkout
queue "Order Events" as Queue
participant "Fulfillment Worker" as Worker
participant "Inventory Service" as Inventory
Checkout -> Queue: Publish OrderPlaced
Queue -> Worker: Deliver event
activate Worker
loop Retry up to configured limit
Worker -> Inventory: Reserve items
alt Reservation succeeds
Inventory --> Worker: Reserved
Worker -> Queue: Publish ItemsReserved
break
else Temporary failure
Inventory --> Worker: Unavailable
Worker -> Worker: Wait before retry
end
end
deactivate Worker
@enduml
This example distinguishes the initial request from the later asynchronous processing. In a real design, document retry limits and failure handling in the accompanying text or requirements; the diagram should not be treated as the sole specification.
Good practices
-
Start from a named scenario. For example, “Customer places an order when payment succeeds.”
-
Use participants from the C4 views. Keep system, container, and component names consistent.
-
Show only relevant detail. Include protocols or payload details only when they help explain the design.
-
Make uncertainty explicit. Label proposed or assumed interactions rather than presenting them as implemented facts.
-
Use readable message labels. Prefer meaningful actions such as “Reserve inventory” over generic labels like “Call service.”
-
Separate distinct scenarios. A success path and a failure path may be clearer as separate diagrams if one diagram becomes crowded.
-
Review diagrams with the architecture. A sequence diagram can expose undocumented dependencies, but it should be checked against the actual system and kept current.
Tooling: Visual Paradigm and VPasCode
A visual C4 modeling tool and a diagram-as-code editor serve different, complementary needs.

Visual Paradigm’s C4 modeling tools are suited to building and discussing structured architecture views. A visual environment can be useful when stakeholders need to arrange elements, review relationships, or collaborate on the model.
VPasCode is a text-based diagram workflow: define a diagram as code, render it, and revise the source. Visual Paradigm describes VPasCode as supporting PlantUML and other diagram formats, with AI-assisted error fixing and format detection. The practical benefit of a textual source is that teams can store it with project files, review edits, and track changes through version control—provided the team actually keeps that source under review.
A useful workflow is:
-
Establish the system’s C4 context, container, or component view.
-
Select one scenario that needs a detailed runtime explanation.
-
Draft the sequence in PlantUML or another supported notation.
-
Render it in VPasCode and refine the participant names, message flow, and layout.
-
Review it alongside the static C4 views and implementation.
-
Store the source with the project documentation and update it when the behavior changes.
Why use diagram-as-code?
Diagram-as-code offers several practical benefits:
-
Reviewable changes: Text diffs can show exactly what changed in a diagram.
-
Version history: Teams can trace diagram updates alongside design or code changes.
-
Repeatable rendering: The source can be rendered again rather than relying on a manually exported image.
-
Automation potential: Rendering can be incorporated into documentation workflows.
-
Easier small edits: Changing a participant or message can be faster than rearranging a large diagram manually.
These are workflow advantages, not guarantees of accuracy. A code-based diagram can still be stale or misleading if nobody validates it.
Where Visual Paradigm’s AI ecosystem may stand out
Visual Paradigm’s proposed advantage is the combination of AI-assisted generation, editable diagram source, rendering, and documentation workflows. Its material describes a flow in which prompts can be turned into structured architecture specifications, represented in VPasCode, rendered, and published as documentation.
That combination may be valuable when a team wants to move quickly from an initial natural-language description to an editable diagram, then refine and review the result. The important distinction is that AI can accelerate drafting, but it cannot establish that a diagram accurately reflects the system. Engineers still need to verify participant identities, message direction, error paths, security assumptions, and consistency with the code and other C4 views.

For a fair evaluation, test the workflow on a real scenario and check whether it produces diagrams that are:
-
Correct enough to edit rather than rewrite.
-
Consistent with the team’s C4 vocabulary.
-
Easy to review in source control.
-
Simple to render and publish in the team’s existing documentation process.
Bottom line: Use a C4 supplementary sequence diagram when a particular scenario’s message order, branches, or asynchronous behavior needs explanation. Keep it narrowly scoped, align its participants with the static C4 model, and treat PlantUML, VPasCode, and AI as means of creating and maintaining the artifact—not substitutes for architecture review.
