---
# System prepended metadata

title: Transaction Management Improvement

---

# Transaction Management Improvement


```plantuml
!include https://raw.githubusercontent.com/plantuml-stdlib/C4-PlantUML/master/C4_Component.puml
```

## Architecture Diagram - Brand Dashboard - Existing

```plantuml
!include https://raw.githubusercontent.com/plantuml-stdlib/C4-PlantUML/master/C4_Component.puml

title Transaction Management - Brand Dashboard

Person(brand_admin, "Brand Admin")
System_Boundary(brand_web_system, "Brand Administration Web Application") {
    Container(browser, "Browser", "Software System", "All supported browser")
    Container(brand_dashboard, "Brand Dashboard", "Nuxt.js", "Provides management functionalities to brand admin via their web browser")
}
System_Boundary(api_endpoint, "API Endpoint") {
    Container(brand_api, "evermos-brand-be API", "PHP", "Provides brand management functionalities via HTTPS / REST / JSON API")
    Container(order_api, "evm-order API", "PHP", "Provides order management functionalities via HTTPS / REST / JSON API")
    Container(admin_api, "evermos-admin-be API", "PHP", "Provides admin management functionalities via HTTPS / REST / JSON API")
    Container(gss_api, "evm-gss API", "PHP", "Provides GSS management functionalities via HTTPS / REST / JSON API")

}
System_Boundary(db, "Databases") {
    ContainerDb(db_evm, "Database", "MySQL", "evm schema")
    ContainerDb(db_itr, "Database", "MySQL", "itr schema")
}

ContainerDb(gss, "Database", "GraphSQL", "open search")

Rel_R(brand_admin, browser, "Request", "Client Device")
Rel_R(browser, brand_dashboard, "Access", "HTTPS")
Rel_R(brand_dashboard, brand_api, "Makes API calls to", "HTTPS / REST / JSON")
Rel(brand_api, order_api, "Makes API calls to", "HTTPS / REST / JSON")
Rel(brand_api, admin_api, "Makes API calls to", "HTTPS / REST / JSON")
Rel(order_api, gss_api, "Makes API calls to", "HTTPS / REST / JSON")
Rel(brand_api, db_evm, "Reads from & Writes to", "TCP/IP")
Rel(brand_api, db_itr, "Reads from & Writes to", "TCP/IP")
Rel_R(admin_api, db_evm, "Reads from & Writes to", "TCP/IP")
Rel(admin_api, db_itr, "Reads from & Writes to", "TCP/IP")
Rel_R(order_api, db_evm, "Reads from & Writes to", "TCP/IP")
Rel(gss_api, gss, "Reads from & Writes to", "TCP/IP")


```

## Architecture Diagram - Mimin Dashboard - Existing

```plantuml
!include https://raw.githubusercontent.com/plantuml-stdlib/C4-PlantUML/master/C4_Component.puml

title Transaction Management - Mimin Dashboard

Person(admin, "Admin")
System_Boundary(admin_web_system, "Evermos Administration Web Application") {
    Container(browser, "Browser", "Software System", "All supported browser")
    Container(admin_dashboard, "Admin Dashboard", "Nuxt.js", "Provides management functionalities to evermos admin via their web browser")
}
System_Boundary(api_endpoint, "API Endpoint") {
    Container(admin_api, "evermos-admin-be API", "PHP", "Provides admin management functionalities via HTTPS / REST / JSON API")
}
System_Boundary(db, "Databases") {
    ContainerDb(db_evm, "Database", "MySQL", "evm schema")
    ContainerDb(db_itr, "Database", "MySQL", "itr schema")
}

Rel_R(admin, browser, "Request", "Client Device")
Rel_R(browser, admin_dashboard, "Access", "HTTPS")
Rel_R(admin_dashboard, admin_api, "Makes API calls to", "HTTPS / REST / JSON")
Rel_R(admin_api, db_evm, "Reads from & Writes to", "TCP/IP")
Rel(admin_api, db_itr, "Reads from & Writes to", "TCP/IP")


```

