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 → InvoiceQuantity 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
The two core Finance flows: selling and buying. Quotations, sales orders, deliveries, invoices, purchase requisitions, RFQs, GRNs, 3-way matching, and payment.
ERP — Order-to-Cash & Procure-to-PayThe full Lead-to-Cash journey — from first contact through deal close, with POS, customer health scoring, and contract renewals.
Business Pack — CRM · Sales · Customer SuccessService contracts, ticket lifecycle, field dispatch, time and materials billing, and SLA management.
Service ManagementThe complete employee lifecycle: recruitment, onboarding, leave, attendance, payroll (with GL auto-posting), performance reviews, OKRs, and learning.
People Pack — HR · Payroll · PerformanceGoods receipt, stock transfers, stocktaking, 3-way matching, lot/serial tracking, QC inspections, NCRs, and asset lifecycle with depreciation.
Operations Pack — Inventory · Quality · AssetsCross-Pack Integration Map
The most important flows are the ones that cross pack boundaries. Here is a quick map of the major hand-offs:
| From | To | Trigger |
|---|---|---|
| Sales Order | Delivery Order (Inventory) | Order confirmed |
| Delivery Order | Invoice (Finance) | Goods delivered |
| Purchase Order | GRN (Inventory) | Goods received |
| GRN + PO + Invoice | 3-Way Match (Finance) | Invoice created |
| Payroll Run | GL Journal (Accounting) | Payroll approved |
| Asset Depreciation | GL Journal (Accounting) | Batch run |
| Work Order (Manufacturing) | Goods Issue (Inventory) | Material consumed |
| Work Order (Manufacturing) | GRN (Inventory) | Finished goods complete |
| Quality Check failed | NCR (Quality) | Auto-created |
| Deal Won (CRM) | Invoice (Finance) | One-click from deal view |
| SM Contract | Ticket | Customer submits request |
| Ticket resolved | Invoice line | Time/parts recorded |