Overview
OptiFlow’s product catalog system allows you to maintain a comprehensive inventory of products and services. Products support flexible pricing, cost tracking, tax configuration, and optional stock management.Products are globally defined but stock is tracked per workspace, allowing the same product to have different quantities across multiple locations.
Key Features
Flexible Product Types
Support for physical goods, services, and custom product types with appropriate inventory rules.
Price & Cost Tracking
Track selling price and cost basis to calculate profit margins and profitability.
SKU Management
Unique SKU identifiers for efficient product lookup and barcode scanning.
Tax Configuration
Assign default taxes to products for automatic calculation during invoicing.
Product Attributes
Core Properties
Product Properties
- Name: Product display name
- SKU: Stock Keeping Unit (unique identifier)
- Description: Detailed product description
- Product Type: Physical product or service
- Price: Selling price (decimal with 2 places)
- Cost: Cost basis for profit calculation
- Track Stock: Enable/disable inventory tracking
- Is Active: Product status (active products appear in searches)
- Default Tax: Pre-selected tax for invoices
Creating Products
Products can be created through the UI or programmatically:Product Types
- Physical Products
- Services
Physical goods that require inventory tracking:
- Stock quantities monitored
- Warehouse locations tracked
- Stock movements recorded
- Low stock alerts available
Pricing & Profitability
Price and Cost
Profit Calculations
OptiFlow automatically calculates profitability:- Profit:
price - cost - Profit Margin:
((price - cost) / cost) * 100
Profit calculations only work when a cost is set. Products without a cost will return
null for profit metrics.Stock Tracking
Enabling Stock Management
Workspace Stock Levels
Stock is tracked per workspace:Low Stock Monitoring
Product Activation
Control product visibility and availability:Active Product Scope
OptiFlow uses global scopes to filter products:Tax Configuration
Default Taxes
Assign a default tax to automatically apply during invoicing:Product Relationships
Invoice Items
Stock Records
Searching Products
Use the ProductSearch helper for efficient product lookups:Use Cases
Retail Store
Retail Store
Maintain a comprehensive product catalog with SKUs, pricing, and stock tracking across multiple store locations.
Service Business
Service Business
Create service-type products for consulting hours, maintenance packages, or subscription services without inventory tracking.
Wholesale Distribution
Wholesale Distribution
Track cost and selling prices to monitor profit margins on wholesale products across different warehouses.
Manufacturing
Manufacturing
Manage raw materials and finished goods with detailed cost tracking and stock monitoring.
Best Practices
Unique SKUs
Always use unique SKU codes for efficient product identification and barcode scanning integration.
Regular Price Updates
Keep prices and costs current to ensure accurate profit margin calculations and financial reporting.
Stock Tracking
Enable stock tracking only for products that require inventory management to keep your system clean.
Inactive vs. Delete
Deactivate products instead of deleting them to preserve historical invoice data and reporting accuracy.
API Reference
Key product model methods:getStockForWorkspace(Workspace|int)- Get stock record for workspacegetStockQuantityForWorkspace(Workspace|int)- Get quantity for workspacehasSufficientStock(Workspace|int, float)- Check stock availabilitystocks()- Relationship to ProductStock recordsstockMovements()- Relationship to StockMovement recordsinvoiceItems()- Relationship to InvoiceItem recordsdefaultTax()- Relationship to Tax model
app/Models/Product.php:1