L2 Container Diagram Example
Section titled “ L2 Container Diagram Example”The L2 Container diagram zooms into one System and shows its Services (and Contracts) as Containers, inside the System's boundary, with the neighbouring Systems outside. New 7.12 The boundary is the diagram's subject boundary: it is bound to the diagram's Architectural Scope, and that binding is read-only in the Designer.
This page is example 3 of the six Order-to-Cash C4 examples. See Example C4 Diagrams for an overview of all diagram types and when to use each.

Animated walkthrough: the imported L2 Container, a relationship with its Message Type, and Inside to the L3 Component of INT1337-RCV-Order-Incoming.
Scope for This Example
Section titled “Scope for This Example”| Example | Diagram type to pick in the import | Architectural Scope | Subject | When it is set | Needed before Promote |
|---|---|---|---|---|---|
| Portal — L2 Container Diagram | Container | System Portal | (the scope) | automatically: taken from the markup's System_Boundary(portal, "Portal") (the Scope step shows it as taken from the markup) |
✅ Yes |
New 7.12 The import wizard takes the scope itself from the top-level System_Boundary whose name matches a System. The Scope step shows Portal picked, and in Review & Resolve the boundary row reads Follows the scope: Portal. The set holds one Active L2 per System; the L2s of ERP, WMS and ERP-Finance come from Generate from Integration Landscape: see Build the Order-to-Cash C4 set.
When to Use
Section titled “When to Use”- ✅ Planning or reviewing one System's integration architecture
- ✅ Communicating which Services a System runs and how they hand messages on
- ✅ Identifying the Flows between Services and to neighbouring Systems, each with its Message Type
- ⚠️ Does not show what happens inside one Service: that belongs in L3
Example: Portal — L2 Container Diagram
Section titled “Example: Portal — L2 Container Diagram”This example uses the Order-to-Cash (O2C) demo data. The System_Boundary Portal holds the Portal's four Services, two of them business steps of the O2C BPM. ERP stands outside as a System_Ext, and the Customer drops the order file and gets the confirmation. New 7.12 Each Flow between two Services, or between a Service and ERP, names the sender's Message Type after the / in its technology.
| Preview | Mermaid Code |
|---|---|
|
C4Container
title Portal — L2 Container Diagram
Person(customer, "Customer", "Places orders and receives order confirmations")
System_Boundary(portal, "Portal") {
Container(rcv_order, "INT1337-RCV-Order-Incoming", "Integration / JSON", "Picks up the customer's order file. Step 0 — Milestone: Order Received from Customer")
Container(snd_order, "INT1337-SND-Order-Incoming", "Integration / XML", "Forwards the order to ERP for entry")
Container(rcv_confirm, "INT1337-RCV-Confirm-Incoming", "Integration / XML", "Receives the order entry ERP returns")
Container(snd_confirm, "INT1337-SND-Confirm-Outgoing", "Integration / CSV", "Sends the order confirmation. Step 2 — Milestone: Order Confirmation Delivered to Customer")
}
System_Ext(erp, "ERP", "Enters orders and schedules production")
Rel(customer, rcv_order, "Drops the order file", "HTTPS / JSON")
Rel(rcv_order, snd_order, "Hands the order on", "JSON / O2C.Order.Received/1.0")
Rel(snd_order, erp, "Forwards the order for entry", "XML / O2C.Forwarding/1.0")
Rel(erp, rcv_confirm, "Returns the order entry", "XML / O2C.Order.Entry/1.0")
Rel(rcv_confirm, snd_confirm, "Hands the entry on", "XML / O2C.Forwarding/1.0")
Rel(snd_confirm, erp, "Sends the confirmation for planning", "CSV / O2C.Order.Confirmation/1.0")
Rel(snd_confirm, customer, "Delivers the order confirmation", "CSV / O2C.Order.Confirmation/1.0")
|
|
What Each Element Binds To
Section titled “What Each Element Binds To”| Markup element | Macro | Binds to | Status in Review & Resolve |
|---|---|---|---|
| Portal | System_Boundary |
The System Portal: the subject boundary, bound from the scope | Follows the scope: Portal |
| INT1337-RCV-Order-Incoming, INT1337-SND-Order-Incoming, INT1337-RCV-Confirm-Incoming, INT1337-SND-Confirm-Outgoing | Container |
The Services of the same name | Matched |
| ERP | System_Ext |
The System ERP | Matched |
| Customer | Person |
A System with the C4 Type Person | Matched once the L1 import created it, otherwise New |
O2C.Order.Received/1.0, O2C.Forwarding/1.0, O2C.Order.Entry/1.0, O2C.Order.Confirmation/1.0 |
text after the / in a Rel technology |
New 7.12 The Message Types of exactly that name, in the Message Type column | Resolved |
HTTPS / JSON |
technology whose text after the / names no Message Type |
The Flow's protocol only | Kept as text |
A bound Container takes its icon from the Service's Component Type, and New 7.12 shows the Service's monitoring state. A Container named after a System, such as Container(erp, "ERP", …), would import as an unbound placeholder with the note to draw it as a System shape.
Navigation From the L2
Section titled “Navigation From the L2”New 7.12 The pills are inferred when the diagram opens, inside the set, with nothing stored:
- INT1337-RCV-Order-Incoming offers Inside: the L3 whose subject is that Service (example 4).
- ERP offers Inside and Context for ERP, once the set holds ERP's L2 and L1.
- The diagram itself offers Zoom out to Portal's L1, and Related view to the Deployment and the Dynamic of the set.
See Navigation Between C4 Diagrams for every pill.
Next Steps
Section titled “ Next Steps”- L3: Component Diagram Example — Zoom into the Service INT1337-RCV-Order-Incoming
- Build the Order-to-Cash C4 set
- Order-to-Cash C4 Examples
- Import Your First C4 Diagram
Related Topics
Section titled “ Related Topics”- Example C4 Diagrams — Overview of all diagram types
- L1: Context Diagram Example — Zoomed-out view of the Portal
- Deployment Diagram Example — Where these Services run
- O2C Demo — C4 Architecture Diagrams — How the O2C log events map to C4 elements
- Navigation Between C4 Diagrams
- What is C4 Diagrams?