## Architecture Diagram - Open - Existing

```plantuml
!include https://raw.githubusercontent.com/plantuml-stdlib/C4-PlantUML/master/C4_Component.puml

title Transaction Management - Open API

Person(admin, "Admin")
System_Boundary(jubelio_web_system, "Jubelio Administration Web Application") {
    Container(browser, "Browser", "Software System", "All supported browser")
    Container(jubelio_dashboard, "Jubelio Dashboard", "", "Provides management functionalities for jubelio admin via their web browser")
}
System_Boundary(api_endpoint, "API Endpoint") {
    Container(jubelio_api, "jubelio API", "", "Provides jubelio management functionalities via HTTPS / REST / JSON API")
    Container(shipment_api, "evm-shipment API", "PHP", "Provides order management functionalities via HTTPS / REST / JSON API")
    Container(order_api, "evm-order API", "PHP", "Provides order management functionalities via HTTPS / REST / JSON API")
}
System_Boundary(db, "Databases") {
    ContainerDb(db_evm, "Database", "MySQL", "evm schema")
    ContainerDb(db_itr, "Database", "MySQL", "itr schema")
}

Rel_R(admin, browser, "Request", "Client Device")
Rel_R(browser, jubelio_dashboard, "Access", "HTTPS")
Rel_R(jubelio_dashboard, jubelio_api, "Makes API calls to", "HTTPS / REST / JSON")
Rel_R(jubelio_api, shipment_api, "Makes API calls to", "HTTPS / REST / JSON")
Rel_R(shipment_api, order_api, "Makes API calls to", "HTTPS / REST / JSON")
Rel(order_api, db_evm, "Reads from & Writes to", "TCP/IP")
Rel(order_api, db_itr, "Reads from & Writes to", "TCP/IP")


```


### Process Order in Brand Dashboard

```plantuml
skinparam responseMessageBelowArrow true

title Process Order - Existing Interaction Diagram

participant "client" as c
participant "evermos-brand-be" as ebb
participant "evm-order" as eo
participant "notif-service" as ns
database "evm" as e
database "itr" as i
database "gss" as g

c -> ebb : process order \nadmin/order-list/v2/process-order
activate ebb


alt if order 4PL
    ebb -> eo : process order\n/v1/worker/order/{domain}/receipt/process
    activate eo
    
    alt if order evermos
    eo -> e :process order
    activate e
    return order data
    end

    alt if order itr
    eo -> i :process order
    activate i
    return order data
    end

    return order data
end

alt if order evm
    ebb -> e : process order
    activate e
    return order data
end

alt if order itr
    ebb -> i : process order
    activate i
    return order data
end

ebb -> ns: send notification
activate ns
return

ebb -> eo: sync order data\n/v1/internal/order/{domain}/sync
activate eo
eo -> g: sync order data
activate g

return order data
return order data
return order data

```

### Generate Waybill in Brand Dashboard

```plantuml
skinparam responseMessageBelowArrow true

title Generate Waybill - Existing Interaction Diagram

participant "client" as c
participant "evermos-brand-be" as ebb
participant "evermos-admin-be" as eab
participant "jne" as jne
participant "popaket" as pop
participant "evm-order" as eo
database "evm" as e
database "itr" as i
database "gss" as g

c -> ebb : generate waybill\n(admin/order-list/v2/generate-waybill)
activate ebb

ebb -> eab : generate waybill\n(admin/order-list/v2/generate-waybill)
activate eab

alt if courier = "jne"
    eab -> jne : generate waybill
    jne -> eab : success/error
end

alt if courier = "popaket"
    eab -> pop : generate waybill
    pop -> eab : success/error
end

alt if platform = "evermos"
    eab -> e : update waybill
    e -> eab : success/error
end

alt if platform = "berikhtiar"
    eab -> i : update waybill
    i -> eab : success/error
end

return success/error

ebb -> eo : sync order\n(/v1/internal/order/{domain}/sync)
activate eo
eo -> g : sync order
activate g

return success/error
return success/error
return success/error

```

