---
title: L2 Container Diagram Example | Nodinite C4 Diagrams
description: "L2 Container example built on the Order-to-Cash demo data: the Portal's four Services inside its System Boundary, ERP outside as an external System, and Flows that carry O2C Message Types. Copy-paste Mermaid markup, the scope taken from the markup, and what each element binds to."
---

# <i class="fal fa-container-storage" aria-hidden="true"></i> 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. <sup><span class="nodinite-new-badge">New 7.12</span></sup> The boundary is the diagram's **subject boundary**: it is bound to the diagram's [Architectural Scope][Diagram Set Fundamentals], and that binding is read-only in the Designer.

This page is example 3 of the six [Order-to-Cash C4 examples][Hub]. See [Example C4 Diagrams][] for an overview of all diagram types and when to use each.

![The Portal's L2 Container diagram: its four Services inside the Portal System Boundary and the Customer and ERP outside, the Service INT1337-RCV-Order-Incoming, the relationship Forwards the order for entry with XML / O2C.Forwarding/1.0, and the Inside pill opening the L3 Component diagram of INT1337-RCV-Order-Incoming, animated walkthrough (7.12)][Hero]  
*Animated walkthrough: the imported L2 Container, a relationship with its [Message Type][Message Types], and **Inside** to the L3 Component of **INT1337-RCV-Order-Incoming**.*    

<aside aria-label="Info" class="nodinite-note nodinite-note--info">
<p class="nodinite-note__label" aria-hidden="true"><i class="far fa-fw fa-square-info"></i> Info</p>
<div class="nodinite-note__content"><p><strong>To use this example in <span class="nodinite-product-name" title="The node that unites different systems. Or as we call it Nodinite">Nodinite</span>,</strong> copy the Mermaid markup below and follow the <a href="https://docs.nodinite.com/repository-model/c4-diagrams/getting-started/import-your-first-c4-diagram/">Import Your First C4 Diagram</a> walkthrough to create a <a href="https://docs.nodinite.com/repository-model/c4-diagrams/features/what-is-a-c4-diagram-set/">C4 Diagram Set</a> and <a href="https://docs.nodinite.com/repository-model/c4-diagrams/features/import/">import</a> the markup. <sup><span class="nodinite-new-badge">New 7.12</span></sup> Container nodes bind to a Service or a Contract, <strong>never a System</strong>: a System is drawn with a System shape, such as <code>System_Ext</code> for ERP below.</p></div>
</aside>

## 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 |

<sup><span class="nodinite-new-badge">New 7.12</span></sup> 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][].

<aside aria-label="Important" class="nodinite-note nodinite-note--important">
<p class="nodinite-note__label" aria-hidden="true"><i class="far fa-fw fa-message-exclamation"></i> Important</p>
<div class="nodinite-note__content"><p>The <a href="https://docs.nodinite.com/repository-model/bpms/examples/order-to-cash/generate-o2c-demo-data/">O2C PowerShell demo</a> generates the Repository entities used in these examples. Do not rename generated Systems, Services, <a href="https://docs.nodinite.com/repository-model/endpoints/overview/">Endpoints</a>, <a href="https://docs.nodinite.com/repository-model/domains/overview/">Domains</a>, or <a href="https://docs.nodinite.com/repository-model/message-types/overview/">Message Types</a> during import.</p></div>
</aside>

## 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][L3 Example]  

## Example: Portal — L2 Container Diagram

This example uses the [Order-to-Cash (O2C) demo][O2C Overview] 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. <sup><span class="nodinite-new-badge">New 7.12</span></sup> Each Flow between two Services, or between a Service and ERP, names the sender's Message Type after the `/` in its technology.

<table>
<tr>
<th><i class="fal fa-eye" aria-hidden="true"></i> Preview</th>
<th><i class="fal fa-code" aria-hidden="true"></i> Mermaid Code</th>
</tr>
<tr>
<td>

```mermaid
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")
```

</td>
<td>

```text
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")
```

</td>
</tr>
</table>

## What Each Element Binds To

| Markup element | Macro | Binds to | Status in Review & Resolve |
|---|---|---|---|
| Portal | `System_Boundary` | The [System][Systems] **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][Systems] **ERP** | Matched |
| Customer | `Person` | A [System][Systems] 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 | <sup><span class="nodinite-new-badge">New 7.12</span></sup> 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][Component Types], and <sup><span class="nodinite-new-badge">New 7.12</span></sup> 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

<sup><span class="nodinite-new-badge">New 7.12</span></sup> 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][L3 Example]).  
* **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][Deployment Example] and the [Dynamic][Dynamic Example] of the set.  

See [Navigation Between C4 Diagrams][] for every pill.

