r/intersystems • u/intersystemsdev • 14h ago
How do you turn a plant's SOP into an automatic recommendation for every late manufacturing order in InterSystems Supply Chain Orchestrator?
youtu.beIn SCO Workbench, a business process turns a standard operating procedure (SOP) into a decision tree, answers each question with SQL against real data, and then applies the tree to every issue SCO raises. This video, part of the Supply Chain Orchestrator Workbench series, builds one for late manufacturing orders. The previous episode imported a spreadsheet of manufacturing orders and built a KPI that raised 131 issues, one per late order, but nothing yet said what to do about them. Issue analysis has now been added to the workbench.
What do you need first?
- The latest SCO Workbench from GitHub or Open Exchange (links in the video description)
- Business processes use the SCO AI Assistant to write SQL. The Community Edition already includes it, so you only add your Azure OpenAI credentials, which is a single call to the SCO API (shown in Postman, with setup docs linked)
How do you build the decision tree?
The new Business Processes page has four ready-made examples you can duplicate. The video builds one from scratch, starting with an SOP, the simplest form of decision intelligence SCO supports (scenario analysis and machine learning are other options).
The plant's SOP for a late order: did it start late? Then check the parts. If not, how late did it finish? Four hours or less, no action. More than eight hours, add workers. Anything in between, ask the supervisor.
Paste it into the Workbench Bot and it draws the tree:
| Element | Meaning |
|---|---|
| Node | Each question |
| Branch | Each answer |
| If | A yes or no question |
| Switch | A question answered with a number |
| Otherwise | Catches everything else (here, 4 to 8 hours) |
| Recommendation | The end of each branch |
How does each question get answered with real data?
Click Save, then Create. The plan shows both questions still need SQL, so click Resolve with the Workbench Bot. For each question the SCO AI Assistant writes a SQL query, and the bot tests it on a real order with you before moving on.
- SQL summary: explains the query in plain words, so you don't have to read SQL (for example, it checks whether the order started after its planned start). The exact question sent to the assistant is shown too, so nothing is hidden
- Run SQL preview: test any query yourself. Order MO-00006 started four hours late, so the answer should be yes, and it is. You see the answer, the branch it takes, and the rows behind it
- Frozen queries: once a query is tested, it's frozen. No AI runs when SCO analyses an issue, so the same data always gives the same answer
Then click Deploy v1. SQL is only one way to get an answer. A business process can also pull data from other systems (such as an order's latest status from an ERP, or a file a supplier sends), follow business rules, convert data between formats, and pass work to the right person. Those are built by a developer in SCO, and an SOP is the easiest kind to start with.
How do you run it on an issue?
In Issue Management, open one of the 131 issues, for example order MO-00013, which is late and has no recommendation. In the analysis panel choose Late Manufacturing Order and click Run analysis. SCO picks the run up within about 30 seconds.
Result: the order didn't start late but finished 12 hours late, so the recommendation is a big delay: add extra workers for the next run. The Why section shows the tree with the path this run took. The decision path lists every step with the SQL it ran, the input, the value it got, and a snapshot of the data at that moment. Anyone can check later why the order got this recommendation, even if the data has changed since.
How do you change the SOP?
Say the plant now wants extra workers once an order is more than six hours late, not eight. Ask the bot to make the change, click Update to see exactly what will change before anything goes live, then Deploy v2. Every version is kept in the version picker.
How do you automate it?
Edit the Late Manufacturing Orders KPI, choose the business process as its Analysis Service, and deploy. From then on, each new issue the KPI raises is analysed as soon as it's raised, with no one clicking anything.
One caveat: the 131 earlier issues aren't analysed automatically, because SCO picks the process for an issue at the moment it creates it. You can still analyse any of them with Run analysis. When a planner acts on a recommendation, Close issue records that it was accepted.
A business process can also do more than record a decision. With SCO scenario analysis it can compare options using current data (adding workers, running overtime, or moving the order to another line), show the cost and time of each, and mark the recommended one. Once someone picks an option, the process can carry it out: email the supervisor, create a report of late orders for the morning meeting, or add workers to the next run if the shift plan is kept in SCO. When the action works, SCO closes the issue on its own. If something goes wrong, the issue is flagged for follow-up.
What is the whole flow?
| Step | What SCO does in this series |
|---|---|
| Data | A ready-made data model of 33 linked objects, from manufacturing orders to inventory, suppliers, and shipments. The bot found the Manufacturing Order object that fit the spreadsheet, and the supervisor was added as a custom attribute (a custom object is possible if nothing fits) |
| Business logic | A cube turns raw orders into measurable numbers, such as average hours by supervisor, and marks each order late (finished after its planned end date) or on time. The KPI counts late orders and warns when there are too many |
| Identify the risk | The KPI raised an issue for each of the 131 late orders |
| Take action | The business process applies the SOP to each issue and gives a clear recommendation with the reason behind it |
If your supply chain team has written-down SOPs, which one would you turn into a decision tree like this first, and what data would it need?