### Input Waybill in Brand Dashboard

```plantuml
skinparam responseMessageBelowArrow true

title Input Waybill - Existing Interaction Diagram

participant "client" as c
participant "evermos-brand-be" as ebb
participant "evm-order" as eo
participant "jne" as jne
participant "popaket" as pop
database "evm" as e
database "itr" as i
database "gss" as g

c -> ebb : update waybill\n(admin/order-list/v2/update-waybill)
activate ebb

alt if platform = "evermos"
    ebb -> e : update inventory status
    activate e
    return
end

alt if platform = "berikhtiar"
    ebb -> i : update inventory status
    activate i
    return
end

ebb -> eo : sync order\n(/v1/internal/order/{domain}/sync)
activate eo
eo -> g : sync order
activate g
return success/error
return success/error


alt if courier = "jne"
    ebb -> jne : register tracking
    jne -> ebb : success/error
end

alt if courier = "popaket"
    ebb -> pop : generate waybill
    pop -> ebb : success/error
end

return success/error

```

### Batch Input Waybill in Brand Dashboard

```plantuml
skinparam responseMessageBelowArrow true

title Batch Input Waybill - Existing Interaction Diagram

participant "client" as c
participant "evermos-brand-be" as ebb
participant "evm-order" as eo
participant "jne" as jne
participant "popaket" as pop
database "evm" as e
database "itr" as i
database "gss" as g

c -> ebb : update waybill batch \n(admin/order-list/v2/update-waybill-batch)
activate ebb

alt if platform = "evermos"
    ebb -> e : update inventory status
    activate e
    return
end

alt if platform = "berikhtiar"
    ebb -> i : update inventory status
    activate i
    return
end

alt if courier = "jne"
    ebb -> jne : register tracking
    jne -> ebb : success/error
end

alt if courier = "popaket"
    ebb -> pop : generate waybill
    pop -> ebb : success/error
end

ebb -> eo : sync order\n(/v1/internal/order/{domain}/sync)
activate eo
eo -> g : sync order
activate g

return success/error
return success/error

return success/error

```

### Process Order in Mimin Dashboard

```plantuml
skinparam responseMessageBelowArrow true

title Process Order - Existing Interaction Diagram

participant "client" as c
participant "evermos-admin-be" as eab
database "evm" as e
database "itr" as i


c -> eab : process order\n(admin/order-list/detail-by-id)
activate eab

alt if platform = "evermos"
    eab -> e : update waybill
    e -> eab : success/error
end

alt if platform = "berikhtiar"
    eab -> i : update waybill
    i -> eab : success/error
end

return success/error

```


### Generate Waybill in Mimin Dashboard

```plantuml
skinparam responseMessageBelowArrow true

title Generate Waybill - Existing Interaction Diagram

participant "client" as c
participant "evermos-admin-be" as eab
participant "jne" as jne
participant "popaket" as pop
database "evm" as e
database "itr" as i


c -> eab : generate waybill\n(order/generate-waybill-jne)
activate eab

alt if courier = "jne"
    eab -> jne : generate waybill
    jne -> eab : success/error
end

alt if courier = "popaket"
    eab -> pop : generate waybill
    pop -> eab : success/error
end

alt if platform = "evermos"
    eab -> e : update waybill
    e -> eab : success/error
end

alt if platform = "berikhtiar"
    eab -> i : update waybill
    i -> eab : success/error
end

return success/error

```

### Process Order

```plantuml
skinparam responseMessageBelowArrow true

title Process Order - Open API - Interaction Diagram

participant "jubelio" as j
participant "evm-shipment" as es
participant "evm-order" as eo
participant "notif-service" as ns
database "evm" as e
database "itr" as i

j -> es : accept order \n(/open/v1/order/accept)
activate es

es -> eo : update status order\n/v1/order/{domain}/detail/inventory-status
activate eo

alt if platform = "evermos"
    eo -> e : update status
    e -> eo : success/error
    
end

alt if platform = "berikhtiar"
    eo -> i : update status
    i -> eo : success/error
end

eo -> ns : send notification
activate ns

return success/error
return success/error
return success/error

```