## <i class="fal fa-hand-point-right" aria-hidden="true"></i> Next Steps

* <i class="fal fa-cube" aria-hidden="true"></i> [L3: Component Diagram Example][L3 Example] — Zoom into the Service INT1337-RCV-Order-Incoming  
* <i class="fal fa-hammer" aria-hidden="true"></i> [Build the Order-to-Cash C4 set][]  
* <i class="fal fa-book" aria-hidden="true"></i> [Order-to-Cash C4 Examples][Hub]  
* <i class="fal fa-upload" aria-hidden="true"></i> [Import Your First C4 Diagram][]  

## <i class="fal fa-link-horizontal" aria-hidden="true"></i> Related Topics

* <i class="fal fa-book" aria-hidden="true"></i> [Example C4 Diagrams][] — Overview of all diagram types  
* <i class="fal fa-sitemap" aria-hidden="true"></i> [L1: Context Diagram Example][L1 Example] — Zoomed-out view of the Portal  
* <i class="fal fa-server" aria-hidden="true"></i> [Deployment Diagram Example][Deployment Example] — Where these Services run  
* <i class="fal fa-diagram-project" aria-hidden="true"></i> [O2C Demo — C4 Architecture Diagrams][O2C C4 Diagrams] — How the O2C log events map to C4 elements  
* <i class="fal fa-compass" aria-hidden="true"></i> [Navigation Between C4 Diagrams][]  
* <i class="fal fa-compass" aria-hidden="true"></i> [What is C4 Diagrams?][What is C4 Diagrams?]  

[BPM]:https://docs.nodinite.com/repository-model/bpms/overview/
[Build the Order-to-Cash C4 set]:https://docs.nodinite.com/repository-model/c4-diagrams/getting-started/examples/order-to-cash/build-the-order-to-cash-c4-set/
[Component Types]:https://docs.nodinite.com/repository-model/component-types/overview/
[Contracts]:https://docs.nodinite.com/getting-started/repository/contracts/overview/
[Deployment Example]:https://docs.nodinite.com/repository-model/c4-diagrams/getting-started/examples/order-to-cash/deployment-diagram-example/
[Diagram Set Fundamentals]:https://docs.nodinite.com/repository-model/c4-diagrams/features/diagram-set-fundamentals/
[Domains]:https://docs.nodinite.com/repository-model/domains/overview/
[Dynamic Example]:https://docs.nodinite.com/repository-model/c4-diagrams/getting-started/examples/order-to-cash/dynamic-diagram-example/
[Endpoints]:https://docs.nodinite.com/repository-model/endpoints/overview/
[Example C4 Diagrams]:https://docs.nodinite.com/repository-model/c4-diagrams/getting-started/example-c4-diagrams/
[Generate from Integration Landscape]:https://docs.nodinite.com/repository-model/c4-diagrams/features/generate-from-integration-landscape/
[Generate O2C Demo Data]:https://docs.nodinite.com/repository-model/bpms/examples/order-to-cash/generate-o2c-demo-data/
[Hero]:https://docs.nodinite.com/media/Documentation%20Pictures/IM/WebClient/Repository/C4/C4_O2C_L2Container.gif
[Hub]:https://docs.nodinite.com/repository-model/c4-diagrams/getting-started/examples/order-to-cash/overview/
[Import]:https://docs.nodinite.com/repository-model/c4-diagrams/features/import/
[Import Your First C4 Diagram]:https://docs.nodinite.com/repository-model/c4-diagrams/getting-started/import-your-first-c4-diagram/
[L1 Example]:https://docs.nodinite.com/repository-model/c4-diagrams/getting-started/examples/order-to-cash/l1-context-diagram-example/
[L3 Example]:https://docs.nodinite.com/repository-model/c4-diagrams/getting-started/examples/order-to-cash/l3-component-diagram-example/
[Message Types]:https://docs.nodinite.com/repository-model/message-types/overview/
[Navigation Between C4 Diagrams]:https://docs.nodinite.com/repository-model/c4-diagrams/features/sync/
[O2C C4 Diagrams]:https://docs.nodinite.com/repository-model/bpms/examples/order-to-cash/o2c-c4-diagrams/
[O2C Overview]:https://docs.nodinite.com/repository-model/bpms/examples/order-to-cash/overview/
[Services]:https://docs.nodinite.com/repository-model/services/overview/
[Systems]:https://docs.nodinite.com/repository-model/systems/overview/
[What is a C4 Diagram Set?]:https://docs.nodinite.com/repository-model/c4-diagrams/features/what-is-a-c4-diagram-set/
[What is C4 Diagrams?]:https://docs.nodinite.com/repository-model/c4-diagrams/features/what-is-c4-diagrams/