---
title: Migration L2 Container Diagram Example | Coexistence Architecture
description: "Migration L2 Container diagram example with copy-paste Mermaid markup. Shows phased coexistence: BizTalk keeps legacy invoice and planning workloads while Azure Integration Services handles new order processing, bridged by Service Bus and sharing the core systems."
---

# :fa-container-storage: Migration L2 Container Diagram Example

This migration container diagram is the L2 view of the [Migration Journey example set][Migration Overview]. It zooms in from the [L1 Context example][L1 Example] and models a realistic phased migration where both integration platforms coexist.

BizTalk continues to process invoices while Azure Integration Services handles new order processing, and a Service Bus Bridge connects the legacy and new integration paths. Copy the `C4Container` markup below and follow [Import Your First C4 Diagram][] to import it into a [C4 Diagram Set][What is a C4 Diagram Set?]. See [C4 Diagrams][] for the concepts.

:new7.12: An L2 shows the inside of one [System][Systems], its Architectural Scope. Here that is the migration target:

* The `System_Boundary` named *Azure Integration Services* is the subject boundary. The import wizard takes the scope from it when its name matches a System; in the Designer its binding is derived from the scope and read-only.
* The Containers inside bind to the target's [Services][] or [Contracts][], never to a System.
* The BizTalk Services that still run belong to another System, so they stand outside as `Container_Ext`, grouped in the `Boundary` *BizTalk Server (current)*. Their *Owner* navigation pill leads to their own System's L2 when the set has one (see [Navigation Between C4 Diagrams][]); in the [Order-to-Cash demo][] they belong to *Portal* and *ERP*, which have no L2 in this set.
* The shared business core (Portal, ERP, ERP-Finance, Warehouse Management System) and the external parties are `System_Ext`, `SystemDb_Ext`, and `SystemQueue_Ext` outside the boundary, bound to their Systems. A `Container` named after a System is imported as an unbound placeholder with the note to draw it as a System shape.
* Generic boundaries are allowed on an L2. **Resolve All** creates a [Domain][Domains] for *Migrated workloads* and for *BizTalk Server (current)*, and Services of *Azure Integration Services* for the new Containers; choose **Leave unbound** on a row to keep it unbound ([Before you import][Migration Overview#before-you-import]).

![Import the L2 Container markup of this page: the scope Azure Integration Services comes from the System Boundary, BizTalk Server (current) becomes a Domain, Import, and open the diagram, animated walkthrough (7.13)][Hero]  
*Animated walkthrough, after the [L1 example][L1 Example] is imported: the diagram *Migration Coexistence - Container View* opens with the migrated workloads inside Azure Integration Services.*  

![Migration L2 Container diagram: the Azure Integration Services boundary with Migrated workloads, BizTalk Server (current) below it with the two BizTalk Services, the business core and external Systems above (7.12)][1]  
*An L2 Container diagram of the migration coexistence scenario, with the BizTalk and Azure Integration Services workloads side by side.*  

## Example Diagram

<table>
<tr>
<th>:fa-eye: Preview</th>
<th>:fa-code: Mermaid Code</th>
</tr>
<tr>
<td>

```mermaid
C4Container
    title Migration Coexistence - Container View
    System_Ext(portal, "Portal", "Unchanged customer-facing order entry")
    System_Boundary(azure_target, "Azure Integration Services") {
        Boundary(target_state, "Migrated workloads", "Layer") {
            Container(api_management_new, "API Management", "REST API Gateway", "Front door for migrated APIs")
            Container(order_logic_app_new, "INT1337-SND-Confirm-Outgoing", "Logic Apps", "Migrated order confirmation workflow")
            Container(invoice_logic_app_new, "INT1337-INV-Order-Invoiced", "Logic Apps", "Migrated invoice workflow")
            ContainerQueue(service_bus_bridge, "Service Bus Bridge", "Service Bus", "Bridge between legacy and new integration paths")
            Container(function_transform, "Azure Functions - Transformation", "Azure Functions", "Transformation and enrichment")
        }
    }
    Boundary(current_state, "BizTalk Server (current)") {
        Container_Ext(biztalk_order_legacy, "INT1337-RCV-Order-Incoming", "BizTalk Runtime", "Current-state order intake")
        Container_Ext(biztalk_sync_legacy, "INT1337-PLN-Order-Scheduled", "BizTalk Runtime", "Current-state planning synchronization")
    }
    System_Ext(shared_erp, "ERP", "Unchanged business core")
    System_Ext(shared_erp_finance, "ERP-Finance", "Unchanged business core")
    System_Ext(shared_wms, "Warehouse Management System", "Unchanged business core")
    System_Ext(payment_gateway, "Payment Gateway", "Processes customer credit card payments")
    SystemDb_Ext(carrier_tracking, "Carrier Tracking DB", "Provides delivery confirmation status")
    SystemQueue_Ext(edi_gateway, "EDI Gateway", "B2B document exchange")
    Rel(portal, api_management_new, "Order API request/response", "HTTPS, JSON")
    Rel(api_management_new, order_logic_app_new, "Order API request/response", "HTTPS")
    Rel(order_logic_app_new, service_bus_bridge, "Publish migrated order event", "AMQP")
    Rel(service_bus_bridge, function_transform, "Consume and enrich", "AMQP")
    Rel(function_transform, shared_erp, "Write transformed order", "REST, SOAP")
    Rel(order_logic_app_new, shared_wms, "Create shipment", "REST")
    Rel(invoice_logic_app_new, shared_erp_finance, "Post invoice", "REST")
    Rel(biztalk_order_legacy, shared_erp, "Legacy order and invoice integration", "SOAP")
    Rel(biztalk_order_legacy, shared_erp_finance, "Legacy invoice posting", "SOAP, SQL")
    Rel(biztalk_sync_legacy, shared_erp_finance, "Legacy planning sync", "REST")
    Rel(order_logic_app_new, payment_gateway, "Migrated payment authorization", "REST")
    Rel(biztalk_order_legacy, carrier_tracking, "Legacy delivery status read", "REST")
    Rel(order_logic_app_new, carrier_tracking, "Target delivery status read", "REST")
    BiRel(biztalk_order_legacy, edi_gateway, "Legacy B2B document exchange", "AS2")
    BiRel(invoice_logic_app_new, edi_gateway, "Target B2B document exchange", "AS2")
    Rel(service_bus_bridge, biztalk_order_legacy, "Coexistence event bridge", "AMQP, Adapter")
```

</td>
<td>

```text
C4Container
    title Migration Coexistence - Container View
    System_Ext(portal, "Portal", "Unchanged customer-facing order entry")
    System_Boundary(azure_target, "Azure Integration Services") {
        Boundary(target_state, "Migrated workloads", "Layer") {
            Container(api_management_new, "API Management", "REST API Gateway", "Front door for migrated APIs")
            Container(order_logic_app_new, "INT1337-SND-Confirm-Outgoing", "Logic Apps", "Migrated order confirmation workflow")
            Container(invoice_logic_app_new, "INT1337-INV-Order-Invoiced", "Logic Apps", "Migrated invoice workflow")
            ContainerQueue(service_bus_bridge, "Service Bus Bridge", "Service Bus", "Bridge between legacy and new integration paths")
            Container(function_transform, "Azure Functions - Transformation", "Azure Functions", "Transformation and enrichment")
        }
    }
    Boundary(current_state, "BizTalk Server (current)") {
        Container_Ext(biztalk_order_legacy, "INT1337-RCV-Order-Incoming", "BizTalk Runtime", "Current-state order intake")
        Container_Ext(biztalk_sync_legacy, "INT1337-PLN-Order-Scheduled", "BizTalk Runtime", "Current-state planning synchronization")
    }
    System_Ext(shared_erp, "ERP", "Unchanged business core")
    System_Ext(shared_erp_finance, "ERP-Finance", "Unchanged business core")
    System_Ext(shared_wms, "Warehouse Management System", "Unchanged business core")
    System_Ext(payment_gateway, "Payment Gateway", "Processes customer credit card payments")
    SystemDb_Ext(carrier_tracking, "Carrier Tracking DB", "Provides delivery confirmation status")
    SystemQueue_Ext(edi_gateway, "EDI Gateway", "B2B document exchange")
    Rel(portal, api_management_new, "Order API request/response", "HTTPS, JSON")
    Rel(api_management_new, order_logic_app_new, "Order API request/response", "HTTPS")
    Rel(order_logic_app_new, service_bus_bridge, "Publish migrated order event", "AMQP")
    Rel(service_bus_bridge, function_transform, "Consume and enrich", "AMQP")
    Rel(function_transform, shared_erp, "Write transformed order", "REST, SOAP")
    Rel(order_logic_app_new, shared_wms, "Create shipment", "REST")
    Rel(invoice_logic_app_new, shared_erp_finance, "Post invoice", "REST")
    Rel(biztalk_order_legacy, shared_erp, "Legacy order and invoice integration", "SOAP")
    Rel(biztalk_order_legacy, shared_erp_finance, "Legacy invoice posting", "SOAP, SQL")
    Rel(biztalk_sync_legacy, shared_erp_finance, "Legacy planning sync", "REST")
    Rel(order_logic_app_new, payment_gateway, "Migrated payment authorization", "REST")
    Rel(biztalk_order_legacy, carrier_tracking, "Legacy delivery status read", "REST")
    Rel(order_logic_app_new, carrier_tracking, "Target delivery status read", "REST")
    BiRel(biztalk_order_legacy, edi_gateway, "Legacy B2B document exchange", "AS2")
    BiRel(invoice_logic_app_new, edi_gateway, "Target B2B document exchange", "AS2")
    Rel(service_bus_bridge, biztalk_order_legacy, "Coexistence event bridge", "AMQP, Adapter")
```

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

## Coexistence Focus

* :fa-hourglass-half: Legacy workload retained: BizTalk Invoice Processing
* :fa-rocket: New workload migrated: [Azure Logic Apps][] - Order Processing
* :fa-share-nodes: Shared systems: Portal, ERP, ERP-Finance, and Warehouse Management System

## Import-Friendly Notes

* `ContainerQueue` is used for bridge messaging to improve queue/bus classification.
* Shared-system names are consistent with BizTalk and Azure sets for matching reuse.
* :new7.12: Technologies list protocols with commas. The import reads the text after ` / ` as a [Message Type][Message Types] by exact name.

## :fa-hand-point-right: Next Steps

* :fa-cube: [L3 Component Diagram Example][L3 Example]  
* :fa-route: [Migration Journey Example Set][Migration Overview]  
* :fa-upload: [Import Your First C4 Diagram][]  

## :fa-link-horizontal: Related Topics

* :fa-sitemap: [L1 Context Diagram Example][L1 Example]  
* :fa-server: [BizTalk L2 Container Diagram Example][BizTalk L2]  
* :fa-cloud: [Azure L2 Container Diagram Example][Azure L2]  
* :fa-book: [C4 Example Library Overview][Examples Overview]  
* :fa-table: [C4 Model vs Nodinite Concept Mapping][]  

[1]:{ndm}/Documentation%20Pictures/IM/WebClient/Repository/C4/Examples/Migration/Container.png

[Azure L2]:{ndr}/Repository%20Model/C4%20Diagrams/Getting%20Started/Examples/Azure/L2%20Container%20Diagram%20Example.md
[Azure Logic Apps]:{ndr}/Logging%20and%20Monitoring/Azure%20Logic%20Apps/Overview.md
[BizTalk L2]:{ndr}/Repository%20Model/C4%20Diagrams/Getting%20Started/Examples/BizTalk/L2%20Container%20Diagram%20Example.md
[C4 Diagrams]:{ndr}/Repository%20Model/C4%20Diagrams/Overview.md
[C4 Model vs Nodinite Concept Mapping]:{ndr}/Repository%20Model/C4%20Diagrams/Troubleshooting/C4%20Model%20vs%20Nodinite%20Concept%20Mapping.md
[Contracts]:{ndr}/Getting%20Started/4.%20Repository/Contracts/Overview.md
[Domains]:{ndr}/Repository%20Model/Domains/Overview.md
[Examples Overview]:{ndr}/Repository%20Model/C4%20Diagrams/Getting%20Started/Examples/Overview.md
[Hero]:{ndm}/Documentation%20Pictures/IM/WebClient/Repository/C4/Examples/Migration/C4_MigrationExample_L2.gif
[Import Your First C4 Diagram]:{ndr}/Repository%20Model/C4%20Diagrams/Getting%20Started/Import%20Your%20First%20C4%20Diagram.md
[L1 Example]:{ndr}/Repository%20Model/C4%20Diagrams/Getting%20Started/Examples/Migration/L1%20Context%20Diagram%20Example.md
[L3 Example]:{ndr}/Repository%20Model/C4%20Diagrams/Getting%20Started/Examples/Migration/L3%20Component%20Diagram%20Example.md
[Message Types]:{ndr}/Repository%20Model/Message%20Types/Overview.md
[Migration Overview]:{ndr}/Repository%20Model/C4%20Diagrams/Getting%20Started/Examples/Migration/Overview.md
[Migration Overview#before-you-import]:{ndr}/Repository%20Model/C4%20Diagrams/Getting%20Started/Examples/Migration/Overview.md#before-you-import
[Navigation Between C4 Diagrams]:{ndr}/Repository%20Model/C4%20Diagrams/Features/Sync.md
[Order-to-Cash demo]:{ndr}/Repository%20Model/BPMs/Examples/Order-to-Cash/Generate-O2C-Demo-Data.md
[Services]:{ndr}/Repository%20Model/Services/Overview.md
[Systems]:{ndr}/Repository%20Model/Systems/Overview.md
[What is a C4 Diagram Set?]:{ndr}/Repository%20Model/C4%20Diagrams/Features/What%20is%20a%20C4%20Diagram%20Set.md