Architecture Document

DEXPO Exports
OutSystems Architecture

This document describes the three-layer OutSystems architecture for the DEXPO Exports system — covering existing applications, the new Logistic feature modules, their responsibilities, and all data entities with relationships.

Three-Layer Architecture

OutSystems mandates a strict top-down dependency rule: UI references Core, Core references Foundation. No upward references are allowed. This prevents circular dependencies, makes each layer independently deployable, and allows foundational services to be reused across multiple applications.

UI Layer — Top

Screens & User Experience

Consumes Core services and Foundation layouts. No business logic lives here.

DEXPO  DEXPO
All application screens
Screen-level client actions
UI logic & navigation
Calls Core server actions
references

Core Layer — Middle

Business Logic & Data

Owns all entities, business rules, and server actions. References Foundation only.

DEXPO Core  DEXPO_CS
DEXPO Logistic Core  DEXPO_Logistic_CS New

DEXPO_CS

Core entities & data model
Business logic server actions
Validation & rules

DEXPO_Logistic_CS New

Logistic & Provider entities
Static entities (DeliveryStatus, DexpoLogisticPartners)
Wrapper actions → Logistic_IS
Logistic business logic
references

Foundation Layer — Bottom

Shared Services & Integration

Provides reusable themes, auth, roles, and integration services. Has no upward dependencies.

DEXPO Theme  DEXO
DEXPO Lib  Dexpo_Lib
DEXPO Logistic IS  Dexpo_Logistic_IS New

DEXO (Theme)

Theme & UI layouts
Login flow
Shared UI templates

Dexpo_Lib

Roles & role logic
User management actions
Auth server actions

Dexpo_Logistic_IS New

Third-party API calls
Input / response structures
Error handling

Third-Party Logistic Provider APIs

The Dexpo_Logistic_IS integration service module (Foundation) is the single point of contact for all outbound API calls to registered logistic providers. Only this module contains the HTTP consumer logic — no other module communicates with external APIs directly. All API credentials (Partner ID, API Key, API Secret) are passed in at runtime from DEXPO_Logistic_CS actions.

Module Details

Foundation Layer

DEXPO Theme
Module: DEXO
  • Theme & branding tokens
  • Login & session flow
  • Shared UI layouts & patterns
DEXPO Lib
Module: Dexpo_Lib
  • Role definitions (Admin, Manager, User, Logistic)
  • Role-based access logic
  • User management server actions
DEXPO Logistic IS
New
Module: Dexpo_Logistic_IS
  • HTTP consumer for provider APIs
  • Input & response structures
  • Error handling & retry logic
  • No business logic — pure integration

Core Layer

DEXPO Core
Module: DEXPO_CS
  • All core entities: Customer, Vendor, Item, Category, SO, PO, line items
  • Core business rules and server actions
  • Exposes services consumed by UI layer
DEXPO Logistic Core
New
Module: DEXPO_Logistic_CS
  • Logistic_Provider, Logistic_Status_Mapping entities
  • ExportMovement, ExportMovementLog entities
  • Static Entity: DeliveryStatus (7 records)
  • Static Entity: DexpoLogisticPartners (2 records: ZedEx Logistics, Universal Logistics)
  • Wrapper actions to call Dexpo_Logistic_IS
  • Logistic business logic (assign, track, poll)

UI Layer

DEXPO
Module: DEXPO
  • All screens: Dashboard, Customers, Vendors, Items, PO, SO, Reports, Logistic Dashboard, Manage Providers
  • Screen-level UI logic and navigation
  • Calls Core server actions only — no direct DB access

Entity Relationship Diagram

User / Auth
Master Data
Transactions (SO / PO)
PO Entities
Static Entity
Logistic (Phase 2)
FK Reference (1:N)
Logistic FK Reference
creates 1:N updates receives 1:M contains 1:M procured_in contains 1:N contains added_in places 1:N generates 1:1 tracked_by 1:N handles 1:N maps 1:N status ref status ref assigned User PK Id Integer Name Text Username Text Email Email Phone Text IsActive Boolean Vendor PK Id Integer VendorName Text CompanyName Text SO_ExportOrder PK Id Integer FK CustomerId → Customer OrderNo Text Status Text OrderedOn DateTime TotalAmount Decimal FK CreatedById → User PO_ImportOrder PK Id Integer FK VendorId → Vendor Status Text FK CreatedById → User PO_LineItem PK Id Integer FK POId → PO_ImportOrder FK ItemId → Item Quantity Integer Rate Decimal Item PK Id Integer FK CategoryId → Category ItemName Text SKU Text (Unique) Rate Decimal RemainingQTY Integer IsActive Boolean SO_LineItem PK Id Integer FK SOId → SO_ExportOrder FK ItemId → Item Quantity Integer Rate / Amount Decimal Category PK Id Integer Name Text Description Text IsActive Boolean Customer PK Id Integer CustomerName Text Email Email Phone Text IsActive Boolean STATIC DeliveryStatus PK Id Integer Label Text Description Text ColorCode Text (HEX) IsActive Boolean 7 fixed records STATIC DexpoLogisticPartners PK Id Integer Name Text IsActive Boolean 2 records: ZedEx, Universal DexpoPartnerId Logistic_Provider PK Id Integer ProviderName Text FK DexpoPartnerId → DexpoLogisticPartners ContactPerson Text Partner_ID Text APIKey Text APISecret Text IsActive Boolean Logistic_StatusMapping PK Id Integer FK ProviderId → Logistic_Provider FK DeliveryStatusId → DeliveryStatus ProviderStatusId Text ProviderStatusCode Text Description Text IsActive Boolean ExportMovement PK Id Integer FK SOID → SO_ExportOrder FK AssignedTo → User (Logistic) FK CurrentDeliveryStatus → DeliveryStatus FK LogisticProviderId → Logistic_Provider ProviderTrackingNumber Text ExpectedDeliveryDate Date IsDelay / DelayReason Bool / Text CreatedOn / UpdatedOn DateTime ExportMovementLog APPEND-ONLY LOG PK Id Integer FK ExportMovementId → ExportMovement FK DeliveryStatus → DeliveryStatus PartnerStatusCode Text LastUpdatedDate DateTime IsDelay / DelayReason Bool / Text UpdatedBy Text ("System" or name) CreatedOn DateTime PHASE 2

