Diagramate

Microservice Call Sequence Diagram Template

Order creation call chain across client, API gateway, order service, inventory service, message queue and notification service, with activation bars and an asynchronous event. For microservice design documents, exported as PNG, Word or PowerPoint for free.

Notification serviceMessage queueInventory serviceOrder serviceAPI gatewayClientNotification serviceMessage queueInventory serviceOrder serviceAPI gatewayClientPOST /ordersCreate orderReserve stockStock reservedPublish "order created" event201 with order idReturn order idConsume eventPush "order placed" notification
Previewed in the “Ink Teal” theme; you can switch themes in the editor
Open in the editorFree · No sign-up · No watermark

Edit the text, pick a theme, export Word / PowerPoint / PDF

When to use it

Microservice architecture design, integration notes and technical reviews. activate / deactivate draws the period during which a service is handling a request; the message queue decouples the notification from the main call chain, so synchronous calls and asynchronous events are easy to tell apart.

Making it yours

  • Add a service with participant X as Name; participants are laid out left to right in the order they first appear.
  • Synchronous calls use ->> plus a -->> reply; asynchronous events use a single ->> with no reply.
  • Add timeouts and fallbacks with alt Inventory service timed out … else … end around the reservation.
  • Add autonumber under the first line if you want numbered messages.

Mermaid code

sequenceDiagram
    participant C as Client
    participant G as API gateway
    participant O as Order service
    participant I as Inventory service
    participant Q as Message queue
    participant N as Notification service
    C->>G: POST /orders
    G->>O: Create order
    activate O
    O->>I: Reserve stock
    activate I
    I-->>O: Stock reserved
    deactivate I
    O->>Q: Publish "order created" event
    O-->>G: 201 with order id
    deactivate O
    G-->>C: Return order id
    Q->>N: Consume event
    N-->>C: Push "order placed" notification

Ask an AI for one with this structure

Send the prompt below to ChatGPT or Claude, then paste the whole reply into the editor; the code inside is detected automatically.

Draw a microservice order creation sequence diagram in Mermaid sequenceDiagram syntax with participants Client, API gateway, Order service, Inventory service, Message queue and Notification service. The client calls the gateway, which calls the order service; the order service synchronously reserves stock with the inventory service, publishes an "order created" event to the queue and returns the order id; the notification service consumes the event and pushes a notification to the client. Use activate/deactivate for the order and inventory services. Output only the mermaid code block.

FAQ

What is the difference between activate and the + / - shorthand?

O->>I: Reserve stock followed by activate I is the same as O->>+I: Reserve stock, and -->>- matches deactivate. The long form reads more easily; AI-generated code uses both.

Too many participants make the diagram wide

Merge minor participants (for example gateway and client), or group services with box and shorten names. SVG export scales without loss.

How do I name the event on the queue?

Put it in the message text in quotes, for example "order created". Avoid semicolons in message text.

More in this category

All templates

Updated 2026-09-05