Skip to main content

Create organizations and branches

After registering, you need to build an organization tree matching your real company structure. This is the foundation β€” every user, order, vehicle... belongs to a specific organization.

Organization tree

Concepts​

Road Freight TMS uses a multi-tenant tree model:

[Parent company]
β”œβ”€ [Branch A]
β”‚ β”œβ”€ [Depot A1]
β”‚ └─ [Depot A2]
└─ [Branch B]
└─ [Depot B1]
  • Parent company = root, auto-created when you registered
  • Branch = regional unit (HN, HCMC, DN...)
  • Depot = physical unit with real coordinates, dispatch origin

When do you need branches & depots?​

ScaleRecommended structure
One depotRoot + 1 depot β€” simplest
2-3 depots in one cityRoot + multiple peer depots
Multi-provinceRoot β†’ Branch (per province) β†’ Depot
ConglomerateRoot β†’ Subsidiary β†’ Branch β†’ Depot

Step 1: Open Administration​

Sidebar β†’ "Administration" β†’ "Organizations" tab.

Or use AI Agent: type "open organizations" β†’ auto-navigates.

Step 2: Create a branch​

Click "+ Add organization" in the top-right:

  1. Organization code (XCode): uppercase, no spaces β€” e.g. CN-HN, CN-HCMC
  2. Name (XName): display name β€” e.g. HΓ  Nα»™i Branch
  3. Type: choose "Branch"
  4. Parent: choose parent company (default if there's only one root)

Step 3: Create a depot (child of branch)​

Same as step 2 but:

  1. Type: choose "Depot"
  2. Parent: choose the branch just created
  3. Depot address: full (number, street, ward, district, province)
  4. Coordinates:
    • Click "Auto-fetch coordinates from address" β†’ calls OpenStreetMap
    • OR open Google Maps β†’ right-click the location β†’ copy two numbers β†’ paste
Depot coordinates are MANDATORY

The route optimizer uses depot coordinates as the start point. Wrong coordinates = wrong route. Verify on Google Maps before saving.

Editing the structure later​

After you have data (users, orders, vehicles), you can still:

  • βœ… Add new branches / depots
  • βœ… Edit name / address / coordinates
  • ❌ Cannot delete organizations with data

To delete β†’ migrate data to another org first.

Permission inheritance​

After building the tree, when assigning a user to one branch:

User: Ms. B
Scope: HΓ  Nα»™i Branch
↓
β†’ Automatically sees: HN + all HN child depots
β†’ Does NOT see: HCMC or other branches

See also: Role groups (RBAC).

Next​