Metron, explained in plain business language.
A reference for clients, operators, and non-technical stakeholders — covering every metric, the data sync flow, and how machine learning improves results over time.
What The Application Does
Metron brings together customer, order, invoice, and product data so a business team can understand performance and act on it quickly.
Executive dashboard
Shows high-level revenue, customer, and product performance so management can see how the business is doing at a glance.
Customer intelligence
Explains who buys most often, who has become inactive, and which accounts deserve follow-up first.
Product intelligence
Shows which products, brands, and categories drive revenue and which ones need attention.
Machine learning support
Uses historical customer behavior to improve segmentation and recommendation quality over time.
How Data Flows Through The System
The current Sync Center flow is database-first: it connects to Dolibarr, extracts the enabled source slots, normalizes them, refreshes the app database, and retrains analytics where needed.
Connection & mapping
The user saves a Dolibarr database URL and maps each enabled raw slot: ThirdParties, Products, Sales Order, Invoice1, Invoices2, TagsandCat1, and tags2.
Data extraction
The app reads the mapped Dolibarr database tables and prepares raw inputs for processing.
Preprocessing
Raw inputs are normalized into internal files such as Invoices.csv, Products.csv, and ThirdParties.csv.
Refresh & relearn
The application database refreshes, helper views recalculate customer and product aggregates, and the model retrains so dashboards, segments, and recommendations reflect the newest data.
Dashboard Metrics
These are the top-level business indicators shown on the main dashboard.
Total Revenue
The total monetary value of sales within the selected period, shown in USD. It shows how much business was generated overall.
Active Customers
The number of customers who made at least one purchase in the selected period. It shows how broad the active base is.
Total Orders
The total count of distinct invoice IDs captured in the selected date range. It reflects transaction volume, not value, and separate same-day invoices are counted separately.
Active Products
The number of products that recorded sales activity. Helps understand assortment performance and catalog utilization.
Average Purchase Interval
The average number of days between one customer invoice and the next. A lower number means more frequent buying.
Overdue Customers
Customers whose expected next purchase date has likely passed based on their past pattern. These may need follow-up or reactivation.
Sales Targets & Achievement
Each salesperson's annual target is built up from per-brand monthly amounts (not typed directly), measured against what they have achieved, and broken down across time periods, brands, and customer types. This section explains exactly how the target is derived, how achieved is attributed, and every formula used.
1. How revenue is attributed to a salesperson
fk_user_author in the source system), not the salesperson the customer account is assigned to. Only validated orders (status > 0) are counted. This drives both the individual salesperson dashboard and the company "Top Salespeople" leaderboard.2. How the annual target is built (auto)
The annual target is not typed. The admin enters a monthly target amount per brand; the annual target is calculated from those and shown as a read-only field.
| Brand buckets (each takes a monthly target) |
|---|
| Mikrotik · Ruijie Reyee · Hikvision · HDD - USA · Mimosa · RF Elements · ZKTeco · Others (any brand not in the list) |
3. Per-brand customer-type split (matrix)
Each brand has its own customer-type split. In the create form, every brand row carries a monthly amount and its own Company / Installer / Wholesaler percentages, which must total 100% for that brand.
4. Dashboard tables
AI Assistant
Metron opens into a full-screen chat assistant. Ask questions about your customers, targets, at-risk accounts and opportunities in plain English — every answer is grounded in your live CRM data (it calls the same analytics the dashboards use, and never invents numbers). Sessions are saved with history, like a ChatGPT/Claude workspace, and a Dashboard button switches to the classic Metron dashboard at any time. A light / dark theme toggle is in the rail.
Ask anything
Beyond the built-in tools, the assistant can run read-only queries against the database to answer ad-hoc questions (custom date ranges, "customers inactive 7–10 days", any filter). Managers get full read access; salespeople are automatically limited to their own customers.
Word & Excel reports
Ask for a report and it builds a formatted .docx or .xlsx — KPIs, target progress, at-risk customers, anomalies, unsold products and the monthly breakdown — shown as an inline table preview with a download button.
Interactive dashboards
Ask to visualise data and it renders summary cards and charts (bar / line / pie / doughnut) right inside the chat, which you can export to PDF.
Choose your engine
The reasoning and reporting engines are configurable in the admin panel: Gemini and Groq (free tiers) plus optional Claude and DeepSeek (with thinking mode for reasoning). Keys are entered and tested in the dashboard.
Weekly To-Do Lists
Every salesperson gets an AI-generated weekly action list — their next best moves, built from real signals: target gaps, at-risk and likely-to-buy customers, spend-drop anomalies and unsold products.
Customer Metrics & Terms
These terms are used in customer tables, detail views, and retention analysis.
| Metric | Meaning | How to read it |
|---|---|---|
| Customer Lifetime Value | Total revenue from a customer across all recorded purchases, shown in USD. | Higher values identify strategically important accounts, but the segment also depends on recency and order frequency. |
| Order Count | The total number of distinct invoices placed by the customer. | Useful for spotting repeat customers vs. one-time buyers. |
| Average Order Value | Total spend divided by the customer's distinct invoice count. | Separates high-frequency buyers from high-value buyers. |
| Days Since Last Purchase | How many days since the customer last bought something. | A larger number often means the customer is cooling off. |
| Expected Next Purchase | An estimated date for the next order based on past behavior. | If the date has passed, the customer may need outreach. |
| Retention Score | A health score estimating how likely a customer is to keep buying. | Higher is healthier. Lower suggests stronger churn risk. |
| Risk Level | A label: Healthy, Watch, At Risk, or Critical. | Use it to prioritize follow-up and account management. |
| Unique Categories | The number of different product categories the customer has bought from. | More categories indicate a broader, more stable relationship. |
| Unique Brands | The number of different brands the customer has purchased. | Useful for cross-sell analysis and brand preference patterns. |
Product Metrics & Terms
These metrics explain how products, brands, and categories are performing in the application.
Revenue By Product
The amount generated by each product. Helps identify top earners and underperformers in the catalog.
Revenue By Brand
The share of revenue contributed by each brand. Helps understand which suppliers or families perform best.
Revenue By Category
The share of revenue per category. Highlights where demand is concentrated across the catalog.
Buyer Count
The number of distinct customers who bought a product. High counts suggest wide market appeal.
Units Sold
The total quantity sold. Volume-based and can differ from revenue if pricing varies across products.
Stock
The currently recorded inventory level. Helps compare demand against available supply.
Market Basket Analysis
The Market Basket tab on the Products page analyses which products are bought together on the same invoice. It surfaces genuine purchase patterns — not guesses — so the team can recommend bundles, inform cross-selling conversations, and design product offers backed by real transaction data.
| Metric | What it means | How to read it |
|---|---|---|
| Co-purchases | The number of separate invoices where both products appeared together. | The most direct signal of a real pattern. A higher count means the pairing has been observed repeatedly, not just once by coincidence. |
| Support | The percentage of all invoices that contain both products simultaneously. | Naturally low for specific product pairs. What matters more is whether confidence and lift are high — a pair can be meaningful even at 1% support if customers who buy A almost always buy B. |
| Confidence | When Product A was sold, what percentage of those invoices also included Product B. | A confidence of 75% means that 3 out of every 4 times Product A appeared on an invoice, Product B was on the same invoice. High confidence is a strong cross-sell signal worth acting on. |
| Lift | How much more likely the two products are to appear together compared to what random chance would predict. | Lift of 1× means no real relationship — the products just happen to both be popular. Lift above 1× means they are bought together more than chance explains. A lift of 4× means the pair is four times more likely to co-appear than if buying were completely random. Use lift to identify non-obvious pairings that raw counts might miss. |
Top Product Bundles
Shows the strongest product pairs across all invoices, ranked by a score that balances lift with frequency. A pair needs to appear on at least two separate invoices to qualify. This prevents single coincidences from dominating the list with artificially perfect statistics.
Product Affinity Lookup
Select any product to see which other products were most commonly sold alongside it. Results are ordered by co-purchase count first, then lift. Use this before a customer call to prepare relevant add-on suggestions based on what similar customers have actually bought.
Anomaly Detection
The Anomaly Alerts tab on the Customers page automatically scans every customer's monthly purchase history and flags accounts whose behavior has changed significantly compared to their own past patterns. It is designed to surface genuine shifts in real time — not noise — so the team can act on accounts before a drift becomes a loss.
| Metric tracked | What it measures | Why it matters |
|---|---|---|
| Monthly Spend | The total invoice value the customer generated in their most recent active month, compared to all prior months. | A sharp drop in spend can indicate a customer moving budget elsewhere. A sudden spike may signal an unusually large order worth investigating or celebrating. |
| Order Count | The number of distinct invoices placed in the most recent month versus the customer's historical monthly rate. | Fewer orders than usual can mean the customer is buying less frequently or spacing purchases. More orders than usual can mean urgency or a campaign that worked. |
| Category Breadth | How many distinct product categories the customer bought from in the most recent month versus their typical range. | A narrowing breadth can mean the customer is consolidating with a competitor. A widening breadth can mean successful cross-sell activity or new demand. |
Z-Score
The deviation score that drives anomaly detection. It measures how many standard deviations the current value sits away from the customer's own historical average. A Z-score of 0 means perfectly average behavior. A score of 2.5 means the value is 2.5 standard deviations from normal — a rare and meaningful shift.
Severity
A three-level label that describes how unusual the behavior is. High means the deviation exceeds 2.5 standard deviations — very rare and worth immediate attention. Medium means 1.75–2.5 standard deviations — notable and worth monitoring. Low means 1.0–1.75 standard deviations — mildly unusual, useful as early warning.
Direction
Whether the anomaly is a Spike (the metric went higher than normal) or a Drop (the metric fell lower than normal). Both directions matter: a spend spike may need follow-up just as much as a spend drop, depending on context.
Detection Cache
Results are stored for 24 hours to avoid unnecessary recomputation on every page load. The Run Detection button forces an immediate fresh scan across all customers, bypassing the cache. Use it after a sync or when you need the most up-to-date view before a client meeting.
Customer Similarity Search
The Similar Customers tab on the Customers page finds accounts that behave most like a chosen customer — based purely on purchase behavior, not demographics. It is built on mathematical similarity across eight behavioral dimensions so that "similar" means "buys in the same way", not just "is in the same country" or "has the same company type".
| Feature used | What it captures |
|---|---|
| Total Spent | Lifetime spend — positions the customer on a scale from low-value to high-value. |
| Order Count | Total number of invoices — captures frequency of engagement with the business. |
| Average Order Value | Spend per invoice — separates bulk buyers from frequent small-order buyers. |
| Recency | Days since last purchase — reflects how recently active the customer is. |
| Unique Products Bought | Number of distinct products purchased — indicates catalog depth of engagement. |
| Unique Categories | Number of distinct categories bought from — indicates how broadly the customer shops across the range. |
| Unique Brands | Number of distinct brands purchased — captures brand diversity in the customer's buying pattern. |
| Customer Type | Whether the account is a business or individual — encoded numerically so it contributes to overall behavioral distance. |
Similarity Score
A percentage from 0% to 100% expressing how closely a customer's full behavioral profile matches the selected focal customer. 100% would mean identical behavior across all eight dimensions — this essentially never happens in practice. A score above 85% means the two accounts behave in a very similar way. A score above 70% is still meaningfully similar and worth acting on.
How similarity is calculated
All eight behavioral values are scaled to a common range so that a customer who spends €10,000 and one who spends €10 are fairly compared. The system then computes the cosine similarity between the scaled profiles — the same mathematical approach used in modern recommendation engines — and returns the top matches ranked highest to lowest.
How to use it
Type a customer name or part of it into the search box. Select the account you want to use as the focal point. The panel will load the top 10 most similar customers instantly, each with their similarity score, segment, spend, and orders shown side by side.
Practical use cases
Find lookalike accounts to target when a key account expands. Identify which customers share the same risk profile as an account that recently churned. Discover underserved accounts that behave like your best buyers but spend less — potential upsell targets.
Account Health Score
The Account Health Score is a single 0–100 number on every customer's detail panel that answers one question in one glance: how healthy is this account right now? It is a composite signal — not any single metric — so a customer who buys frequently but is increasingly likely to churn will score lower than raw order count alone would suggest.
| Signal | Weight | What it captures |
|---|---|---|
| Churn Risk (inverted) | 25 pts | The predictive model's churn probability, flipped so a low-risk customer scores high. Accounts for 25% of the total score because churn is the most consequential signal for a sales team to act on. |
| Recency | 20 pts | How recently the customer last bought, measured relative to the most recent purchase in the entire dataset. A customer who bought last week scores near 20; one who has not bought in over a year approaches 0. |
| Spend Trend | 20 pts | Whether the customer's spending is growing or declining over time, calculated by comparing average spend in the first half of their history versus the second half. A growing account scores near 20; a declining one scores near 0. |
| Frequency | 15 pts | Order count relative to the 95th-percentile customer in the base. The most frequent buyer scores 15; a customer with a single purchase scores near 0. |
| Anomaly Flags | 10 pts | Starts at the full 10. Each high-severity drop anomaly deducts 3 points; each medium-severity drop deducts 1.5. Spend spikes do not penalize the score — only negative behavioral shifts do. |
| Product Breadth | 10 pts | How many distinct products the customer has bought relative to the 95th-percentile buyer. A customer who buys narrowly from a single product line scores low; one who uses the catalogue broadly scores near 10. |
Excellent (80–100)
Low churn risk, recent activity, growing spend, healthy breadth, no drop anomalies. These accounts are performing well and represent relationships to protect and invest in.
Good (60–79)
Mostly healthy with one or two weaker signals — perhaps slightly declining spend or moderate churn risk. Worth monitoring but not urgent.
Fair (40–59)
Multiple signals are under pressure — inactive for a while, churn risk climbing, or spend trending down. These accounts deserve proactive outreach before the situation deteriorates further.
Poor (0–39)
High churn risk, long inactivity, declining spend, and possibly flagged with drop anomalies. These are the accounts most at risk of being lost and should be treated as urgent recovery cases.
White-Space Analysis
White-space shows a salesperson the revenue they have not captured yet from a customer — not in general, but compared specifically to other customers who behave the same way. It answers: what do similar accounts buy that this customer has never bought? The output is a prioritised list of untapped categories and specific products, ordered by how many behavioral peers purchase them.
| Output | What it shows | How to use it |
|---|---|---|
| Untapped categories | Product categories the customer has never purchased from, shown with the percentage of peers who buy in that category and how many distinct products the category contains. | Start the conversation at the category level. A category where 70% of peers buy is a strong talking point — it frames the gap as normal behavior for their peer group, not as a hard sell. |
| Top untapped products | Specific products — with brand, category, price, and peer buyer count — that similar customers buy but this customer has never purchased. | Use these in quotes, proposals, or email outreach. The peer buyer count adds credibility: "Eight of your comparable accounts regularly purchase this product" is more persuasive than a generic recommendation. |
| Peer penetration % | The percentage of the 20-peer group that buys a given category or product. | Prioritize the highest penetration gaps. A 90% penetration rate means nearly every comparable account buys it — making this customer's absence especially notable and worth addressing first. |
Where to find it
Open any customer's detail panel and scroll to the bottom. Below the AI Recommendations section, the White-Space Analysis shows the untapped category pills first, followed by the top untapped product cards with price and peer buyer count.
When there are no gaps
If a customer already buys most of what their behavioral peers buy, the section will say so explicitly. This is a positive signal — the customer has high catalogue penetration — and is worth noting in account reviews as a sign of a deep, broad relationship.
Using it in a sales call
Before calling an account, open their detail panel and check the top white-space categories. Prepare one or two questions around those areas. The peer framing ("similar customers use this regularly") is more effective than product-led pitching because it grounds the conversation in what others in their position actually do.
Refreshes automatically
White-space is computed live each time the customer detail panel opens, so it always reflects the latest purchase data after a sync. There is no manual refresh step required.
Customer Segments
The application uses purchase history to group customers into practical business segments, balancing how recently they bought, how often they buy, and how strongly they spend relative to the rest of the customer base.
| Segment | Meaning | Typical action |
|---|---|---|
| Champion | Recent, frequent, and valuable customers. | Protect the relationship and offer premium opportunities. |
| Loyal | Customers who buy regularly and stay engaged. | Reward consistency and encourage upsell. |
| Potential | Customers showing promising early buying behavior. | Nurture them before they stall. |
| New | Recently acquired customers with limited history. | Focus on onboarding and second-purchase conversion. |
| At Risk | Customers who used to buy but have slowed down. | Trigger follow-up and retention actions quickly. |
| Hibernating | Customers with low recent activity and weak engagement. | Use reactivation campaigns or deprioritize if needed. |
Sync Center
The Sync Center is the operational bridge between source data and the live application.
Database-first sync
Connect directly to a Dolibarr database URL, validate the connection, and map source tables without writing SQL manually.
Raw slot mapping
Each enabled Dolibarr source table is mapped into one of the app's expected raw slots before preprocessing begins.
Raw slots
The expected input buckets: ThirdParties, Products, Sales Order, Invoice1, Invoices2, TagsandCat1, and tags2.
Processed outputs
After preprocessing, data is converted into internal files and refreshed application tables/views that power the app and machine learning layers.
Glossary
A short reference for common terms used throughout the application.
Revenue
The income generated from sales.
Order
A distinct invoice-based sales transaction recorded in the system.
Invoice
A billing record tied to one or more purchased items.
Category
A product grouping used for reporting and recommendation logic.
Brand
A manufacturer or product family used in product analysis.
Segment
A named customer group based on purchase behavior.
Recommendation
A suggested product the system believes may be relevant to a customer.
Retraining
The process of updating the model so it learns from the latest data.
Account Health Score
A 0–100 composite signal blending churn risk, recency, spend trend, frequency, anomaly flags, and product breadth into a single account quality indicator.
White-Space
Revenue categories and products that similar customers buy but a given customer has never purchased — representing untapped commercial opportunity.
Peer Penetration
The percentage of behaviorally similar customers who buy a given product or category, used to rank white-space gaps by commercial priority.