### Generate Waybill in Brand Dashboard

```plantuml
skinparam responseMessageBelowArrow true

title Generate Waybill - Open API - Existing Interaction Diagram

participant "jubelio" as j
participant "evm-shipment" as es
participant "jne" as jne
participant "popaket" as pop
participant "evm-order" as eo
database "evm" as e
database "itr" as i
database "gss" as g


j -> es : generate waybill\n(/open/v1/awb)
activate es

alt if courier = "jne"
    es -> jne : generate waybill
    jne -> es : success/error
end

alt if courier = "popaket"
    es -> pop : generate waybill
    pop -> es : success/error
end

es -> eo : update awb\n(/open/v1/order/waybill)
activate eo

alt if platform = "evermos"
    eo -> e : update waybill
    e -> eo : success/error
end

alt if platform = "berikhtiar"
    eo -> i : update waybill
    i -> eo : success/error
end

return success/error
return success/error

```


## Database Design - Existing System

```plantuml
hide circle
'skinparam linetype ortho

skinparam class {
    ArrowColor #FF7878
    BackgroundColor #FFF89A
    BorderColor #694E4E
}

title EVM Database Schema

entity "[evm] brand" as b {
    *id: bigint(20)
    --
    brandParentId: bigint(20) <<FK>>
    warehouseShelfId: bigint(20) <<FK>>
    warehouseZoneId: bigint(20) <<FK>>
    partnershipId: bigint(20) <<FK>>
    code: varchar(20)
    slug: text
    name: varchar(100)
    type: enum
    ...
}

entity "[evm] order" as o {
    *id: bigint(20)
    --
    orderCode: varchar(60)
    status: int(11)
    userId: bigint(20) <<FK>>
    totalPrice: decimal(12, 2)
    totalPayment: decimal(12, 2)
    totalCustomerPrice: decimal(12, 2)
    totalQuantity: int(11)
    totalWeight: int(11)
    ...
}

entity "[evm] order_detail" as od {
    *id: bigint(20)
    --
    orderId: bigint(20) <<FK>>
    orderReceiptId: bigint(20) <<FK>>
    productId: bigint(20) <<FK>>
    normalPrice: decimal(12, 2)
    discountPrice: decimal(12, 2)
    quantity: int(11)
    totalPrice: decimal(12, 2)
    waybill: varchar(100)
    
    ...
}

entity "[evm] order_receipt" as or {
    *id: bigint(20)
    --
    orderId: bigint(20) <<FK>>
    userAddressId: bigint(20) <<FK>>
    orderAddressId: bigint(20) <<FK>>
    orderReceiptCode: varchar(60)
    waybill: varchar(100)
    ...
}

entity "[evm] product" as p {
    *id: bigint(20)
    --
    productModelId: bigint(20) <<FK>>
    name: text
    code: text
    ...
}

entity "[evm] product_model" as pm {
    *id: bigint(20)
    --
    brandId: bigint(20) <<FK>>
    name: text
    code: text
    ...
}

b ||-right|{ pm
pm ||--|{ p
or ||--|{ od
o ||--|{ od
p ||--|{ od
or ||-left|{ o

```


## Architecture Diagram - Brand Dashboard - Proposed Solution

