StockOracle AI / Docs
Docs Pro Addon Pro

Pro Addon Reference

Complete documentation for StockOracle AI Pro — AI forecasting, purchase orders, suppliers, multi-warehouse, and more.

Prerequisites

The Pro addon requires the free StockOracle AI plugin to be installed and activated first. Pro loads at WordPress hook priority 25 (Free loads at 20), so dependency order is guaranteed.

Overview

StockOracle AI Pro is a paid addon (not a standalone plugin) that extends the free plugin through WordPress hooks. It adds 9 professional modules, 3 custom database tables, and 5 new admin pages.

9
Pro Modules
5
New Admin Pages
3
Extra DB Tables

License Activation

Pro features are gated behind license activation via the Software License Manager (SLM) API.

Activating Your License

  1. Purchase StockOracle AI Pro at themefreex.com/stockoracle-ai-pro.
  2. Your license key will be emailed to you immediately after purchase.
  3. In WordPress admin, go to StockOracle → License.
  4. Paste your license key into the activation field and click Activate License.
  5. A success message confirms activation. Pro features are immediately available.

License Status Checks

License status is checked on each admin page load and re-verified against the license server once every 24 hours. If the server is unreachable, a 5-day grace period is applied to avoid disruption from temporary network issues.

Deactivating / Transferring a License

To move your license to a different domain, go to StockOracle → License and click Deactivate License. This frees the license slot on the license server so you can activate it elsewhere.

License Expiry

When your license expires, Pro features stop working but are not deleted. Renewing your license at themefreex.com instantly restores all functionality. The plugin will display a renewal reminder banner 30 days before expiry.

AI Demand Forecasting (BYOK)

StockOracle AI Pro integrates with OpenAI and Anthropic APIs to generate AI-powered demand forecasts. This is a Bring Your Own Key (BYOK) feature — your API key is used directly and never sent to Themefreex servers.

Supported AI Providers

ProviderModel UsedAPI Key Header
OpenAIgpt-4o-mini (configurable)Authorization: Bearer sk-…
Anthropicclaude-3-haiku (configurable)x-api-key: sk-ant-…

Setting Up AI Forecasting

  1. Navigate to StockOracle → AI Insights.
  2. Select your AI provider (OpenAI or Anthropic).
  3. Paste your API key. Keys are stored base64-encoded in wp_options — not plain text.
  4. Click Test Connection to verify the key works.
  5. Click Generate Forecasts to run AI analysis on your top products.

Third-Party Data Disclosure

When AI forecasting is enabled, product names, sales velocity, and stock levels are sent to your chosen AI provider. No personal customer data is transmitted. The AI Insights page includes a visible disclosure notice as required by WordPress.org guidelines.

How AI Forecasting Works

The AI receives a structured prompt containing your product's historical sales pattern, current stock, and seasonality context. It returns a demand forecast with confidence bounds and a recommended order quantity. Results are cached for 12 hours to minimize API calls.

Purchase Orders

The Purchase Orders module provides a full PO workflow inside WordPress — create, send to suppliers, and track status without leaving the admin.

Purchase Order Lifecycle

Draft Sent Partially Received Received Cancelled

Creating a Purchase Order

  1. Go to StockOracle → Purchase Orders → New PO.
  2. Select a supplier from the dropdown (suppliers are managed separately — see below).
  3. Add line items: search for products and set quantities.
  4. Set the expected delivery date and any notes.
  5. Click Save as Draft or Send to Supplier.

PO Number Format

Purchase orders are auto-numbered in the format PO-YYYYMMDD-NNN (e.g., PO-20250115-001). The sequence resets daily.

Sending to Supplier

When you click Send to Supplier, the plugin sends an HTML-formatted email to the supplier's email address with a formatted PO summary including line items, quantities, and expected delivery date.

CSV Export

Any PO can be exported to CSV for record-keeping or importing into accounting software via the Export CSV button on the PO detail page.

Supplier Manager

Suppliers are managed as a non-public Custom Post Type (soa_supplier) with 6 meta fields:

FieldDescription
Contact NamePrimary contact at the supplier
EmailUsed for automated PO emails
PhoneContact phone number
Lead Time (days)Overrides the global default lead time for this supplier
Payment Termse.g., Net 30, COD
NotesFree-text notes visible on PO emails

Navigate to StockOracle → Suppliers to add, edit, or delete supplier records. Supplier-level lead times automatically factor into reorder point calculations for products associated with that supplier.

Multi-Warehouse Management

The multi-warehouse module lets you track stock at multiple physical locations independently within a single WooCommerce store.

Setting Up Warehouses

  1. Go to StockOracle → Warehouses.
  2. Click Add Warehouse and enter a name and optional location/notes.
  3. Warehouses are stored in wp_options as a serialized array.

Managing Warehouse Stock

After creating warehouses, navigate to any warehouse's detail page to set stock levels per product. Each warehouse has its own stock record in the soa_warehouse_stock database table.

Stock Transfers

Transfer stock between warehouses via the Transfers page. The system validates that the source warehouse has sufficient stock before allowing a transfer. Transfer history is logged with timestamps.

WooCommerce Stock Sync

Multi-warehouse stock is tracked separately from WooCommerce's native stock quantity. WooCommerce's stock field still controls sales availability. Use warehouse stock data for internal logistics planning.

Seasonality Analysis

The seasonality module analyses 12 months of sales history to compute monthly demand factors for each product category. This improves forecast accuracy for seasonal businesses.

Monthly Factors

Each month receives a factor relative to the annual average (1.0 = average month). For example, a December factor of 2.3 means December sales are typically 2.3× the monthly average.

These factors automatically adjust demand forecasts. A product with a base velocity of 5 units/day in an average month will forecast 11.5 units/day in December (if the factor is 2.3).

Seasonality data hooks into the free plugin via the stockoracle_after_forecast_data action, making the integration seamless and non-intrusive.

Cash Flow Projections

The cash flow module projects inventory-related cash outflows for 3 and 6-month horizons based on sales velocity, reorder schedules, and unit costs.

What it Calculates

  • Expected reorder spend — Products × reorder quantities × unit cost
  • Inventory carrying costs — Estimated storage cost based on average holding time
  • Cash at risk — Dead stock capital that could be freed up

Navigate to StockOracle → AI Insights → Cash Flow to view the projections dashboard with a month-by-month breakdown.

Advanced Analytics

The Advanced Analytics module adds four additional KPIs to your dashboard:

MetricFormula
Revenue Loss (stockouts)Days out of stock × avg daily velocity × unit price
Inventory Turnover RatioCOGS ÷ average inventory value (annualised)
Carrying CostHolding rate (%) × average inventory value
Overstock DetectionProducts with > 6 months of stock at current velocity

Scheduled Email Reports

The email reports module sends automatically generated HTML inventory reports on a schedule.

Report Schedules

  • Weekly Digest — Every Monday, top reorder alerts, dead stock summary, health score trend
  • Monthly Executive — First of each month, full performance summary with ABC breakdowns, turnover ratios, and cash flow snapshot

Configuring Reports

Go to StockOracle → Settings (Pro settings section) to configure report recipients, schedule, and included sections. Multiple email recipients are supported (comma-separated).

PDF Report Generator

Generate print-ready inventory reports as PDF from within WordPress. No server-side PDF library is required — reports use browser-native print CSS.

Generating a PDF

  1. Navigate to StockOracle → AI Insights → PDF Report.
  2. Select the report type (Full Inventory / Reorder Summary / Dead Stock / Executive Summary).
  3. Click Generate & Print.
  4. A print-ready page opens in a new tab with a Print button. Use your browser's Save as PDF option to save.

The PDF page uses @media print CSS to suppress navigation, set appropriate margins, and ensure tables print clearly across pages.

Automatic Updates

Pro users receive automatic plugin updates delivered through WordPress's built-in update system. No separate updater plugin is needed.

The updater checks the license server at themefreex.com/wp-json/slm/v1/update-check for new versions. When an update is available, it appears in the WordPress Dashboard → Updates screen exactly like any other plugin update.

Keep Your License Active

Automatic updates only work with an active, valid license. If your license expires, you can still use the last downloaded version but will not receive updates until you renew.