What would you like to know?
Good to know: revenue and gross margin in this app are sales figures (from sales invoices and item costs), not the financial-statement revenue and margin.
Business Summary
One clear view of sales, profitability, customers and operations. Figures are sales figures, not financial statements.
Alerts & watch-list
What needs attention right now.
Daily Summary
Sales deliveries, production and warehouse deliveries in one view.
Daily Sales Report (PowerPoint)
Sales Tracker
Litres delivered each day and this month, with total volume and open volume, from the sales line file.
By product category
Warehouse Deliveries
What the warehouses delivered this month and this week, and how it differs from the sales lines.
Sales deliveries against warehouse deliveries
Warehouse report
Sales Operations
Production blend by week, urgent orders to close out, deliveries pending and regional performance, in one place.
Production blend by week
Products urgently needed to close out orders
Eterna and Castrol
Third Party
IBT / deliveries pending
Regional performance
Tracker Data
The files behind the trackers, when they were last saved, and any rows that need fixing.
Sales Dashboard
How much we sold, to whom, and where.
Key takeaways
The main points from the figures you are looking at.
Trends & Seasonality
Which months and quarters are strong or weak, and how this year compares with earlier years.
Moving averages and annual totals
Growth month by month
Regional Performance
Which regions are growing, which are slipping, and what each one sells.
Region scorecard: this year vs last year
Sales by Warehouse
Where the sales are loaded from: the Business Central location code on each invoice.
Warehouse table
Sales Breakdown
Start with the whole, then drill in: pick how to split it, then pick a value to look inside.
What Drives Sales
Which brands, regions, reps, warehouses, pack sizes and seasons make an invoice bigger or smaller.
All comparisons
Rep Scorecards
How each sales rep is performing against the average rep.
Individual scorecard
Sales rep scorecard
Budget vs Actual
Are we on track? Litres and gross margin against budget, by month, product and region.
Actuals come from all sales data for the budget year; the sidebar filters do not apply here. Volume is in litres. Budget regions are North (North 1 + North 2), South, West and East; the National budget lines (Third Party, Base Oil, Chemical) sit in West. Margin uses the cost recorded in the sales files; the 2019 and 2026 lines use the nearest recorded cost of the same item, then the inventory valuation.
Budget vs actual by product category and region
Sales Gross Margin
The profit left on our sales after the cost of goods, by product, region and customer. These are sales figures, not the financial-statement margin.
Gross margin = revenue excluding VAT minus cost of goods. Cost is the average cost in the inventory valuation, applied to all periods, so historical margins are indicative rather than exact. The sidebar filters apply.
Gross margin table
Market Share
Our litres against the whole market, by region and zone.
Market size is the Mordor Intelligence estimate for Nigeria (litres). Share = our litres / market litres. Only complete years are compared, exports (Region = Foreign) are left out, and the sidebar filters do not apply here. Zones come from the state of each sale; your industries and categories are matched to the market's industries and product types by the tables in src/01_settings.R (market_industry_map, market_product_map). Segments with no sales (for example Metalworking Fluids) show 0% so they stay visible as room to grow.
Year-by-year table
Product Analytics
Which products and categories sell most and how each one is changing.
Product category scorecard
Product scorecard (with ABC class)
ABC / XYZ
Which products matter most by value (A, B, C) and how steady their demand is (X, Y, Z).
ABC ranks items by revenue: A = the first 80% of revenue, B = the next 15%, C = the last 5%. XYZ measures how stable monthly demand is (coefficient of variation): X = stable, Y = variable, Z = erratic. Items with fewer than 6 months of history are not given an XYZ class (shown as n/a). Cut-offs can be changed in src/01_settings.R.
Suggested stock and planning policy by class
Item classification (ABC / XYZ)
Inventory Analytics
What is in stock, how many days it will last, and what to reorder or clear.
Scope: Castrol, Eterna and Base Oil. Stock is a snapshot from the inventory valuation file; demand is measured from sales of the same item code. The sidebar filters do not apply here (stock is not split by region).
Reorder list: out of stock or low cover
Excess and dead stock
All stocked items
Customer Analytics
Who our customers are, how much they buy and how dependent we are on the biggest ones.
Customer list: value, class and status
Customer Retention
How many customers are new, loyal, won back or lost, month by month.
Month by month
Receivables
Money customers still owe on lubricant invoices, and how late it is.
Open invoices
RFM Analysis
Groups customers by how recently, how often and how much they buy.
Each customer is scored 1-5 on Recency (days since last purchase), Frequency (number of orders) and Monetary value (revenue) within the data currently in view, then placed in a segment.
Segment guide
Customer list with RFM scores
Lifetime Value
How much each customer is worth over time, and who to protect.
Estimated future value = customer's average annual revenue x r / (1 + d - r), where r is the observed year-to-year customer retention rate and d is the discount rate. It is a planning estimate, not a guarantee. Complete years only are used to measure retention.
Customer lifetime value
Industry
Which industries buy from us and how each is changing.
Industry scorecard: this year vs last year
Forecasting
What we expect to sell in the coming months, how reliable that is, and a download for Excel.
Forecasts use the data in view (the sidebar filters apply) and need at least 12 months of history; two or more years give seasonal forecasts. Items are ranked by revenue.
Forecast by item
Look closer
Month-by-month forecast for the selected item
What if? Scenario planning
Try a change on the selected item and see what it does to litres, revenue and gross margin over the forecast months. Nothing is saved: set all three sliders to 0 to go back to the forecast.
How accurate has this forecast been? (back-test)
The selected item and measure are forecast again using only older months, and the result is compared with what actually happened.
Method comparison (lower error is better)
Next year's litres by SKU and customer segment, in the layout of the Castrol forecast template. The current year is actual sales to the last sales date plus an outlook for the months left; next year is a weighted view of the last three years (60% / 30% / 10%), with one-off spikes capped and growth damped by half. Change the growth or any segment below and the tables update; the download keeps your changes as live formulas.
Growth
Your adjustments
Everything is in percentage points added to the model's growth. Leave at 0 to keep the model's forecast.
Adjust one segment
Adjust one segment
By customer segment
By SKU
How the current year was estimated
How reliable is it? (back-test)
The same method is run on older years and compared with what happened next. Read these before relying on the forecast.
Which growth strength worked best
Customer mapping (Castrol)
Castrol segments come from the customer mapping file (customer code, market name, sector name). It is looked for in the data folder and in config; you can also upload a new copy here.
Ask Segun
Your AI analyst. Click a question below, or type your own, and get a plain-English answer from your sales figures.
Quick questions - click one
Or type your own question
General questions use the period and filters in the bar at the top. If you name a region, brand, rep, warehouse, customer or period in your question (for example Q3 2025 or last month), Segun works that out exactly, whatever the filters say. Press Enter to send; Shift+Enter starts a new line.
Advanced options
Reports
Create a ready-to-share report from the data in view.
generate_reports.R and the README.Excel Export
Download the figures you see here as an Excel workbook.
Download a multi-sheet Excel workbook of the data currently in view (your filters apply).
Transactions
Every sales line behind the numbers, searchable and downloadable.
Download all sales lines (Excel)
Data Check
Checks that the data loaded correctly and lists anything that needs fixing.
Upload data files
Choose the Excel files to add or replace (a file with the same name replaces the old one). Sales - Year ... files, the Posted Sales Invoices list, budget and inventory files go to the main data folder; the sales line, warehouse and operations files go to the daily tracker folder.
The app closes and reloads its data, which takes about a minute. Refresh the page afterwards and sign in again.
Files on the server
How the app matched your Excel columns to the standard fields. If a field says NOT FOUND or has a low 'Filled' %, the related charts will show 'Unknown' - send me the column names.
Cancelled invoices (excluded from sales)
Phase 2 checks: budget, inventory and cost linking
These show how well the budget and inventory files link to your sales data.
Sheets read from each sales file
Rows per file and year (after date parsing)
The 2014-2018 file should list several years here. If it shows one year or NA, the date column of that file is the problem.
All columns available after joining lookup tables
User Admin
Manage who can sign in and what each person can see.
config/roles.csv (open it in Excel).Add or edit a user
Users
Roles
Usage & Audit
Who signed in, which pages they opened and what they downloaded.
logs/audit_log.csv. Passwords and AI keys are never recorded. On shinyapps.io the file is reset when the app restarts,
so download it regularly if you need a permanent record.