```plantuml
!include https://raw.githubusercontent.com/plantuml-stdlib/C4-PlantUML/master/C4_Component.puml

title Transaction Management - Brand Dashboard

Person(brand_admin, "Brand Admin")
System_Boundary(brand_web_system, "Brand Administration Web Application") {
    Container(browser, "Browser", "Software System", "All supported browser")
    Container(brand_dashboard, "Brand Dashboard", "Nuxt.js", "Provides brand management functionalities to brand admin via their web browser")
}
System_Boundary(api_endpoint, "API Endpoint") {
    Container(evm_brand, "evm-brand API", "Golang", "Provides brand management functionalities via HTTPS / REST / JSON API")
    Container(evm_shipment, "evm-shipment API", "Golang", "Provides shipment management functionalities via HTTPS / REST / JSON API")
    Container(evm_order, "evm-order API", "Golang", "Provides order management functionalities via HTTPS / REST / JSON API")
    Container(gss, "GSS API", "", "Provides transaction data via HTTPS / REST / JSON API")

}
ContainerDb(db_evm, "Database", "MySQL", "evm schema")
ContainerDb(db_itr, "Database", "MySQL", "itr schema")
ContainerDb(db_os, "Database", "GraphQL", "open search")


Rel_R(brand_admin, browser, "Register Brand", "Client Device")
Rel_R(browser, brand_dashboard, "Access", "HTTPS")
Rel(brand_dashboard, evm_brand, "Makes API calls to", "HTTPS / REST / JSON")
Rel_L(evm_brand, evm_shipment, "Makes API calls to", "HTTPS / REST / JSON")
Rel(evm_brand, db_evm, "Reads from & Writes to", "TCP/IP")
Rel(evm_brand, db_itr, "Reads from & Writes to", "TCP/IP")
Rel_R(evm_brand, evm_order, "Makes API calls to", "HTTPS / REST / JSON")
Rel_R(evm_order, gss, "Makes API calls to", "HTTPS / REST / JSON")
Rel(gss, db_os, "Reads from & Writes to", "TCP/IP")
Rel(evm_order, db_evm, "Reads from & Writes to", "TCP/IP")
Rel(evm_order, db_itr, "Reads from & Writes to", "TCP/IP")
Rel_R(evm_shipment, evm_order, "Makes API calls to", "HTTPS / REST / JSON")


```



## Architecture Diagram - Mimin Dashboard - Proposed Solution

```plantuml
!include https://raw.githubusercontent.com/plantuml-stdlib/C4-PlantUML/master/C4_Component.puml

title Transaction Management - Mimin Dashboard

Person(admin, "Admin")
System_Boundary(admin_web_system, "Evermos Administration Web Application") {
    Container(browser, "Browser", "Software System", "All supported browser")
    Container(mimin_dashboard, "Mimin Dashboard", "Nuxt.js", "Provides management functionalities to evermos admin via their web browser")
}
System_Boundary(api_endpoint, "API Endpoint") {
    Container(evm_brand, "evm-brand API", "Golang", "Provides brand management functionalities via HTTPS / REST / JSON API")
    Container(evm_shipment, "evm-shipment API", "Golang", "Provides shipment management functionalities via HTTPS / REST / JSON API")
    Container(evm_order, "evm-order API", "Golang", "Provides order management functionalities via HTTPS / REST / JSON API")
    Container(gss, "GSS API", "", "Provides transaction data via HTTPS / REST / JSON API")

}
ContainerDb(db_evm, "Database", "MySQL", "evm schema")
ContainerDb(db_itr, "Database", "MySQL", "itr schema")
ContainerDb(db_os, "Database", "GraphQL", "open search")


Rel_R(admin, browser, "Register Brand", "Client Device")
Rel_R(browser, mimin_dashboard, "Access", "HTTPS")
Rel(mimin_dashboard, evm_brand, "Makes API calls to", "HTTPS / REST / JSON")
Rel_L(mimin_dashboard, evm_shipment, "Makes API calls to", "HTTPS / REST / JSON")
Rel(evm_brand, evm_order, "Makes API calls to", "HTTPS / REST / JSON")
Rel(evm_shipment, evm_order, "Makes API calls to", "HTTPS / REST / JSON")
Rel_R(evm_order, gss, "Makes API calls to", "HTTPS / REST / JSON")
Rel(gss, db_os, "Reads from & Writes to", "TCP/IP")
Rel(evm_order, db_evm, "Reads from & Writes to", "TCP/IP")
Rel(evm_order, db_itr, "Reads from & Writes to", "TCP/IP")
Rel_R(evm_shipment, evm_order, "Makes API calls to", "HTTPS / REST / JSON")


```


