Docs Designing the system 13
After it is live: the integration monitor
On this page
Integration monitor (/_design/integration) shows what the plant's integration is doing, and did, in a
tab for each kind, all times in the plant's time zone. The tabs but Health, Run history and Copilot are read again every
10 seconds (Health every 30):


| Tab | What it shows | What you can do |
|---|---|---|
| Overview | The last 24 hours' runs, as tiles: schedules, record triggers, web calls in, and runs from screens and services, each with how many worked, were refused and failed; the latest failures; each running server (alive or gone, its tags, whether it plans schedules and runs triggers, its build, when it was last seen). A red warning if no live node plans schedules or runs triggers | Press a tile for those runs in the history; press a failure to open it. A node gone: tell IT |
| Health | Each running server's health, part by part: its database, audit chain, data integrity, event log, scripts' walls, reads and load, each ok, needing a look or failing (Load needs a look while a server is asked for more than it can do: it then runs fewer calls at a time, lets what people do go first, and tells the rest it is busy; their pages ask again by themselves, and the event log says when it began and when it kept up again. If it lasts or comes back, the plant needs another server or a faster database). Now, a card per server; Over time, a strip per part over 6 hours, a day or a week (point at a cell for when and what); Changes, each part's change of state, newest first | Filter the changes by server, part or Only problems; tell IT what fails |
| Schedules | Each scheduled service: when it runs (or, for a schedule from a suite that is not installed, which suite it needs), where, the next run, the last run and its outcome and error, totals (ok, failed, missed, skipped), what is queued | Pause, Resume, Run now, Its runs |
| Record triggers | Each service a record event sets off: what it reacts to, where it runs, its queue and its last 24 hours | Its runs; send a failed one again from the service's Activity tab |
| Web calls in | Each web service, transaction and named query published over the web: its address, its callers, its calls in the last 24 hours (ok, refused, failed), the last call. Below, how many transactions and named queries could be and are not: only what its design publishes answers at /svc/v1 (a transaction on its Callers tab, a named query on its Web tab, a service on its General tab); a signed transaction never is | Its calls |
| Connections out | Each connection: the services that use it (each a way to its runs), its requests in the last 24 hours (ok, failed, unreachable), the average time, the last request | |
| Peers | Each other OpenCore MES instance this one links to: its plant and suites as last discovered, what is left to send (waiting, to retry, given up on, refused this week, and since when), each link to it and what sets it off, the scripts that call it, where each puller stands (last good run, its cursor, next run, missed), its requests in the last 24 hours | Discover again; Send again what was given up on or refused; Its runs |
| Run history | Every run kept, newest first (below) | Filter, search, open a run |
| Copilot | Ask why something fails (below) | Open a change for the design it points at |




