Meridian: from department files to owned actions.
A build on Meridian Components, a fictional manufacturer with four plants in Vietnam. Every SAS screen below comes from the Viya environment we built it in, captured in October 2026. Every number is one it produced.
- department files to start
- 19department files to start
- rows fixed by 40 cleaning rules
- 28,098rows fixed by 40 cleaning rules
- stockout models compared
- 7stockout models compared
- actions, each confirmed by the published decision
- 306actions, each confirmed by the published decision
Four plants, one truth per department.
Meridian runs four plants and four warehouses on department workbooks: production by shift, purchasing trackers, stock counts and a standard cost sheet. Each department kept its own version of the numbers, so the weekly meeting began by reconciling them instead of acting on them.
We didn’t ask anyone to give up their files. SAS loads them as they are, and the project is laid out in five stages, each a folder of programs with a flow beside every program.
- Decision
- Load the files as they are and do every fix inside SAS, in code anyone can read.
- Why
- People keep the tools they trust, and every correction is visible and repeatable instead of hidden in someone’s copy.
- Built with
- SAS StudioSAS Content

Clean once, with rules you can audit.
The 19 files became 23 raw tables, 12 cleaned tables and 23 gold tables ready for decisions. Forty cleaning rules fixed 28,098 rows: money typed as text, dates in three formats, shift codes written several ways. Each rule writes a line to the data quality log.
Every program has a flow, so SAS Lineage can draw the path from any table back to the program that built it and forward to the reports that read it.
- Decision
- One rule, one log line, and a flow for every program.
- Why
- When a manager asks where a number came from, the answer is a click in SAS Lineage, not a meeting.
- Built with
- SAS Studio flowsDATA step and PROC SQLSAS Lineage

Predict stockouts, and let the models compete.
A planner’s question is simple: which product, at which warehouse, will drop below its reorder point in the next four weeks? Model Studio trained seven candidates on the same features (stock against reorder point, stock in transit, recent shipments, supplier lateness and season), with later weeks held back for testing.
Forest ranked best on the held-back weeks and was registered in Model Manager as the champion. Gradient boosting is retrained in code every week as the challenger, so a slipping champion shows up in the numbers.
- Decision
- Forest is the champion; gradient boosting stays on as the challenger.
- Why
- Forest had the best ranking on data it never saw, and keeping a challenger shows whether the champion is starting to slip.
- Built with
- Model StudioModel Manager



Decide with rules a business owner can read.
A score is not an action yet. The decision Meridian_next_best_action runs the champion model, then two rule sets. “Choose action” (6 rules) decides whether a stock position needs a reorder, a purchase order needs expediting, a product needs a margin review or a line needs checking. “Priority, owner and review” (14 rules) sets priority by money at stake, picks the owner, sets the deadline and decides when a second person checks.
The decision is published to the SAS Micro Analytic Service, so anything that can make a web request can ask it what to do.
- Decision
- Keep thresholds in rule sets, not in program code.
- Why
- A supply chain lead can read and change “expedite when a supplier was late on 60% of recent orders” without a developer, and Intelligent Decisioning versions every change.
- Built with
- Intelligent DecisioningMicro Analytic Service



