enBusiness FlowsOverview

Business Flows

XBuddy is not a collection of disconnected modules. Every app in every pack is designed to hand off work to the next step automatically. This section documents the end-to-end processes — what triggers what, how status changes propagate, and where data moves across pack boundaries.

These docs reflect the current production implementation — every flow, status, and integration listed here is live in the product.

Core Principles

Document Chain

Every transaction can be created from its parent. The link is recorded in document_links so you can always trace backwards — from an invoice to the delivery order to the sales order to the original quote. Nothing appears out of nowhere.

Quote → Sales Order → Delivery Order → Invoice → Payment
PO → GRN → Vendor Bill → Payment
SM Contract → Ticket → Time/Parts → Invoice

Quantity Conservation

Line-level quantities are tracked at every hand-off. You cannot invoice more than you delivered, receive more than you ordered, or issue more stock than you have. Cancelling a document automatically reverses its quantity impact.

Feature Toggles

Every intermediate step is optional. A small business can go straight from Sales Order to Invoice with no delivery order. A 3PL can require GRNs, 3-way matching, and lot tracking. The same data model supports both.

Multi-tenancy

Every record belongs to a tenant schema. There is no cross-tenant data sharing at any layer.


What’s Covered


Cross-Pack Integration Map

The most important flows are the ones that cross pack boundaries. Here is a quick map of the major hand-offs:

FromToTrigger
Sales OrderDelivery Order (Inventory)Order confirmed
Delivery OrderInvoice (Finance)Goods delivered
Purchase OrderGRN (Inventory)Goods received
GRN + PO + Invoice3-Way Match (Finance)Invoice created
Payroll RunGL Journal (Accounting)Payroll approved
Asset DepreciationGL Journal (Accounting)Batch run
Work Order (Manufacturing)Goods Issue (Inventory)Material consumed
Work Order (Manufacturing)GRN (Inventory)Finished goods complete
Quality Check failedNCR (Quality)Auto-created
Deal Won (CRM)Invoice (Finance)One-click from deal view
SM ContractTicketCustomer submits request
Ticket resolvedInvoice lineTime/parts recorded