## Database Design - Proposed Solution

```plantuml
hide circle
'skinparam linetype ortho

skinparam class {
    ArrowColor #FF7878
    BackgroundColor #FFF89A
    BorderColor #694E4E
}

title EVM Database Schema

entity "[evm] brand" as b {
    *id: bigint(20)
    --
    brandParentId: bigint(20) <<FK>>
    warehouseShelfId: bigint(20) <<FK>>
    warehouseZoneId: bigint(20) <<FK>>
    partnershipId: bigint(20) <<FK>>
    code: varchar(20)
    slug: text
    name: varchar(100)
    type: enum
    ...
}

entity "[evm] order" as o {
    *id: bigint(20)
    --
    orderCode: varchar(60)
    status: int(11)
    userId: bigint(20) <<FK>>
    totalPrice: decimal(12, 2)
    totalPayment: decimal(12, 2)
    totalCustomerPrice: decimal(12, 2)
    totalQuantity: int(11)
    totalWeight: int(11)
    ...
}

entity "[evm] order_detail" as od {
    *id: bigint(20)
    --
    orderId: bigint(20) <<FK>>
    orderReceiptId: bigint(20) <<FK>>
    productId: bigint(20) <<FK>>
    brand: bigint(20) <<FK>>
    normalPrice: decimal(12, 2)
    discountPrice: decimal(12, 2)
    quantity: int(11)
    totalPrice: decimal(12, 2)
    waybill: varchar(100) 
    ...
}

entity "[evm] order_receipt" as or {
    *id: bigint(20)
    --
    orderId: bigint(20) <<FK>>
    userAddressId: bigint(20) <<FK>>
    orderAddressId: bigint(20) <<FK>>
    orderReceiptCode: varchar(60)
    waybill: varchar(100)
    ...
}

entity "[evm] product" as p {
    *id: bigint(20)
    --
    productModelId: bigint(20) <<FK>>
    name: text
    code: text
    ...
}

entity "[evm] product_model" as pm {
    *id: bigint(20)
    --
    brandId: bigint(20) <<FK>>
    name: text
    code: text
    ...
}

b ||-right|{ pm
b ||--|{ od
pm ||--|{ p
or ||--|{ od
o ||--|{ od
p ||--|{ od
or ||-left|{ o

```

### Process Order

```plantuml
skinparam responseMessageBelowArrow true

title Process Order - Proposed Interaction Diagram

participant "client" as c
participant "evm-brand" as eb
participant "evm-order" as eo
participant "notif-service" as ns
database "evm" as e
database "itr" as i
database "gss" as g

c -> eb : process order \n/v2/{tenant}/order/process
activate eb


alt if order 4PL
    eb -> eo : process order\n/v1/worker/order/{domain}/receipt/process
    activate eo
    
    alt if order evermos
    eo -> e :process order
    activate e
    return order data
    end

    alt if order itr
    eo -> i :process order
    activate i
    return order data
    end

    eo -> g: sync order data
    activate g
    return order data
    
    return order data
end

alt if not order 4PL
eb -> eo : process order\nv2/internal/order/{domain}/receipt/process
activate eo

alt if order evermos
    eo -> e :process order
    activate e
    return order data
    end

    alt if order itr
    eo -> i :process order
    activate i
    return order data
    end
    eo -> g: sync order data
    activate g
    return order data

end

return order data

eb -> ns: send notification
activate ns
return
return order data


```

### Generate Waybill in Brand Dashboard

