Documentation

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.

Purpose
Turn sales data into clear actions for revenue, retention, and customer growth.
Main Inputs
Customers, products, invoices, sales orders, tags, and categories.
Main Outputs
Dashboards, customer health signals, segments, recommendations, and retrained models.

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.

01

Connection & mapping

The user saves a Dolibarr database URL and maps each enabled raw slot: ThirdParties, Products, Sales Order, Invoice1, Invoices2, TagsandCat1, and tags2.

02

Data extraction

The app reads the mapped Dolibarr database tables and prepares raw inputs for processing.

03

Preprocessing

Raw inputs are normalized into internal files such as Invoices.csv, Products.csv, and ThirdParties.csv.

04

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.

Core growth signal

Active Customers

The number of customers who made at least one purchase in the selected period. It shows how broad the active base is.

Customer activity

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.

Sales throughput

Active Products

The number of products that recorded sales activity. Helps understand assortment performance and catalog utilization.

Product movement

Average Purchase Interval

The average number of days between one customer invoice and the next. A lower number means more frequent buying.

Repeat buying behavior

Overdue Customers

Customers whose expected next purchase date has likely passed based on their past pattern. These may need follow-up or reactivation.

Retention risk

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

Default rule — "made in their name" — A sales order counts toward the salesperson who issued / authored the order (the order creator, 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.
Exception — 1 January – 15 April 2026 — During this window all sales orders were imported under SuperAdmin (normalized to "Taha Fawaz"). Attributing by author would dump that whole period onto one person, so orders in this window are instead attributed to the salesperson primarily assigned to that order's customer — routing the revenue to the right rep. Every order outside this window follows the default author rule.
Individual dashboard split — On a salesperson's dashboard, the sales figures (total revenue, orders, monthly trend, revenue by brand/type/category/region, top products) reflect orders they issued. The customer figures (customer counts, top customers, overdue, purchase cadence) stay scoped to their assigned book. The company "Top Salespeople" leaderboard ranks by issued revenue.
Customer & retention views are unaffected — Customer ownership, segments, health, anomalies, and retention continue to use the customer's assigned/owner salesperson. Only the sales figures above use the order-issuer rule.
Name normalization — Before matching, every salesperson name is folded to a single canonical form (for example, "Tina techiewah", "Erenstina Techiewa" → "Ernestina Techiewah"; specific author IDs → "Veronica Marfo"; a fixed set of temporary staff → "Temporary"). This guarantees the same person's orders are never split across spelling variants.
Achieved revenue for a salesperson (calendar year) Achieved = Σ order_total_excl_tax for every order O where: owner(O) { the salesperson's names } and year(O.date) = Y owner(O) = { assigned_salesperson(customer) if 2026-01-01 ≤ O.date ≤ 2026-04-15 { order_issuer(O) otherwise
order_total_excl_tax is taken once per order (not per line) to avoid double-counting multi-line orders. Y is the selected year.

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)
Annual target (derived) Annual target = ( Σbrand monthly_target(brand) ) × 12 Monthly target = Annual / 12 Weekly target = Annual / 52 Quarterly target = Annual / 4 Attainment % = Achieved / Target × 100
Example: monthly total 5,250 → annual 63,000; weekly 1,212; quarterly 15,750. Each brand's own target is its monthly amount × 12.
Pace — are they on track today? elapsed_fraction = day_of_year / 366 Expected-to-date = Annual × elapsed_fraction On track = Achieved ≥ Expected-to-date

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.

Customer-type buckets & per-cell target Company = data types "Company" + "End User" (combined) Installer = "Installer" Wholesaler = "Wholesaler / Shop" Other = anything uncategorized Cell target(brand b, type t) = (monthly(b) × 12) × percent(b, t) / 100 Type target(t) = Σb cell target(b, t) For each brand: Σt percent(b, t) = 100%
Example: Mikrotik split 50/30/20, Hikvision split 70/0/30 — each brand independent. "Company" deliberately combines Company and End User revenue. The customer-type table on the dashboard sums each type across all brands.

4. Dashboard tables

This Month cards — The headline shows the current month as a set of cards: one card per customer type (each listing every brand with achieved / target and a progress bar, and the customer-type total in its header), plus a By brand card that totals each brand for the month. Together they give the per-customer-type and per-brand totals at a glance.
Achievement summary card — A card at the top shows big progress bars for Annual and This Quarter achievement (achieved / target / %), plus the on-track / behind-pace flag.
Each analysis is its own card — The Monthly summary (Jan–Dec), Quarterly (Q1–Q4), and full-year By-brand / By-customer-type breakdowns each render in a separate card rather than one long block.
Line-level note — Brand and customer-type achievement is measured at the line level (per product line), so those totals can differ slightly from the order-level headline figure (which carries order-level tax and rounding). Achieved attribution follows the order-issuer rule in section 1.
Manager / company view — On the manager dashboard the same widget shows the company accumulation: every salesperson's targets summed (brand dollars add up; customer-type and area percentages are re-derived from the summed allocations). Using the filter by salesperson selector switches it dynamically to that one rep's targets.

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.

Login prompt & badge — On login a salesperson is prompted with how many activities they have this week, and a count badge sits on the To-Do rail icon.
Who to reach out to — Each task lists the specific customers to contact, a likelihood % that they'll buy (from the prediction model), and a ready-to-send sample message for each.
Feedback loop — Marking a task done with a note produces AI next-steps, and the list auto-regenerates each new week.
Manager oversight — Managers/admins see every rep's list in their own To-Do tab: progress and assessment (on track / behind), the feedback logged, plus buttons to regenerate or clear any rep's list. A login notification flags which reps need attention.
Team Performance — The manager To-Do tab also shows each salesperson's target vs achieved with progress bars and percentages.

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.

What is a basket? — Each invoice in the system is treated as one basket. If a customer ordered a switch, two SFP modules, and a patch panel on the same invoice, those three products form one basket together. Only invoices with two or more products contribute to the analysis.
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.
Association rule metrics (for a pair A → B) Support(A,B) = invoices_with(A and B) / total_invoices Confidence(A→B) = invoices_with(A and B) / invoices_with(A) Lift(A,B) = Confidence(A→B) / Support(B) = Support(A,B) / ( Support(A) × Support(B) )
Lift = 1 → independent (co-occurrence is pure chance); Lift > 1 → bought together more than chance; Lift < 1 → rarely bought together. Pairs seen on only one invoice are dropped before ranking.

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.

Why are some pairs excluded? — Pairs that only appeared together on a single invoice are automatically filtered out. One shared invoice produces a technically perfect 100% confidence and a very high lift, but offers no predictive power. Only repeated patterns are shown.
Acting on the results — Use high-confidence pairs to suggest add-ons during quoting. Use high-lift pairs to spot non-obvious product relationships. Use co-purchase count to gauge how reliable the pattern is before building a bundled offer around it.

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.

How it works — The system computes a monthly baseline for each customer (their historical average and variability), then measures how far the most recent month deviates from that baseline using a standard deviation score. The larger the deviation, the more unusual the behavior.
Minimum history requirement — A customer needs at least 4 months of activity before their baseline is stable enough to evaluate. Customers with fewer months are excluded from anomaly scanning to avoid false positives from early volatility.
Sales ownership context — Each alert row also shows the Sales Owner (the resolved owner of the account) and the Assigned Salesperson, so a change can be routed to the right person immediately.
Z-score anomaly test (per customer, per metric) baseline = all months except the most recent μ = mean(baseline) σ = std(baseline, sample) Z = ( current_month_value μ ) / σ Flagged when |Z| ≥ 1.0 : |Z| ≥ 2.50 → High severity 1.75 ≤ |Z| < 2.50 → Medium severity 1.00 ≤ |Z| < 1.75 → Low severity Direction = Spike if Z > 0 , else Drop % change = (current μ) / μ × 100
Computed independently for monthly spend, order count, and category breadth. A metric is skipped when its baseline has fewer than 2 points or near-zero variance (σ < 0.01), which prevents divide-by-zero and meaningless flags.
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.

Statistical signal strength

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.

Action urgency signal

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.

Trend polarity

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.

Refresh control
Reading an anomaly row — Each row shows the customer, which metric triggered, the current value, the customer's historical average, the Z-score, severity, and the direction. Sort by severity to prioritize the most unusual accounts first.
Filtering — The panel lets you filter by severity level (High, Medium, Low) and by direction (Spike, Drop) independently, so you can, for example, show only High-severity spend drops across the whole customer base in one view.
Per-customer view — Anomalies are also shown on individual customer pages so they are visible in context alongside that customer's segment, purchase history, and retention score.

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".

Why it is useful — If a top customer just expanded into a new product line, you can find the five other accounts most similar to them and reach out proactively. If a champion account churned, you can identify comparable accounts that might be at similar risk and intervene early.
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.

Behavioral match strength

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.

Cosine similarity on 8 features
Cosine similarity on 8 standardized features For each feature: x' = (x mean) / std (StandardScaler) similarity(A, B) = ( x'A · x'B ) / ( ||x'A|| × ||x'B|| ) Features = [ total_spent, order_count, avg_order_value, recency_days, unique_products, unique_categories, unique_brands, customer_type ]
Standardizing first stops large-magnitude fields (like spend) from dominating. The dot product of the unit vectors yields a score in [−1, 1], shown as a 0–100% match; results are ranked high→low and the focal account is removed.

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.

Similarity is behavioral, not demographic — Two customers can be in different countries, different industries, or different segments and still have a high similarity score if they buy at the same frequency, breadth, and value level. The model does not consider company name, location, or account manager.
The focal customer is excluded from their own results — The selected customer does not appear in the results list. All matches shown are other accounts.
Customers with no purchase history are excluded — Only customers with at least one recorded invoice contribute to the similarity pool. Inactive or brand-new accounts with no spending data are not matched.

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.

Why one number? — Sales teams need a fast triage signal across a long customer list. A blended score lets a salesperson look at two accounts and immediately know which one needs attention, without having to cross-reference recency, spend trend, anomaly flags, and churn probability separately.
How it differs from the Retention Score — The existing Retention Score focuses on whether a customer is likely to keep buying. The Account Health Score is broader: it also weighs churn probability from the predictive model, recent anomaly activity (drops), and how widely the customer uses the product catalogue.
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.
Component formulas (each clamped to its own max) Recency (0–20) = max(0, 1 days_inactive / max_days) × 20 Frequency (0–15) = min(order_count / max_orders, 1) × 15 SpendTrend(0–20) = clamp( (avg_2nd_half / avg_1st_half) × 10 , 0 , 20 ) Churn (0–25) = (1 churn_probability) × 25 Anomaly (0–10) = max(0, 10 3×high_drops 1.5×med_drops) Breadth (0–10) = min(unique_products / max_products, 1) × 10 Health Score = Recency + Frequency + SpendTrend + Churn + Anomaly + Breadth (0–100)
max_days, max_orders and max_products are the 95th percentile across all active customers, so each component is scored relative to the customer base rather than an absolute cap. Labels: ≥80 Excellent, ≥60 Good, ≥40 Fair, else Poor.

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.

Low priority for intervention

Good (60–79)

Mostly healthy with one or two weaker signals — perhaps slightly declining spend or moderate churn risk. Worth monitoring but not urgent.

Monitor quarterly

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.

Schedule outreach

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.

Urgent intervention
Where to find it — Open any customer's detail panel by clicking their row in the directory. The Account Health Score appears as a ring gauge at the top of the panel, with each of the six signal bars broken out so you can see exactly which component is dragging the score down.
Spend trend direction — Alongside the score, the panel also shows the trend direction as a single word: growing, stable, or declining. If the trend is growing, the spending ratio between the customer's recent and earlier history exceeded 1.1×. Declining means it fell below 0.9×.
Customers with limited history — Churn risk and spend trend require at least two purchases to compute. For very new customers these components fall back to neutral midpoint values so the score remains meaningful without overstating risk.

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.

Why it is stronger than generic recommendations — Standard recommendations surface products a customer is likely to want based on their own history. White-space goes further: it only shows products and categories the customer has never bought, framed against how common those purchases are among comparable accounts. A category that 80% of peers buy, but this customer has never touched, is a clear commercial gap — not a vague suggestion.
How peers are selected — The analysis re-uses the same behavioral similarity engine as the Customer Similarity Search: cosine similarity across spend, frequency, recency, order value, product breadth, category breadth, brand breadth, and customer type. The top 20 most similar accounts form the peer group.
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.
Peer penetration of an untapped item Peer group = top 20 customers by cosine similarity (same engine as Similarity) Penetration = peers_who_bought(item) / 20 × 100% Shown only when: customer_bought(item) = 0 (never purchased)
Items are ranked by penetration (and peer buyer count), so the gaps most common among behavioral peers surface 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.

Products are filtered, not categories — A product is excluded from the white-space list if the customer has ever bought it, even once. But categories are excluded only if the customer has any purchase in that category. This means a customer who bought one product in the Switches category will not see that category listed as a gap, even if most peers buy many more switch products than they do.
Peer group size matters — The peer count shown alongside each gap (e.g., "6/20 peers buy this") reflects how many of the top 20 similar customers have purchased it. A very new customer base may produce a smaller, less representative peer group, which can make penetration percentages less reliable.
Relationship to AI Recommendations — AI Recommendations may suggest products across categories the customer already buys in, ranked by likelihood to purchase. White-Space only surfaces products and categories the customer has never bought, ranked by peer adoption. Both views are useful: recommendations guide the next likely order; white-space guides the expansion conversation.

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.
Recency — how recently the customer last purchased.
Frequency — how often the customer purchases.
Monetary value — how much the customer spends in USD relative to the rest of the current customer base.
RFM scoring (each scored 1–5) Recency R: <30d→5 <90d→4 <180d→3 <365d→2 else→1 Frequency F: rank of order_count in customer-base quantiles [.2 .4 .6 .8] → 1–5 Monetary M: rank of total_spent in customer-base quantiles [.2 .4 .6 .8] → 1–5
Frequency and Monetary are relative: a customer scores 5 only if they sit in the top quintile of the live customer base, so segments adapt as the base changes.
Segment assignment (first matching rule wins) Champion if R≥4 and F≥4 and M≥4 Loyal if R≥3 and F≥3 and M≥3 At Risk if R≤2 and (F≥4 or M≥4) New if R≥4 and F≤2 and M≤3 Potential if R≥3 and (F≥2 or M≥3) Hibernating otherwise

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.

Test connection — checks whether the database URL is valid and whether the app can read the source schema.
Sync now — triggers extraction, preprocessing, application database refresh, and model retraining in sequence.
Auto retrain — controls whether the machine learning model retrains automatically after each successful sync.
Sync history — shows when a sync happened, whether it succeeded, and which source was used.

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.