// ERP · SALES AND INVENTORY

Your ERP figures as a widget.

Revenue against plan, items below their reorder point, open orders and receivables on the home screen of iPhone, iPad and Android. From the ERP that has been running for fifteen years, too: Andon reads its exports, and the ERP itself stays as it is.

Download on the App StoreGet it on Google Play

Free for 7 days, then €4.99 a month.

// SOUND FAMILIAR?

The figures are in the ERP. You aren't.

01

Only at your desk

The ERP runs on a terminal server or as a client in the office. On the road, in the warehouse or at a customer's, your figures are out of reach.

02

The report comes tomorrow

Revenue and stock arrive as a spreadsheet, on Monday or at month end. By then the item has sold out and the month is over.

03

Nobody wants to touch it

The old ERP runs fine, an interface means a project, and the vendor advises against it. So everything stays as it is.

// DEMO: ERP

A wholesaler, to try.

The demo simulates an industrial supplies wholesaler on a Thursday morning: fasteners, bearings, tools, hydraulics, work safety. Open the view in the configurator, pair your device and send it to yourself as a test.

  • ✓Revenue: the month against the pro-rata plan, today in 15-minute steps, the product groups.
  • ✓Sales: gross margin, open and overdue orders, fill rate from stock.
  • ✓Stock: inventory by product group, items below their reorder point with cover and due date, inventory value over 30 days.
  • ✓Finance: receivables by age. Over 30 days overdue turns amber, over 60 days red.

Take the example straight into your draft. Under Pair you create a view, scan the QR code and send the demo to your device with “Send a test”.

Download on the App StoreGet it on Google Play
Gross margin October
32.0%
€202,496 on €632,216 revenue
Open orders
129
5 overdue · €74,385 order value
Fill rate
97.5%
Today 119 of 122 lines complete from stock
Below reorder point
ItemStockpcsReorder ptpcsCoverdaysDue
Hydraulic hose DN10513051.3Mon 19 Oct
Hex nut M106,82114,3003.2Mon 19 Oct
Safety shoe S3 size 4331793.4Tue 20 Oct
Purchasing run daily 08:00 · 10 A items
Inventory value
2,377,920€
Last 30 days · valued at cost
Receivables
not due1–30 days31–60 daysover 60 days
Overdue €56,997
// HOW THE DATA GETS THERE

The ERP exports. Andon reads along.

A script on a machine in your network reads what the ERP puts out anyway, builds the view from it, encrypts it and sends it over HTTPS to the relay. It writes nothing into the ERP.

01

Take the export

Almost every ERP drops lists somewhere: a scheduled CSV export, a report as an Excel file. Or it has a database that a read-only user may query.

02

Set the status and seal

The script decides by your rules what is green, amber or red: plan, reorder point, payment terms. Sealing and uploading is one of the templates in Node.js or Python.

03

In step with the export

Windows Task Scheduler or cron runs the script after each export. If the export stops coming, the app turns the view grey after the agreed time.

Good candidatesCSV exportExcelSQL ServerODBCSAP Business OneDynamics NAVSageJTL-Wawi
// RECIPE: CSV EXPORT

From the export to your phone, with one script.

The script reads two files the ERP drops on a schedule: the invoices and the stock list. From them it writes a view with three tiles: revenue this month, revenue by product group, items below their reorder point. It needs Python alone, no packages.

  • ✓Older ERP systems often export with semicolons, decimal commas and in Windows-1252. The script reads exactly that. Adjust the column names such as date, net or stock to your export.
  • ✓The month turns amber when revenue is below 98 % of the pro-rata plan, red below 90 %. An item out of stock or with less than two days of cover turns red.
  • ✓Sealing and uploading is andon_seal.py from the developer page. It needs cryptography and requests. On Windows, set ANDON_CACHE to a file in a folder that exists: the default is under /tmp.
  • ✓After each export, Windows Task Scheduler or cron pipes the output of erp_export.py into andon_seal.py, with the values from the .env as environment variables.
erp_export.py
#!/usr/bin/env python3
# ERP exports as an Andon view: revenue this month against plan, and
# items below their reorder point. Reads the CSV files the ERP writes
# on a schedule; nothing touches the ERP itself. Writes the document
# to stdout; andon_seal.py seals and sends it. The status is decided HERE.
import calendar, csv, json, sys
from datetime import datetime, timezone

EXPORT = "/srv/erp-export"  # where the ERP puts its files
PLAN = 1_320_000            # revenue plan for the month, EUR

def rows(name):
    # Typical of older ERPs: semicolons, decimal commas, Windows-1252.
    with open(f"{EXPORT}/{name}", encoding="cp1252", newline="") as f:
        return list(csv.DictReader(f, delimiter=";"))