Run it every Monday, with the same logic.
A scheduled job runs every Monday at 06:00. It reads back what people decided and resolved in Lantern, builds this week’s candidate actions, sends each one through the published decision, drafts the messages, measures last week’s outcomes and pushes the results to Lantern.
The batch job calls the same published decision as everything else, so an action in a report and an action on screen can’t disagree. If the decision service can’t be reached, the job stops and keeps last week’s actions rather than publishing an empty list.
- 1Read back decisions and resolutions from Lantern
- 2Build candidate actions
- 3Send every candidate through Meridian_next_best_action
- 4Draft messages and check them
- 5Measure what happened after earlier actions
- 6Push actions, outcomes and stock risk to Lantern
- Decision
- Call the published decision from the batch job instead of copying its rules into code.
- Why
- One place decides. Changing a rule changes every channel at once, and nothing drifts.
- Built with
- SAS Job ExecutionPROC HTTPMicro Analytic Service
proc http url="&base./microanalyticScore/modules/meridian_next_best_action/steps/execute"
method="POST" in=_nq out=_na ct="application/json" oauth_bearer=sas_services;
headers "Accept"="application/json";
run;NOTE: Lantern decisions read into APP_ACTION_DECISIONS.
NOTE: Lantern resolutions read into APP_ACTION_RESOLUTIONS.
NOTE: Decision service answered all 306 rows (meridian_next_best_action).
ACT REORDER High 55 55 1,994,641,000
ACT EXPEDITE_PO High 47 47 181,319,000
ACT INVESTIGATE_LINE High 12 12 790,203,000
NOTE: Lantern gold_actions: {"rows": 306, "table": "gold_actions", "skipped": []}
NOTE: Lantern gold_stockout_risk: {"rows": 16800, "table": "gold_stockout_risk", "skipped": []}
NOTE: Lantern gold_model_metrics: {"rows": 11, "table": "gold_model_metrics", "skipped": []}Give every action one owner, and show the reasoning.
Lantern gives each action one owner and shows why SAS raised it: the rule that fired, the champion’s probability for stock positions, and the rule set that chose its priority, owner and deadline. The owner does the work (calls the supplier, checks the line, places the order), records what was done and resolves it.
What people see follows their role. A buyer sees purchase orders, a shift lead sees their own line, and the database enforces it row by row.
- Decision
- Viya seats for the people who build and govern; Lantern for everyone who acts.
- Why
- Hundreds of frontline people can act on SAS decisions without a Viya licence, and everything they decide flows back to SAS the next Monday.
- Built with
- LanternPostgreSQL row-level security


Measure what happened, and keep the models honest.
Each week the job checks resolved actions against what happened next: did the stock run out, did the purchase order arrive on time, did the defect rate come back down. The results are pushed to Lantern beside the action.
The models are judged the same way. Champion, challenger and a plain stock-level ranking are scored on the same 1,100 held-back rows, 138 of which ran out within four weeks.
- Decision
- Judge every model on the same rows, next to a plain baseline.
- Why
- A model earns its place only if it beats simply ranking by stock level. The champion catches 13 more stockouts in its 300 riskiest than the baseline does.
- Built with
- SAS programsVisual AnalyticsLantern
Stockout models on the same held-back rows
| Model | AUC | Stockouts caught in the 300 riskiest |
|---|---|---|
| Forest, the champion | 0.939 | 133 / 138 |
| Gradient boosting, the challenger | 0.927 | 129 / 138 |
| Stock level alone, the baseline | 0.918 | 120 / 138 |
AUC: 0.5 is a coin flip, 1.0 is perfect. Computed by ins_02 on 20 October 2026.


Decision record
- The starting point
Load the files as they are and do every fix inside SAS, in code anyone can read.
SAS Studio, SAS Content
- Clean and trace
One rule, one log line, and a flow for every program.
SAS Studio flows, DATA step and PROC SQL, SAS Lineage
- Predict
Forest is the champion; gradient boosting stays on as the challenger.
Model Studio, Model Manager
- Decide
Keep thresholds in rule sets, not in program code.
Intelligent Decisioning, Micro Analytic Service
- Run weekly
Call the published decision from the batch job instead of copying its rules into code.
SAS Job Execution, PROC HTTP, Micro Analytic Service
- Act in Lantern
Viya seats for the people who build and govern; Lantern for everyone who acts.
Lantern, PostgreSQL row-level security
- Measure
Judge every model on the same rows, next to a plain baseline.
SAS programs, Visual Analytics, Lantern
Where it runs
Lantern reads the tables the Viya weekly job publishes, so every number in the workspace is real SAS output. The sections above show where each part was built.
See Lantern at work.
The demo runs on Meridian, a fictional manufacturer built on a real supply chain dataset. Sign in and work this week’s actions the way its team would.