Fulfiro Data Model
This page explains the core data entities in Fulfiro and how they relate to each other. Useful for understanding why things work the way they do.
Core entities
Organization -- The top-level container. Everything (products, orders, members, settings) belongs to an organization.
Store -- A connected WooCommerce store. Belongs to an organization. Stores have credentials, sync settings, and status maps. One organization can have multiple stores.
Product -- A synced WooCommerce product. Has a type (Simple, Variable, Variation), and links to a store and organization. Variable products link to their variations via parent/child relationships.
InventoryLevel -- The source of truth for stock. One record per product per location. Contains the on-hand quantity. Reserved and available are calculated at query time.
Reservation -- Links an order line item to an InventoryLevel. Has a lifecycle: Active, Converted, Released, Expired. See How Reservations Work.
StockMovement -- An audit record of a single stock change. Every stock modification creates one. See Stock Movements.
Order -- An order from WooCommerce or created manually. Contains line items, customer info, status, tags, and custom fields.
Shipment -- A physical package sent to a customer. Links to an order and contains tracking info, carrier, package dimensions, and label data.
PurchaseOrder -- An order to a supplier. Contains line items with ordered and received quantities.
AutomationRule -- An if-this-then-that rule with trigger, conditions, and actions.
Relationships
Organization
-> Stores (1:many)
-> Products (1:many)
-> InventoryLevels (1:many, one per location)
-> StockMovements (1:many)
-> Reservations (1:many, via order line items)
-> Orders (1:many)
-> Shipments (1:many)
-> Reservations (1:many)
-> Locations (1:many)
-> Suppliers (1:many)
-> PurchaseOrders (1:many)
-> AutomationRules (1:many)
-> Members (many:many via membership)