Lantern

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
SAS Studio showing the GDA Meridian folder with the 05 Decide and Act programs and flows
Figure 1. The project in SAS Content: one folder per stage (Collect, Clean, Insights, Visualize, Decide and Act), and a flow beside every program.Open full size

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
SAS Lineage graph for GOLD_ACTIONS with the dec_01 flow and two Visual Analytics reports
Figure 2. SAS Lineage for GOLD_ACTIONS: the flow that builds it, the table in CAS, and the two Visual Analytics reports that read it.Open full size

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
Model Studio pipeline with imputation, variable selection, seven models, an ensemble and model comparison
Figure 3. Pipeline 1 in Model Studio: imputation and variable selection feed the candidate models and an ensemble, then a model comparison.Open full size
Model comparison table with Forest marked as champion
Figure 4. Model comparison on the test partition. Forest, starred as champion, has the highest KS (0.80) and area under the curve (0.94).Open full size
Model Manager project Meridian stockout risk with the Forest model as champion
Figure 5. Model Manager holds the champion in the project Meridian stockout risk.Open full size

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
Decision flow: Start, Forest model, rule set Choose action, rule set Priority owner and review, End
Figure 6. The decision flow: the champion model, then the two rule sets. Validated before publishing.Open full size
Rule set Meridian 1 Choose action with IF, AND, THEN rules
Figure 7. Rule set “Choose action”: a stock position below its reorder point is a reorder; one the model rates likely to run out within four weeks is an early-warning reorder.Open full size
Intelligent Decisioning deployments page showing one decision published to microAnalyticService
Figure 8. Published to the Micro Analytic Service destination, with the model inside the decision.Open full size

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.

  1. 1Read back decisions and resolutions from Lantern
  2. 2Build candidate actions
  3. 3Send every candidate through Meridian_next_best_action
  4. 4Draft messages and check them
  5. 5Measure what happened after earlier actions
  6. 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
How the job asks the published decision
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;
From the weekly job’s log, 20 October 2026
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
Lantern action list with a reorder action open, showing the recommended next step and the SAS decision
Figure 9. An action in Lantern: the next step, the owner and the deadline the rule set chose, and one line on why SAS raised it.Open full size
How SAS decided: stockout model, rule set Choose action, rule set Priority owner and review
Figure 10. The same action’s reasoning, step by step, straight from the decision’s answer.Open full size

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

ModelAUCStockouts caught in the 300 riskiest
Forest, the champion0.939133 / 138
Gradient boosting, the challenger0.927129 / 138
Stock level alone, the baseline0.918120 / 138

AUC: 0.5 is a coin flip, 1.0 is perfect. Computed by ins_02 on 20 October 2026.

Lantern panel comparing Forest, gradient boosting and stock level alone
Figure 11. The same comparison inside Lantern, with the path from Model Studio to the screen.Open full size
SAS Visual Analytics report Meridian Control Tower with bilingual page names
Figure 12. Meridian Control Tower in Visual Analytics, with page names in English and Vietnamese.Open full size

Decision record

  1. The starting point

    Load the files as they are and do every fix inside SAS, in code anyone can read.

    SAS Studio, SAS Content

  2. Clean and trace

    One rule, one log line, and a flow for every program.

    SAS Studio flows, DATA step and PROC SQL, SAS Lineage

  3. Predict

    Forest is the champion; gradient boosting stays on as the challenger.

    Model Studio, Model Manager

  4. Decide

    Keep thresholds in rule sets, not in program code.

    Intelligent Decisioning, Micro Analytic Service

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

  6. Act in Lantern

    Viya seats for the people who build and govern; Lantern for everyone who acts.

    Lantern, PostgreSQL row-level security

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