def num(s):
    s = s.strip().replace(".", "").replace(",", ".")  # 1.234,50
    return float(s) if s else 0.0

now = datetime.now()
month = [r for r in rows("invoices.csv")
         if datetime.strptime(r["date"], "%d.%m.%Y").strftime("%Y-%m")
         == now.strftime("%Y-%m")]

groups = {}
for r in month:
    groups[r["group"]] = groups.get(r["group"], 0) + num(r["net"])
parts = sorted(groups.items(), key=lambda g: -g[1])
if len(parts) > 6:  # a donut reads up to about six
    parts = parts[:5] + [("Other", sum(v for _, v in parts[5:]))]
parts = [(g, round(v)) for g, v in parts]
revenue = sum(v for _, v in parts)

# Due by today, pro rata. Below 98 % amber, below 90 % red.
due = PLAN * now.day / calendar.monthrange(now.year, now.month)[1]
month_status = ("ok" if revenue >= 0.98 * due
                else "warning" if revenue >= 0.9 * due else "critical")

low = []
for r in rows("stock.csv"):
    stock, reorder = num(r["stock"]), num(r["reorder"])
    if stock >= reorder:
        continue
    per_day = num(r["usage_30d"]) / 30
    cover = round(stock / per_day, 1) if per_day else None
    # Out of stock, or gone in two days: red. Otherwise amber.
    red = stock <= 0 or (cover is not None and cover < 2)
    low.append({"cells": [r["name"], stock, reorder, cover],
                "status": "critical" if red else "warning"})
low.sort(key=lambda r: (r["status"] != "critical", r["cells"][3] or 0))
stock_status = ("critical" if any(r["status"] == "critical" for r in low)
                else "warning" if low else "ok")

json.dump({
    "id": "8e3b5c71-4f2a-4d9e-b6a0-2c7d9e1f4a58",
    "schemaVersion": 1,
    "name": "Sales & stock",
    "generatedAt": datetime.now(timezone.utc).strftime("%Y-%m-%dT%H:%M:%SZ"),
    "staleAfterSec": 7200,  # hourly export: grey after two missed
    "tiles": [
        {"id": "t_month", "view": "progress", "title": "Revenue this month",
         "titleShort": "Revenue", "status": month_status,
         "value": revenue, "unit": "€", "decimals": 0,
         "range": {"min": 0, "max": PLAN}, "target": round(due)},
        {"id": "t_groups", "view": "donut", "title": "Revenue by group",
         "value": revenue, "unit": "€", "decimals": 0,
         "categories": [g for g, _ in parts],
         "series": [{"name": "Revenue", "values": [v for _, v in parts]}]},
        {"id": "t_low", "view": "table", "title": "Below reorder point",
         "titleShort": "Reorder", "status": stock_status,
         "columns": [{"title": "Item"},
                     {"title": "Stock", "decimals": 0},
                     {"title": "Reorder pt", "decimals": 0},
                     {"title": "Cover", "unit": "d", "decimals": 1}],
         "rows": low[:20]},
    ],
}, sys.stdout)
// WHY ANDON

Next to the ERP, not inside it.

Read-only

The script reads exports or queries with read rights. Nothing changes in the ERP: no module, no update, no project.

No way in

Outbound HTTPS only. The ERP server stays behind the firewall, with no open port and no VPN.

End-to-end encrypted

Revenue, items and customers pass through the relay encrypted. Only your paired devices can read them.

Your rules, your traffic light

You decide what is red: plan, reorder point, payment terms. The app shows the verdict, not just the number.

// QUESTIONS

Questions about ERP dashboards.

Do I have to change my ERP or buy a module?

No. Andon takes what your ERP puts out anyway: an export, or a read-only query on its database. Nothing changes in the ERP itself.

Our ERP is old and has no API. Does it still work?

Yes, that is the case it is made for. Almost every ERP can drop lists as CSV or Excel, many on a schedule. The script above reads exactly such files. If the data sits in an SQL database such as Microsoft SQL Server, a read-only ODBC connection works too.

Which ERP systems are supported?

Any that a script can get figures out of: by export, database or interface. Andon doesn't need to know your ERP; it shows the view your script builds. There is no ready-made connector for a particular system.

How up to date are the figures?

As up to date as your export. When a status changes, your source wakes the widget, usually within a minute. Otherwise the system decides when to reload it, typically about every 15 minutes. The open app fetches new values every minute.

Can the relay read our revenue?

No. The view is encrypted in your network; the key stays there and on your devices. The relay only stores the encrypted envelope. The details are under How it works.

Who on the team sees the figures?

Only the devices you pair. In the configurator, under Manage, you see every device by name and can revoke it. Sales and warehouse get separate views, each with keys of its own.

Start with one export.

Build tiles in the configurator, create a view, pair your device. Then put the script into the task scheduler.