```plantuml
skinparam responseMessageBelowArrow true

title Generate Waybill - Proposed Interaction Diagram

participant "client" as c
participant "evm-brand" as eb
participant "evm-shipment" as es
participant "jne" as jne
participant "popaket" as pop
participant "evm-order" as eo
database "evm" as e
database "itr" as i
database "gss" as g

c -> eb : generate waybill\n(v2/{tenant}/order/waybill)
activate eb

eb -> es : generate waybill\n/v2/awb
activate es

alt if courier = "jne"
    es -> jne : generate waybill
    jne -> es : success/error
end

alt if courier = "popaket"
    es -> pop : generate waybill
    pop -> es : success/error
end

es -> eo : update order detail data\n/v1/order/{domain}/detail/inventory-status
activate eo

alt if order evermos
    eo -> e : update waybill
    e -> eo : success/error
end

alt if order itr
    eo -> i : update waybill
    i -> eo : success/error
end

eo -> g : sync order
activate g

return success/error
return success/error
return success/error
return success/error

```

### Generate Waybill in Mimin Dashboard

```plantuml
skinparam responseMessageBelowArrow true

title Generate Waybill - Proposed Interaction Diagram

participant "client" as c
participant "evm-shipment" as es
participant "jne" as jne
participant "popaket" as pop
participant "evm-order" as eo
database "evm" as e
database "itr" as i
database "gss" as g


c -> es : generate waybill\n/v1/awb
activate es

alt if courier = "jne"
    es -> jne : generate waybill
    jne -> es : success/error
end

alt if courier = "popaket"
    es -> pop : generate waybill
    pop -> es : success/error
end

es -> eo : update order detail data\n/v1/order/{domain}/detail/inventory-status
activate eo

alt if order evermos
    eo -> e : update waybill
    e -> eo : success/error
end

alt if order itr
    eo -> i : update waybill
    i -> eo : success/error
end

eo -> g : sync order
activate g

return success/error
return success/error
return success/error

```


### Process Order in Mimin Dashboard

```plantuml
skinparam responseMessageBelowArrow true

title Process Order - Mimin - Proposed Interaction Diagram

participant "client" as c
participant "evm-order" as eo
database "evm" as e
database "itr" as i

c -> eo : process order\nv2/internal/order/{domain}/receipt/process
activate eo

alt if order evermos
    eo -> e :process order
    activate e
    return order data
    end

    alt if order itr
    eo -> i :process order
    activate i
    return order data
    end

return order data


```

### Input Waybill in Brand Dashboard

```plantuml
skinparam responseMessageBelowArrow true

title Input Waybill - Propose Interaction Diagram

participant "client" as c
participant "evm-brand" as eb
participant "evm-shipment" as es
participant "evm-order" as eo
database "evm" as e
database "itr" as i
database "gss" as g

c -> eb : update waybill\n(v2/{tenant}/order/update-waybill)
activate eb

eb -> es: update waybill\n(v2/awb/non-cashless)
activate es

es -> eo: update waybill\n(v2/order/waybill)
activate eo

alt if order evermos
    eo-> e : update order detail
    activate e
    return success/error
end

alt if order itr
    eo -> i : update order detail
    activate i
    return success/error
end
return success/error 
return success/error 

eb -> eo : sync order\n(/v1/internal/order/{domain}/sync)
activate eo
eo -> g : sync order
activate g
return success/error
return success/error
return success/error

```

### Batch Input Waybill in Brand Dashboard

```plantuml
skinparam responseMessageBelowArrow true

title Input Waybill Batch - Propose Interaction Diagram

participant "client" as c
participant "evm-brand" as eb
participant "evm-shipment" as es
participant "evm-order" as eo
database "evm" as e
database "itr" as i
database "gss" as g

c -> eb : update waybill\n(v2/{tenant}/order/update-waybill-batch)
activate eb

eb -> es: update waybill\n(v2/awb/non-cashless)
activate es

es -> eo: update waybill-batch\n(v2/order/waybill)
activate eo

alt if order evermos
    eo-> e : update order detail
    activate e
    return success/error
end

alt if order itr
    eo -> i : update order detail
    activate i
    return success/error
end
return success/error 
return success/error

eb -> eo : sync order\n(/v1/internal/order/{domain}/sync)
activate eo
eo -> g : sync order
activate g
return success/error
return success/error
return success/error


```