query_stats

OrderCollectionAnalyticsView

Lightweight AI-ready financial view for analyzing order payment behavior, collection speed, outstanding balance, and receivable aging.
collection payments aging finance receivables
Purpose
This view is designed for financial and AI-driven analysis of order collection behavior. It helps determine how fast customers pay, how much remains unpaid, and how overdue each order is. It is optimized for aging analysis, cashflow forecasting, and payment behavior modeling.
Business Rules
  • Each record represents one order financial summary.
  • NetAmount = OrderAmount - Discount.
  • TaxAmount is calculated after discount deduction.
  • PaidAmount reflects total received payments for the order.
  • RemainingAmount = PayableAmount - PaidAmount.
  • AvgPaymentDays represents weighted payment delay.
  • DaysOutstanding is calculated from delivery date to current date.
Relationships

This view is a financial analytics layer focused on receivables, payment behavior and cashflow tracking. It connects order-level financial data with customers, sales operations, returns and logistics to analyze collection efficiency and payment delays.

Related View Join Keys Description
OrderFinancialSummaryView OrderID, CustID Provides full financial lifecycle context including discounts, returns, settlements and net receivables.
SalesInvoiceView OrderID, CustID, SellerID Links invoice-level sales data with payment behavior to evaluate revenue realization efficiency.
CustomerPotentialAnalyticsView CustID Correlates payment behavior with customer risk score, churn probability and credit reliability.
CustAssignToSeller CustID, SellerID Attributes collection performance to responsible sales representatives.
CustomerVisitLogsView CustID, SellerID Analyzes relationship between visit frequency and payment speed or overdue balances.
SellerVisitPathCustomersView CustID, SellerID Compares planned visits with collection performance to evaluate route efficiency.
OrderReturnSummaryView OrderID, CustID Adjusts receivable analysis by considering return impact on outstanding balances.
DeliveryOperationAnalyticsView OrderID Links delivery execution timing with payment delay and collection speed.
Inventory ProdID (via SalesInvoiceView), BranchID Indirect relationship through sales data for stock movement and revenue correlation analysis.
OrderCollectionAnalyticsView (Current) OrderID, CustID, SellerID Core receivable analytics view representing payment behavior, aging and outstanding balances.
Primary Collection Join Strategy
  • OrderID → Payment tracking at transaction level
  • CustID → Customer payment behavior and credit risk
  • SellerID → Sales accountability for collections
  • DaysOutstanding → Aging and overdue classification logic
  • PaidAmount / RemainingAmount → Cashflow and receivable health
Fields
Field Type Description
OrderIDintUnique order identifier
OrderAmountdecimalTotal order value before discounts
DiscountdecimalTotal discount applied
NetAmountdecimalOrder amount after discount
TaxAmountdecimalTax applied on net amount
PayableAmountdecimalTotal amount including tax
PaidAmountdecimalTotal payments received
AvgPaymentDaysdecimalAverage number of days taken to pay
RemainingAmountdecimalUnpaid balance
DaysOutstandingintDays since delivery (aging)
Usage
  • Accounts receivable analysis
  • Customer payment behavior tracking
  • Cashflow forecasting
  • Aging bucket classification (0–30 / 30–60 / 60+)
  • AI-based risk of non-payment prediction
Important Notes
warning
Financial Logic Note

This view is optimized for analysis only and should not be used for transactional updates. All monetary values are aggregated at order level and may differ from ledger-level accounting entries.