A clear guide to understanding the main database tables used in dashboards and reporting. This guide provides an overview of the key data tables in Next Plus, what they are for, how they connect, and when to use them.
π 1. workflowsessionitem
β Workflow Session
Tracks actual production sessions. Includes start/end time, quantities, user ID, workflow connection, and status.
Key Fields:
_id
,userid
,workflowid
,workorderid
,validquantity
,start
,progress
Joins:
workflow
,workorder
,usermodel
Use It For: Production dashboards, performance KPIs, session analytics
π§ͺ 2. sessioncustomfieldview
β Session Field Values
Stores any custom input during a session: torque, barcode, temperatures, approvals.
Key Fields:
fieldid
,valuenumber
,userid
,workflowsessionitemid
,nodeid
Joins:
field
,workflowsessionitem
,usermodel
Use It For: QA tracking, inspection summaries, user performance
π· 3. field
β Custom Field Definitions
Metadata for all session/form fields, including title, type, and value ranges.
Key Fields:
title
,type
,min
,max
Joins: Used by
sessioncustomfieldview
Use It For: Labeling and interpreting custom fields
π 4. workorder
β Work Orders
Contains all work order definitions: part, quantity, deadlines, and progress.
Key Fields:
sku
,quantity
,statusname
,workflowid
,closed
Joins:
workflow
,workflowsessionitem
Use It For: Order tracking, backlog reports, ERP sync validation
π€ 5. usermodel
β Users
User profiles and attributes such as name, status, and group affiliation.
Key Fields:
displayname
,email
,active
,groups
Joins:
userid
in all activity tablesUse It For: Linking actions to people, user-based filters
π¦ 6. stock
β Inventory & Produced Items
Shows units actually produced, with quantity and serials. Can be connected to sessions or orders.
Key Fields:
sku
,serial
,quantity
,validquantity
,workorderid
Joins:
workorder
,workflowsessionitem
Use It For: Yield reports, quality tracking, inventory snapshots
π 7. sessionstockview
β Link: Session β Stock
Maps each session to the stock items it worked on.
Key Fields:
stockid
,workflowsessionitemid
Joins:
stock
,workflowsessionitem
Use It For: Backtracking item lifecycle, multi-stock sessions
π§© 8. stockitemview
β Stock Components
Breakdown of parts inside stock items (like kits or subassemblies).
Key Fields:
stockid
,sku
,serial
Joins:
stock
Use It For: BOM tracking, assembly validation
π 9. workflowsessionitemrecord
β Step Events
Logs every action (enter, leave, sign) taken within a session step.
Key Fields:
nodeid
,reason
,userid
,start
,end
Joins:
workflowsessionitem
,usermodel
Use It For: Process flow analytics, bottleneck detection
π§ Tips
Use
usermodel
to resolve IDs into namesCombine
sessioncustomfieldview
withfield
to get readable input typesUse
workflowsessionitemrecord
to analyze workflow step-level behaviorsCombine
stock
+sessionstockview
+workflowsessionitem
for full traceability