The entities above do not operate in isolation. Marketplace behaviour emerges from how they connect and how their states evolve during user interactions. Reading the platform as a whole, three layers emerge:
The Layered Structure |
Identity & roles Users, Addresses, role assignments. Establish this first; all other entities associate to a user GUID. |
Catalogue & taxonomy Items, Categories, variants, custom fields. Build this out once users and categories are configured. |
Transactional state Cart, Invoice, Order, Transaction. Implement checkout and order flows once the catalogue is in place. |
Entity associations
- A User owns multiple Addresses
- A Merchant is a User with selling privileges, upgraded via API
- A Merchant owns Items; each Item belongs to one or more Categories
- Items have Child Items (variants), each with their own GUID, referenced at cart level
- Cart records aggregate into an Invoice at checkout
- An Invoice produces one Order per merchant (one checkout → many orders)
- Each Order links to one or more Transactions
- Custom Fields and Custom Tables extend any core entity without altering its base schema
The transactional chain
The clearest way to read the order relationships is as a sequential chain:
Cart → Invoice → Order → Transaction
- A buyer's cart items become an Invoice at checkout
- The Invoice splits into per-merchant Orders
- If a cart contains items from three merchants, three Orders are produced
- Each Order settles into a Transaction
- One per merchant, plus one for the admin commission
This chain is the backbone of every B2C and B2B order flow on the platform.