Run history. Every run of a service (on a schedule, a record's event, a web call, a screen's button, another service) and every web call to a transaction or a named query. Filter it by How it was set off, its Outcome (worked, refused, refused or failed) and What ran, or Search a name, an error or who set it off; its head stays in view, and older runs come as you scroll. Press a run (or Enter on it) to open it in a panel: what ran, how and when, how long it took, who set it off and as whom, what went wrong, and, when it failed in its script, where in the script: the line, with the lines around it, numbered as the script editor numbers them, and the calls that led there. Then the requests it sent and what each answered, and what it was given and answered. A fault of the platform's own keeps the server's stack too, shown to database administrators only (it names the server's files). Every run of … lists the same service's; Ask the copilot about it starts the question for you. How long runs are kept is set in People & departments → Retention, for each kind of run, those that worked apart from those refused or failed (30 days and a year unless your plant says otherwise).
Copilot. Ask in words: Why does the ERP export fail since this morning? Which connections got slower this week? What do the failures of label_print have in common? What is wrong with the health? It reads the runs, the services' scripts, the connections (never their secrets), how each was called day by day, and the Health tab (each instance's database, audit chain, data integrity, event log, scripts' walls, reads and load, and when one went to a warning or failed), as you, and answers with the runs and changes it found. It changes nothing: it cannot pause, retry or run anything. When the fix belongs in a design it says which, and what to change; press Open a change for … and the change opens on its Copilot tab with that summary to work from, for you to check, ask for the draft and submit as any change.
Pause, Resume and Run now are operations, not design: they take effect at once, without a change request, and are audited and written to the event log (who, and the run Run now queued).
- Pause stops new runs (a run already queued still runs), for example while ERP is down for maintenance.
- Resume plans from now on: what fell due while paused is not caught up. Use Run now if a run is needed.
- Run now runs the service once, outside its schedule, with the schedule's identity.
Not yet. The design gives pausing, resuming and running now to the service's stewards; today anyone with the designer may.
Analytics: time between states
The platform records every stay of a record in a state: when it entered, when it left, who moved it and by which action. Nothing to design beyond the dimensions (section 4); every object with states has it.
- A record's Timeline tab: its states in order, as a coloured strip and a table (entered, left, by whom, how long). An archived record's stay ends when it is archived; restoring it starts a new one.
- An object's Analytics page (Analytics above its list), for a period (the last 7, 30 or 90
days, or a year), optionally By one of its dimensions:
- Now: the records in each state at this moment, their average age and the oldest. Archived records are not counted.
- Time in each state: the stays that ended in the period: how many, average, median, 90th percentile and longest.
- Lead time: from a record's first entry into one state to its first entry into another after it (for a lot, created → released), for records that reached the second in the period; with the slowest records, each a link (only those you may read are listed).
- Entries: records entering a state per day, week or month (lots released per day), in the plant's time zone.
- Who sees it: anyone holding a role on the object; grouping only by a field they may read in every state.
Not yet. Measures and dashboards you design, and OEE, are the next phases: this page is the first, built-in view.
Queries: SQL and JSON
Query (under Data in the navigator, for people with the analyst role) asks the plant's data anything, in SQL or JSON.
- The schema explorer (left) lists a view per object (
lot,work_order, …) and its stays in states (lot_stays). Each column shows its type, and a tag when you may read it only in some states, or never (it is then empty for you). Use sample query starts you off; clicking a column adds its name to your query. - SQL: one
SELECT(aWITHbefore it is fine). Ctrl/⌘ + Enter runs it. For example, lots per item released in the last week:SELECT l.item, count(*) AS released FROM lot_stays s JOIN lot l ON l.id = s.record_id WHERE s.state = 'released' AND s.entered_at > now() - interval '7 days' GROUP BY l.item ORDER BY released DESC - JSON, if you do not write SQL:
{ "from": "lot", "select": ["state", { "count": "*", "as": "lots" }], "groupBy": ["state"] }. Open as SQL shows what it became. - You see what your forms show: the same rows and fields your roles let you read, whoever wrote the query. Nothing else is reachable: the tables behind the views, settings and other databases are refused, and a query stops after 5 seconds or 1 000 rows (up to 10 000 if you ask).
- Download CSV saves the result. A value that a spreadsheet would run as a formula (one that starts
with
=,+,-or@) is written with an apostrophe before it, so it opens as text. - Both editors colour what you type (keywords, strings, numbers, names, comments) and mark an unclosed bracket, string or comment on its line before you run anything.
AI Report: reports, layouts and the analytics copilot
AI Report (under Data in the navigator) holds pages of words, figures, charts and tables on the plant's data. You see the entry when you hold a role on the built-in AI report object: analysts are its authors; give anyone else the reader role (People & departments) to let them open what is shared.
- Ask the copilot (analysts, on the AI Report page): say what you want to know in plain words, for example "How many lots are in each state, and how many were released per day this week?". It reads the schema, runs queries, and draws a report: a few words on what stands out, figures, charts and tables. Its charts are of twenty kinds, each for its question: bars (stacked, across), lines and areas, scatter and bubbles, pie, donut and funnel, heat map, box plot and histogram (drawn from the values themselves), radar, gauge, tree map and sunburst, sankey, waterfall, Pareto, candlesticks, and bars with lines on a second axis; with reference lines (a target, limits) and shaded bands. A chart draws only what its query answers, as whoever opens the report: no number is ever written into one. Point at a bar, a slice or a point for its value. No record is ever shown by its internal id, on a chart, in a table or in the copilot's words: each is named by its title, as you may read it ("—" where you may not). Ask again to change it ("make the second chart a line, and add the lots on hold as a table"). New chat clears the conversation.
- It reads as you. The copilot's queries are yours: the same rows and fields your forms show, the same limits as the Queries page. It cannot change a record or a design, and each query it runs and each report it draws is in the audit trail under your name.
- Keep this report saves what is drawn, under the title you give it. It is then listed under
Kept reports and has its own address (
/_r/…), which you can send to someone. It cannot be a desktop's own page: a desktop opens a screen or a transaction. - Share lets everyone with a role on AI report open it. A report holds no data, only its queries: they run when it is opened, as whoever opens it. A colleague who may not read a field or an object sees that block empty, or a line saying they may not read it, never your rows.
- Pick a layout (above the question box) to have the report drawn on a shape the plant designed: the Daily report, the Shift report. Under the pick you see what the layout is for and its blocks, each as wide as it will be. The copilot then fills exactly those blocks, in that order; it chooses the queries and the words, from what you may read. None leaves the arrangement to the copilot. You can change the pick between questions.
- Find a layout from the navigator: type its name in the search box ("wirebond", "daily"). It is listed under AI reports, opens the AI Report page with that layout picked, and can be starred like a screen. Only published layouts are found, by people who may ask for a report (analysts).
- A kept report is a record: its changes are in its history, and its author can archive it from its record page (Data → AI report). One drawn on a layout says which, and keeps its shape even if the layout is changed later.
- What the AI is sent: the names of your objects' views and columns, and the rows of the queries the copilot runs for you (at most 40 a query). If your plant's data may not go to an AI provider, do not give out the analyst role, or run without an AI configured: kept reports still open.
- Attach (the paper clip above the question box, or paste a screenshot or a copied file into the box, or drop one on it; pasted text stays text) gives the copilot files with your question: a picture (a defect, a label, a whiteboard), a PDF (a spec, a certificate, a work instruction), a CSV file or an Excel workbook, up to five, a picture at most 5 MB, a document 10 MB. It sees pictures and reads PDFs and spreadsheets (the first rows of each sheet), and says what they show beside the plant's data ("is the bond force in this photo's lot within the limits in this workbook?"). Each file is kept by what it is, and shown in the conversation to open again. To show one in the report, ask: it adds a media block, a picture drawn or a document to open or save, with a caption. A model that cannot read PDFs (an in-house one) is told a PDF was attached.
- Keep prompt (under the question box) keeps what you asked, under a title, in Kept prompts, with its files (the box's, or those of what you asked last): Given with it each time in its form lists them, to add or take off; a prompt asked by the clock is given them every time. From there: Put it in the box to ask it again, as it is or changed first; Change its words, its layout or its schedule; Generate now to have it asked as you without opening a conversation; Remove it (the reports it generated stay).
- Asked by the clock. A kept prompt can be asked every day, Monday to Friday, once a week, or every few hours (at most once an hour), at the plant's time. It is asked as you, with your rights as they are then, and each report it draws is kept as yours, titled with the prompt's title and the date and time. If you leave, or may no longer query, it is not asked, and says why. At most ten of your prompts run by the clock. If the server was not running at its time, it is asked as soon as the server is back, once for all the times it missed; that report (and the prompt) says when it was due and how many runs were not made. A run cut off by a stop is made again when the server starts, and one that fails because the AI or the network is away is tried again after 5, 15 and 30 minutes (the prompt says when).
The same report every time. Asked again, the copilot arranges each report afresh (on a layout, it keeps the layout's blocks but writes new queries and words). When one of a prompt's reports is the one you want every time, press Keep this report's queries on the prompt: it is pinned to its last report. From then on each run, by you or by the clock, runs that report's queries again, as you, and keeps a new report with exactly its blocks, titles and charts, with that day's numbers. The prompt says which report it repeats. Its words choose what happens to the report's text:
- As written (no AI): the words stay as first written. No AI is asked, so it works even where none is configured. A sentence that quotes a number keeps that number, so write such reports' words to say what to look at, not what the numbers are.
- Written fresh by the copilot, each run: the copilot rewrites only the words (and an AI assisted block's advice) from what that run's figures, charts and tables show. It changes no block and runs no query.
If a block's query no longer works (a field was removed), that block says why in the new report, and the prompt says which block. Ask the copilot each time unpins it.
- A layout from a report (designers): on a kept report's page, Make a layout from it opens a new change in the Designer with a report layout of that report's blocks: their kinds, order, widths, titles and chart kinds, and what each is for, in words. Its queries do not go with it: on a layout, the copilot writes those for each report. A picture or file the report showed has no place in a layout. Review it on the layout's tabs (an AI assisted block needs its goal written), then submit it like any design: once it is approved, everyone can pick it.
- Tags. File a report under words of your own (daily, wirebond): Add tag beside it in Kept reports (your own reports) opens Find or add a tag: the tags in use, ticked where the report has them (each tick is saved at once), and a box to find one or add a new one, one tag at a time. The ✕ on a tag takes it off at once, with an undo for a few seconds. Every tag in use appears above the list as a filter: click one and only the reports with that tag are listed; click another to narrow further; show all clears it. A kept prompt names the tags of the reports it generates, so everything the clock produces is already filed: one asked by the clock must have at least one (its form marks the field *****, and says so if it is empty). A scheduled prompt kept without tags before this says so in the list: change it to give it tags.
- Ask about several reports. Tick reports in Kept reports (or Select all), press Ask the copilot about the selected, and say what you want of them: a summary, what changed, what to do next. The copilot is handed each as you may read it now: its words as written, and today's numbers, because a report holds no data of its own. At most twelve at a time.
Designing a report layout
A report layout decides how an AI report looks, so that everyone asking for "the daily report" gets the same page. It is designed in the Designer, on the Report layouts tab, and goes through review and approval like a screen.
- New report layout: a name (
daily_report) and a label (Daily report), then Start design. It starts with four blocks you can change. Copy starts one from a live layout. General: the label people pick it by, a description (shown under the pick), and Guidance for the copilot: words about the whole report. "Cover the last 24 hours. Lead with what needs action. Name lots and tools by their labels." Type makes the layout an AI assisted line: a report about one line that says which lots must be processed, and in which order, to meet the shift's goal. Choose it, then, right there:
- Records of: the object your equipment is (Equipment).
- Which: the equipment of the line. Type part of a name (WB), click what is found; or type a name in full and press Enter. Up to 50, listed as people call them (WB-01).
- The goal: "Meet this shift's output target on every work order running on the line; what is due first goes first." If targets are records, say where.
Everything the copilot reads for this report is kept to that equipment. For another line, copy the layout (Copy on the Report layouts tab): the copy starts with the same equipment and goal; change the equipment, and it goes through approval as its own layout (Wirebond line 1, Wirebond line 2).
- Blocks, in reading order, at most 12. For each:
- Kind: text (the copilot's words), a figure (one number), a chart, a table.
- Width: a quarter, a third, half, or the whole row. Four quarter-width figures make a row of numbers; two half-width charts sit side by side. On a phone each takes more.
- Chart (a chart block): one of the twenty kinds (the note under it says what each is for), or leave the choice to the copilot.
- Title: kept as written on every report. Leave it empty and the copilot titles the block.
- What belongs here: say it as you would to a colleague: what, over which period, in which order. "Lots on hold: lot, hold reason, since when; longest first." The copilot writes the query.
- An AI assisted line is a block that advises instead of reporting: which lots must this line process to meet the shift's goal? Pick the object its records are of (your equipment), then which records make up the line: type to find them and click, or type a name in full and press Enter. They are listed by what people call them (DB-01), up to 50. Then write the goal: "Meet this shift's output target on every work order running on the line; what is due first goes first." If the targets are records, say where ("targets are in Shift goal records"). Give it the line's name as its title.
- copy on a block puts a copy just below it. For a second line, copy the AI assisted line, change its title and swap its records. To give another area its own report, copy the whole layout (Copy on the Report layouts tab) and change the records there.
- Preview sketches the page: each block where and as wide as it will be.
- Stewards: the departments that approve changes to it. Then submit the change as usual.
Things to know:
- A layout holds no query and no data. It names no object or field, so it cannot show anyone anything: each report drawn on it is read with the rights of whoever asked or opens it.
- The copilot must follow it. A report with a block missing, added, out of order or of another kind is not drawn; the copilot is told what differs and draws it again. Widths and titles are the layout's, whatever the copilot proposes.
- An AI assisted line advises; it does nothing. The copilot reads what waits and what is done on the records you picked, as the person asking may read them, and writes what to process first and why, with the list in order. Nobody's lot is moved: acting on it is a transaction, as always. On a kept report the list is read again each time it is opened, but the advice is from when it was drawn: ask again for today's.
- Changing a layout does not change reports already kept: they keep the shape they were drawn with.
- The design copilot can draft a layout for you ("a daily report layout: four figures, two charts, a table of lots on hold"), in a change, like any design.
Import and export in Excel
Data → Import / export, or Export above any list.
- Export the models you tick. With Include the records they refer to, a lot export also has
a work order tab with the orders those lots refer to. References are written as the other record's
key (the order number). The
_abouttab lists each field and its type. - Import a workbook: each tab named after its model, the first row naming the fields; several models may come in one file. You first see a preview (to create, to update, unchanged, refused, and why), and nothing changes until you Apply. Applying the same file twice changes nothing twice. A workbook is read up to 100 000 rows a tab and Excel's own last column, and a file that is larger inside than it looks (or damaged) is refused with the reason, before anything is read from it. An import takes at most 10 000 rows at a time, all its tabs together, from a file of at most 10 MB.
- An import never quietly undoes someone else's work. Each exported row carries its record's
row_version. If someone changed the record after your export, that row is refused ("changed since this file was exported"): export again and redo your edit, or empty the row'srow_versioncell if you mean to write over their change. - If a model changed since the export (a new definition version), the preview says so and lists what changed in its fields; Apply asks you to confirm. Check that the file's values still mean what they meant, a unit in particular.
- What an import may do is part of each model's design (its General tab, Excel import and export): may it create records, may it update (override) existing ones, and which field names a record. Every row is checked like a form: your rights, the model's rules, the audit trail.
The whole model to another installation
Designer → Export or import the whole model carries a model from one installation to another as one file, without copying the database.
- Export. Every published design goes into the file: objects, rules, services and connections, transactions, screens, flow templates, report layouts, named queries, a suite's design elements (carried as they are, whether or not the suite is installed on either side), and the roles departments hold. The list shows each object with how many records it holds: leave it ticked and it goes with its records, untick it and it goes empty (its design only). You export what you may read: an object you hold no role on, or whose design forbids export, goes empty and says why. Secrets, people, earlier versions and the audit trail are never in the file.
- Import. Choose the file on the other installation. It is checked first and nothing changes: you see how many designs are new, changed or the same as live, anything to put right, and what that server lacks (a connection's secret, a suite). Start a change from it makes one change request with every design that is new or different; it is reviewed and approved there like any other. Nothing that is live there and not in the file is touched.
- Its records. Once that change has executed, choose the file again and Check its records, then Load. Each record is written as you, checked like a form: your rights, the object's rules, the audit trail. An object's records load only if its design lets an import create records (its General tab, Excel import and export). Loading the same file twice adds nothing.
- What to expect. Every record arrives in its object's first state: a lot that was running at the source arrives as a new lot. History does not travel: each design starts at version 1 and each record's history at its import; the change's audit entry says which file and site it came from. A scenario that picked a record of the source plant carries a copy of that record instead.
Labels: printed from a transaction
A label is a layout of kind label: start one on the Layouts tab (New layout, a label). Its
Label tab draws it as it prints, at its size in millimetres, with the sample values you give on
General; click an element for its settings, drag it into place, add text, a barcode (Code 128,
GS1-128, EAN-13, Code 39), a QR code, lines, boxes, a picture from the file store. An element's
value is words, or what it reads: {"record": "lot_no"} from the record it is printed for (Printed
for names the object), {"input": "qty"} from the transaction's inputs, {"now": "date"}. The
copilot draws it too (it looks at the picture before saving). A transaction prints it with its print
step (section 9); the printers are records
of an object that says so (section 4).
Print jobs (the integration monitor's Overview): every label a transaction queued, its printer, state (queued, waiting for the person, sent, done, failed), the adapter's words when it failed, and Send again once the printer is back. A label for a browser printer waits on the person who ran the transaction: it appears on their page with a Print button, which opens the browser's print dialog at the label's size.
Mail layouts: what a message says
A mail layout is a layout of kind mail: start one on the Layouts tab (New layout, a mail).
General says what it is about: a change to a record waiting for approval or decided, a design change to
review or sign, or a record a service writes about; and, for the first and the last, which object. The
Message tab is the subject and the paragraphs, text with placeholders filled when it is sent:
{record.visitor}, {record.$title}, {request.what}, {request.why}, {request.byName},
{request.department}, {request.link}, {change.title}, {change.stage}, {to.name}, {now.date} (the
tab lists what each kind may read; a sensitive field is refused); and parts the platform fills in: the
fields the change touches (by their labels, never their values), the link to open it, who has signed and who
is awaited. The tab shows the message as it would read, with the sample values from General. Name it on an
object's Stewards tab (its records' changes), on an approval step, or on People & departments' Approvals tab
(the defaults, and design changes); a service may send one with ctx.mail. The copilot drafts one and reads
it filled (render_mail) before saving.