Relationship Summary

UserSO_ExportOrder
One user creates many export orders (1:N)
VendorPO_ImportOrder
One vendor receives many purchase orders (1:M)
CategoryItem
One category contains many items (1:N)
CustomerSO_ExportOrderSO_LineItemItem
Core export transaction chain
VendorPO_ImportOrderPO_LineItemItem
Core import transaction chain
SO_ExportOrderExportMovement
One SO generates one movement record (1:1) — Phase 2
ExportMovementExportMovementLog
One movement has many log rows — one per status change (1:N)
Logistic_ProviderLogistic_StatusMapping
One provider has many status mapping rows (1:N)
DeliveryStatus (Static) → ExportMovement, StatusMapping, MovementLog
Single source of truth — referenced by all logistic entities
UserExportMovement.AssignedTo
The Logistic User assigned to handle this shipment
DexpoLogisticPartners (Static) → Logistic_Provider
One-to-one — each Dexpo Partner can have at most one Provider entry (unique FK)

Entity Attribute Reference

User Entity
PKIdInt
NameText
EmailEmail
PasswordText
IsActiveBool
RolesText
CreatedOnDateTime
Category Entity
PKIdInt
NameText
DescriptionText
IsActiveBool
Item Entity
PKIdInt
FKCategoryId→ Category
NameText
SKUText
RateDecimal
RemainingQTYInt
IsActiveBool
Vendor Entity
PKIdInt
VendorNameText
ContactPersonText
EmailEmail
PhoneText
IsActiveBool
Customer Entity
PKIdInt
CustomerNameText
ContactPersonText
EmailEmail
PhoneText
BillingAddressText
IsActiveBool
SO — Export Order Entity
PKIdInt
FKCustomerId→ Customer
SODateDate
StatusText
SubtotalDecimal
DiscountDecimal
FinalPayableDecimal
CreatedBy / OnInt/DT
SO Line Item Entity
PKIdInt
FKSOId→ SO
FKItemId→ Item
QuantityInt
RateDecimal
AmountDecimal
PO — Import Order Entity
PKIdInt
FKVendorId→ Vendor
PODateDate
StatusText
FinalPayableDecimal
CreatedBy / OnInt/DT
PO Line Item Entity
PKIdInt
FKPOId→ PO
FKItemId→ Item
QuantityInt
RateDecimal
AmountDecimal
DeliveryStatus Static
PKIdInt
LabelText
DescriptionText
ColorCodeText
IsActiveBool
7 records: New, In-Progress, Sent To Logistic Facility, Received at Facility, Packed, Shipped, In-Transit, Hold, Delivered, Failed To Deliver
DexpoLogisticPartners Static
PKIdInt
NameText
IsActiveBool
2 records: ZedEx Logistics, Universal Logistics
Logistic_Provider Entity
PKIdInt
FKDexpoPartnerId→ DexpoLogisticPartners (Unique)
ProviderNameText
ContactPersonText
ContactEmailEmail
ContactPhoneText
AddressText
Partner_IDText
APIKeyText
APISecretText
IsActiveBool
CreatedOn / UpdatedOnDateTime
FKCreatedBy / UpdatedBy→ User
Logistic_Status_Mapping Entity
PKIdInt
FKLogisticProviderId→ Logistic_Provider
FKDeliveryStatusId→ DeliveryStatus
ProviderStatusIdText
ProviderStatusCodeText
ProviderStatusDescriptionText
IsActiveBool
CreatedOn / UpdatedOnDateTime
FKCreatedBy / UpdatedBy→ User
ExportMovement Entity
PKIdInt
FKSOID→ SO (Export Order)
FKAssignedTo→ User (Logistic User)
FKCurrentDeliveryStatus→ DeliveryStatus
FKLogisticProviderId→ Logistic_Provider
NoteText
ProviderTrackingNumberText
ProviderTrackingNoteText
ExpectedDeliveryDateDate
IsDelayBool
DelayReasonText
IsActiveBool
CreatedOn / UpdatedOnDateTime
FKCreatedBy / UpdatedBy→ User
ExportMovementLog Log
PKIdInt
FKExportMovementId→ ExportMovement
FKDeliveryStatus→ DeliveryStatus
PartnerStatusCodeText
LastUpdatedDateDateTime
ExpectedDeliveryDateDate
IsDelayBool
DelayReasonText
LastCommentText
UpdatedByText (name)
CreatedOnDateTime
Append-only log — one row per status change event

Architecture Principles

No Upward References

Dependencies flow strictly downward — UI → Core → Foundation. No layer may reference the layer above it.

Reusability

Foundation modules (Theme, Lib, Logistic_IS) are reusable by any current or future Core module without duplication.

Single Responsibility

Each module has one job: IS modules own integrations, CS modules own data & logic, UI modules own screens only.