Reference
Unreleased
0.13.0 — 2026-11-30
Saphir is now Vinctora
- The product is called Vinctora wherever you read it: the sign-in page, the browser tab, the rail, the explanations behind the info marks, the account menu, and the subject of every notification e-mail (“Vinctora: … needs your attention”). Nothing about how it works has changed, and your configuration and cases are untouched.
- Generated e-invoice PDFs carry the new mark and name in their running head, and name Vinctora as the program that produced them.
- The e-invoice template describes itself as a Vinctora template. A document type already created from it keeps the description it was created with.
- The frontend image moved to
registry.gitlab.com/saphir2/vinctora-app. An installation that setsFRONTEND_IMAGEto the old path pulls nothing new from it; change it to the new one. - Not renamed yet: the API’s headers and problem types, the identity
provider’s realm and clients, and the environment variables still say
saphir. They change in a later version, which will say what to adjust.
The review queue, sorted and narrowed the way you work
- Filters you can see. Step, Responsible and Deadline each have a filter above the queue. Each lists what the queue holds, with how many cases every choice would show, and takes several choices at once. A filter in use names its choice and clears with one click, and “Clear filters” resets them all. Whose work you see (yours, your groups’, everyone’s) moved into tabs above.
- Sort by a column. “Step”, “Waiting” and “Finish by” sort the queue when you click them; “Waiting” turns round on a second click. The queue still opens most urgent first: the closest deadline, then the longest waiting.
- Search finds a case by what it says, not only by its name: a supplier, an invoice number, any field value, as the Documents search already did.
- Times read at a glance. “Waiting” says “3 hours” and “Finish by” says “in 2 days”; the exact date is on hover. Groups are named in words rather than as paths.
- Only what differs is shown. The status column, which said “Ready” in every row, is gone, and so are the step tiles above the queue, whose counts are now in the Step filter. A case somebody is editing says so in its own row. “Taken on by” appears in your groups’ work and everyone’s, where it varies, and the workflow’s name only when the queue holds more than one.
- Completing a step is one click. “Complete & next” completes and opens the next case straight away; “Add a comment” beside it is there for the cases that need one. Returning a case still asks for its reason.
- One status on a case. While a workflow runs, the case header no longer shows the document’s draft badge beside where the case stands; revision and schema are under Details.
- The queue beside a case stays put as you move through it with J and K, runs the height of the screen, and shows each case’s name on two lines.
- For integrators:
GET /work-itemstakessort=urgent(the default),oldest,newestorstep.oldestandnewestnow order by waiting time alone; the closest-deadline order they used to apply isurgent. The filters are nowstep(<workflowVersionId>:<nodeKey>),candidateGroupanddeadline(on_time,overdue,escalated,none), each repeatable, in place ofworkflowVersionId,nodeKeyandattention.GET /work-items/facetsreplacesGET /work-items/topicsand counts the basket per step, group and deadline.searchmatches field values as well as the name.
The queue on a phone, and beside every case
- Your queue on a phone. Each case is a card with its step, who is responsible, how long it has waited and when it is due, and the first screen shows cases rather than buttons. Tap a card to open the case.
- A case on a phone. The fields run in one column with Details beneath them, Complete & next comes first among the actions, and a wide table scrolls inside its own box instead of moving the whole page.
- The queue beside a case now runs the full height of the screen against the menu, and shows each case’s whole name rather than cutting it off.
- Fields you cannot change in this step look locked: greyed, with a lock at their right edge, while the fields you are asked to check stay white.
The editors get the whole screen
- Document types, property types, schemas, mappings and matching open on a list of everything configured: each with its name and description, its version, whether it is published, and when it last changed, behind a search. Names are no longer cut off.
- Opening one gives its editor the full width of the screen, so the property, rule and comparison tables have room. “← Document types” (or Schemas, Mappings, Matching) leads back, as does the browser’s back button, and either asks first if you have changes you have not saved. A link or a reload opens the same editor, including one for a new item not yet saved.
- Delete is under the ⋯ button in the editor’s header, in red, and is still confirmed. For a document type the question names the workflows and mappings that still use it. The grey ⊗ it replaces looked like a button that closes the editor.
- Descriptions have room to be read: every editor gives them a field of two lines, where the mapping editor cut them off at one.
- Workflows says Configuration on the Designer tab, which configures, and Work on the tab that tracks work.
Failures you can see from the rail, and fix with one button
- The rail says where attention is needed. The Integrations icon carries a count of deliveries that need attention — dead-lettered deliveries and failed ones the system is no longer retrying — for the whole organisation, so an administrator, an integrator and an auditor all see the same number. The count updates as you move through the app, and it falls when the work is dealt with, not while the system is still retrying on its own.
- Failures are grouped by what went wrong. On the Webhooks page, choosing “Need attention” — or clicking the “Need attention” figure above the list — lists the failures by cause: “one target unreachable, 24 deliveries waiting”, each group naming the target, the cause (“No answer”, “Rejected (401)”, “Target error (502)”), the event and workflow step it was sent for, when it last failed, and the latest error message. A group opens to its deliveries, each with its own last error and its own Replay.
- Retry all sends every delivery in a group again as a new delivery with its original request — the same way a single Replay already worked. Vinctora says how many it replayed, and the group and the count update with them. Deliveries the system is already retrying on its own are left alone, so nothing is ever sent twice.
- A replayed delivery says so. The original delivery keeps its history and shows when it was replayed, and no longer offers Replay.
Fixes from the usability walk
- Completing a step from the History tab works, and looking at the history no longer throws away unsaved edits.
- “Release” is now “Give back” (German “Zurückgeben”), because “Freigeben” reads as approving the invoice.
- The history names changed fields by their labels; the document id moved from every list to the case’s Details.
- A published schema’s properties can no longer be added or removed on screen, and a document type offers “Publish” only when something changed.
- A lookup’s and a step data fetch’s settings are grouped as Request — what
is sent to the target — and Answer — how its reply is read — instead of
one long column, and a fetch’s parameter names a field’s type as “text” or
“amount” rather than
STRING. - The audit trail reads by name. Each entry names the document or
configuration item it is about, the workflow and step it happened in, and
who acted, with a translated description of what they did. A deleted target
is marked deleted. Lock events are hidden unless “Show locks” is on, the
filters are remembered in the browser, and “Same request” shows every entry
one action wrote. The audit API carries the same names and can leave actions
out with
excludeAction.
0.12.0 — 2026-11-29
A frame of its own
- A rail replaces the sidebar and the top bar. Four icons — Work, Configuration, Integrations, Administration — each name their pages in a flyout on hover or keyboard focus, and Escape closes it. The rail can be pinned wide with names, and the choice is remembered in the browser. Your stand-ins, notification settings, the interface language and signing out are in the account menu at the foot of the rail. On a narrow screen the rail is a bar along the bottom.
- One search over everything. Ctrl K, ⌘K, or
/outside a field opens a palette of pages, personal actions and your own open cases, each naming where it lives. - A case stays beside its queue. A case opened from the review queue shows your other open cases in a strip beside it, with “Queue · 2 of 8”; J and K move through them, and completing a step opens the next case (“Complete & next”). Handing over, escalating and returning for correction still go back to the queue.
- Create and edit beside the list. Targets, reference data lookups, step data fetches and event subscriptions open their form in a side sheet next to the list instead of below it.
- A new look, in Iolite with the chain-link mark, including the sign-in screen, which now has the same dark frame and light page as the application.
Less to read, fewer things to type
- Explanations wait behind an info mark. Field hints, section intros and page subtitles open from a mark beside their label; what you need every time — empty states, warnings that block saving — stays on the page.
- Every page names where it is with the same eyebrow and title as the navigation.
- Create forms open on request. Targets, lookups, fetches and subscriptions show their form from a “New …” button instead of keeping it open under the list.
- Choices instead of typing. A field restricted to a list of values is a select on the review form; the mapping preview picks the document from a select; a lookup’s answer is held for a chosen duration; and fields that took a comma-separated list take removable tags instead.
0.11.1 — 2026-11-27
- A deployment reports itself healthy again. The application’s container checked its own health with a tool the new Java 25 image no longer includes, so it was marked unhealthy while working normally, and an installation that waits for a healthy start stopped there. Nothing changes for users.
0.11.0 — 2026-11-27
The configuration editors explain themselves
- A work step is configured in a window of its own. “Configure step” opens the step’s whole configuration over the diagram: every part of it — who picks it up, routing and four eyes, deadline, matching, the fields it may change, its rules — with what each holds on the left, and the chosen part on the right. The panel beside the diagram keeps a one-line summary of each part.
- The palette shows what it adds. Each element carries the shape the
diagram draws for it, and an info mark beside the palette explains every
element in one line. A new element is added after the selected one and
connected to it, and gets a readable key such as
work-step-1. - A decision reads as the sentences it decides by. Selecting one lists its ways out in the order they are checked — “Net total greater than 1000 → Finance approval”, then “Otherwise” — and they are reordered right there. Selecting a split or a join highlights the gateway it is paired with.
- A document type reads as its fields. Each property shows its display label, its technical name, what it holds and its description, and is changed only on request; properties can be moved up and down. Required, Identification and Extracted are explained once, in their column headers, so the table fits its panel. Save and Publish stay in reach while scrolling.
- The review screen keeps the promises of the previous release. Match values are shown to the scale their property declares, the editable line table no longer cuts values off, and a locked table offers no remove control.
Mapping rules are built by choosing fields
- Every field a rule reads or writes is chosen from the two schemas the mapping is bound to, grouped into single values and the items of each list. No path is typed any more. The parts of a join, the operands of a calculation, a condition’s branches and the confidence source are chosen the same way.
- A rule says what it does with a list. When the field read sits in a list, the rule asks which items to read — every item, only the first, or the item whose field holds a given value — and says in a sentence what will be written where. “For each” is no longer a separate operation: a copy of every item into a list repeats per item by itself.
- Fixed values are entered as the target field holds them: plain text without quotes, yes or no, a date. Date formats are chosen from the usual patterns, with any other still possible.
- A mapping reads as one line per rule. Each rule shows what it reads, what it writes and what happens on the way, and opens on a click for editing; a new rule starts open. A rule still missing a field is marked.
- Every operation is explained by an info mark beside “Operation”, one line each, and so are Conversion, Confidence from and Fallback.
- “Copy fields with the same name” adds a rule for every target field that has exactly one source field of the same name.
- A rule saved earlier with a path the choices cannot express keeps it unchanged and shows it as written by hand.
Try an approval limit against closed cases
- “Try against closed cases” now also runs the draft’s assignment rules. Lower an approval limit, save the draft and press the button: Saphir says, for every step the closed cases entered, whose work would have been offered to other groups, which groups and by which rule, and which documents they are. Each step is judged against the document as it stood when the case entered it.
- What counts is who, not which rule. A renamed rule that offers the work to the same groups changes nothing. The groups a case’s work went to are the ones the rules chose at the time, not any a person reassigned or escalated it to later.
- A case is followed to the first point where either its route or its groups would differ, and no further: what other people would have done with it never happened.
- Integrators: the result of
POST /workflows/{workflowVersionId}/replayhas a newassignmentDivergenceslist besidedivergences, each entry withtakenGroups,proposedGroupsand, where a rule chose them,takenRuleKeyandproposedRuleKey.divergednow counts both kinds, each case once.notJudgedReasonscan carry the new reasonASSIGNMENT_NOT_RECONSTRUCTABLE, andunvisitedNodesnow also names steps with assignment rules that no closed case entered.
Smoother editing of mappings, workflows, document types and cases
- A new mapping version keeps every rule’s settings. Date and number formats, fallbacks, code tables and confidence sources were left out when a new version was started, so publishing it could break an import whose rules nobody had changed. Check a mapping version created before this release against its published predecessor before publishing it.
- A value in the wrong format is said under its field, as soon as the field is left, and a refused value is marked there too, instead of a message at the top of the page on save.
- After completing a step, the review queue says where the case went.
- Workflow steps can have names with spaces again, and the designer says which draft is in the way when a document type already has one.
- Mapping rules are laid out as cards again, each reading source to target, and the rest of the run’s findings are smaller corrections.
- Integrators: a refused document value now carries
propertyandreasonbeside the message;DocumentTypePropertycarries the property type’spattern; refusing a second workflow draft carriesexistingDraftId.
0.10.0 — 2026-10-28
Try a workflow change against closed cases
- Before publishing a workflow change, try it against the cases that have already finished. In the workflow designer, save the draft and press “Try against closed cases” under the canvas. Saphir runs the draft’s decisions over the workflow’s completed cases, up to the most recent 1,000, each against the document as it stood when the case was routed, and says how many would have gone differently, where they would have split off, and which documents they are. Nothing is changed by trying.
- A case is followed to the first decision where it would have gone differently, and no further: what people would have done on the other branch never happened.
- Cases the history cannot answer for are counted, not guessed, with the reason: the document is gone, the draft no longer has the decision, or a condition reads a matching result that was not kept. A decision the draft adds, which no closed case passed, is named, because its effect cannot show in the figures.
- Integrators:
POST /workflows/{workflowVersionId}/replaytakes an optional period (completedFrom,completedTo) andlimit(at most 1,000). It needs theconfiguration:writescope, and it examines only cases on documents the caller may read, counts included. A period that ends before it begins is refused withWORKFLOW_REPLAY_INVALID, a version that would not pass publication withWORKFLOW_GRAPH_INVALID.
0.9.0 — 2026-10-25
The field figures for one supplier
- Analytics, “Fields”, can now be narrowed to one supplier. In an opened field’s “By sender” panel, click a supplier: the whole page, every field with its weeks, steps and figures by confidence, is counted over that supplier’s documents only. It shows what the engine’s confidence is worth for that one layout, and which other fields go wrong for it, where a rate over all suppliers blamed the engine for everybody.
- The chosen supplier is named twice: beside the mapping and workflow pickers, and under the panel it was chosen in, each with a way back to all suppliers. The panel keeps listing the others, so the next supplier is one click away. “Sender unknown” can be chosen the same way.
- The page keeps its place. Choosing or removing a supplier no longer collapses the open row while the new figures load, so the panel stays where it was.
- The rule between the listed senders and the summed lines is now drawn across the whole table, and the same in the table by confidence.
- A document’s history says “für” in German where it said “for” when one person acted for another.
- Integrators: the fields, weeks, steps and confidence operations under
/analytics/document-types/{documentTypeId}/fieldstakesenderorwithoutSender=true, refused together withANALYTICS_FILTER_INVALID. The senders operation does not take them.
0.8.0 — 2026-10-24
Which suppliers the extraction reads badly
- A document type can name the field that says who sent a document, such as the supplier number. In the document type editor, under the properties, choose it under “Sender is identified by” and press Apply. It takes effect at once and publishes no new version, so workflows and mappings built on the current version keep working.
- A field’s row on Analytics, “Fields”, now shows its corrections by sender. Under the figures by confidence, every supplier with a corrected document is listed, the most corrected first, with its correction rate; the others are summed into one line. One supplier whose layout the engine reads wrong no longer hides in a rate over all suppliers.
- Senders are grouped by their exact text. Choose a number or a tax ID rather than a name, or two spellings of one supplier count as two.
- A document counts under its sender as it stood when it was finalized, so a supplier number the engine misread and a reviewer corrected counts under the right supplier. Documents finalized before a sender field was named count as “Sender unknown”.
- A deleted document’s sender is not kept. Its figures stay, as “Sender unknown”, because a sender can be a person.
- Integrators:
PUT /document-types/{documentTypeId}/sender-fieldsets or clears the sender field, whichDocumentTypenow carries assenderField. The new operationGET /analytics/document-types/{documentTypeId}/fields/senderstakesfieldPath, the period and the same filters as the weeks operation.
0.7.0 — 2026-10-22
Whether the extraction engine’s confidence meant anything
- A field’s row on Analytics, “Fields”, now shows its correction rate by the score the engine sent. Under where the field was corrected, the documents are grouped into four fixed ranges — 95 % and above, 80 % to 95 %, 50 % to 80 %, below 50 % — each with its correction rate. A rate that does not fall as the score rises means the score does not predict corrections. A field filled in several rows of a group is placed by its lowest row’s score.
- A score the engine stopped sending is visible at a glance. When the document type says an engine scores a field and imports arrived without a score, the field’s name in the table says in how many documents, and the opened row has a “Score missing” line.
- The mapping and workflow filters apply as they do to the row, so two extraction engines can be compared side by side.
- Integrators: the new operation
GET /analytics/document-types/{documentTypeId}/fields/confidencetakesfieldPath, the period and the same filters as the weeks operation, and lists every range, highest first, with its bounds. Each field inGET /analytics/document-types/{documentTypeId}/fieldscarriesconfidenceNotReported. - Documents imported before this version have no score on record. They count under “No score”.
0.6.0 — 2026-10-18
In which workflow step a field was corrected
- A field’s row on Analytics, “Fields”, now shows where it was corrected. Under the field’s weeks, each workflow lists its steps in the order a case reaches them, and says for each in how many of the field’s corrected documents it was corrected there. A correction low in that list is one the earlier steps let through, and this is where that becomes visible. Corrections made outside a workflow get a line of their own when there are any. A document corrected at two steps counts at both, so the lines can add up to more than the field’s corrected count.
- The mapping and workflow filters apply as they do to the row. With a workflow chosen, the steps of every workflow those documents ran through are still listed.
- Integrators: the new operation
GET /analytics/document-types/{documentTypeId}/fields/stepstakesfieldPath, the period and the same filters as the weeks operation. Its steps come grouped by workflow and in workflow order, as the page shows them. - Corrections recorded before this version have no step. They still count as corrected and appear in no line.
0.5.0 — 2026-10-15
A document’s history is stored in a new shape
- Nothing a reader or an integrator sees changes. A document’s history, its revisions, the matching evidence a decision kept and the events Saphir publishes read exactly as before.
- A database created by an earlier version has to be recreated, because
the migrations that set up the history were rewritten rather than extended.
No customer installation exists. On the test server, run
test-server/run-test-server.sh reset.
0.4.0 — 2026-10-15
A workflow step event carries the document’s values
WORKFLOW_STEP_COMPLETEDandWORKFLOW_STEP_SENT_BACKcarry the document’s content, undercontent, beside the step’s fields. It is the content the step was decided on, and the newdocumentRevisionfield names the revision it comes from. A system that posts an invoice when one step is approved subscribes toWORKFLOW_STEP_COMPLETEDfor that workflow and step, and its outbound mapping now finds the invoice’s fields.- An outbound mapping reads the document’s content and nothing else, on
every subscription. That now includes synchronous subscriptions to
BEFORE_DOCUMENT_CREATEandBEFORE_DOCUMENT_UPDATE: their mapping reads the content about to be written, and rules that read$.content.…,$.documentId,$.expectedVersionor$.phasehave to be rewritten to name the document’s fields directly. Without a mapping, such a subscription still sends the whole envelope. - An outbound mapping is refused on an event that carries no document. A subscription to such an event can no longer name one, and a feed consumer with a mapping must list its events, all of them events that carry the document. The subscription and feed consumer forms offer the mapping only where it can be used.
0.3.0 — 2026-10-14
Document events carry the document’s values
DOCUMENT_UPDATEDandDOCUMENT_FINALIZEDcarry the document’s content. Their payload is the document’s header withcontentbeside it, the shapeDOCUMENT_CREATEDalready sends andGET /documents/{documentId}/contentanswers. The header fields are where they were. A system that wants the checked values subscribes toDOCUMENT_FINALIZEDto receive them once, or toDOCUMENT_UPDATEDto receive every saved change.- An outbound mapping reads the document’s content. For a webhook
subscription to a fact and for a change feed consumer, the mapping’s rules
are run over the content and name the document’s fields, such as
$.invoiceNumber. Act on this if a mapping reads$.content.…fromDOCUMENT_CREATED: drop thecontent.prefix. The header is not available to a mapping, so an identifier the receiving system needs must be a field of the document. - Taking a document over is reported as
DOCUMENT_OWNER_CHANGED. It was reported asDOCUMENT_UPDATED. Act on this if a subscription relied onDOCUMENT_UPDATEDto hear of a new owner. The event can be chosen for a webhook subscription and for a change feed consumer, where it is listed as “Document taken over”. - The other document events are unchanged and carry the header alone.
0.2.0 — 2026-10-13
The field figures by sending system, by workflow and by week
- The field figures can be narrowed by mapping and by workflow. Two pickers above a document type’s table choose one mapping, or imports that named no mapping, and one workflow, or documents that ran through none. The mapping is what tells two sending systems apart: a mapping that is changed and published again stays the same source. A document that ran through two workflows counts under both.
- A field’s row opens to its figures week by week, for the same mapping and workflow, so a change to an extractor or a mapping can be checked a few weeks later. A document counts in the week it was finalized in.
- Integrators:
GET /analytics/document-types/{documentTypeId}/fieldstakesmappingKeyorwithoutMapping=true, andworkflowIdorwithoutWorkflow=true, and its response lists themappingsandworkflowsto choose from. Sending both parameters of a pair is refused with400and the codeANALYTICS_FILTER_INVALID. The new operationGET /analytics/document-types/{documentTypeId}/fields/weekstakesfieldPath, the period and the same filters. - An import recorded before this version names no mapping in the figures. It is counted under “without a mapping”.
0.1.0 — 2026-10-12
The first numbered version. It holds everything built up to this point.
Which fields the machine gets wrong
- The Analytics page has a new view, “Fields”. For a document type and a period it lists every field an import filled: in how many documents the value was proposed, and in how many of those a person kept it, corrected it, or was never offered it for editing. The correction rate counts only values a person could have changed, so a field nobody checks does not look reliable.
- A document counts once it is finalized, in the period it was finalized in, and only when an import created it. A document entered by hand is not counted. A column of a table counts once per document, however many rows were changed.
- Counting starts when this version is installed. A document imported before that has no proposal on record and is left out.
- Two new read operations, for administrators and for API keys with the
analytics:readscope:GET /analytics/document-typesandGET /analytics/document-types/{documentTypeId}/fields. - A revision records more about where it came from. The revision an import creates keeps the mapping it came through, and the revision of a completed workflow step keeps which fields that step let the person edit.
How each workflow is running, at a glance
- Administrators have a new Analytics page. Its overview lists every workflow with cases open now or in the chosen period: how many are open, how many started and finished, and how long a case takes from start to finish — the median, and the time nine in ten cases stay within.
- Each workflow has a tab of its own, always in the same layout: the same figures, cases started and finished per week, and the median and 90th percentile of the time to finish, per week. The period is the last 4, 12 or 52 full weeks, and the selected tab and period are part of the address, so a view can be sent to a colleague.
- Figures start counting when this version is installed. A case that was already open is counted when it finishes, without a time to finish. Weeks are ISO weeks in Europe/Berlin. No figure names or measures an individual person.
- A workflow’s tab shows where the time goes. A chart shows the work waiting at each step right now, by how long it has waited: under a day, one to three days, three to seven days, and longer. A table lists each step with its visits in the period, the median and 90th-percentile wait, how often it was sent back, how often it ended after its deadline, and how many visits had to be escalated. It opens with the slowest step on top and sorts by any column.
- The send-back rate is a headline figure: of the cases finished in the period, the share that were sent back at least once.
- Every rate is shown with the numbers it comes from, as “17 % · 1 of 6”, and is greyed out when it comes from fewer than twenty. A step without deadlines shows no late rate rather than 0 %.
- Each step links to its late work in the review queue. The queue narrows by one workflow version; where a step’s open work is spread over several versions, the row says how much is not in the linked list. The review queue now keeps the step it is narrowed to in the address, so that view can be sent to a colleague too.
- Step figures start counting when this version is installed. Work that was already waiting at a step is counted when it ends, without a wait time, and is not in the open-work chart.
- Workflow step events name the workflow. The events
WORKFLOW_STEP_ENTERED,WORKFLOW_STEP_COMPLETED,WORKFLOW_STEP_SENT_BACK,WORKFLOW_WORK_ITEM_ASSIGNEDandWORKFLOW_WORK_ITEM_ESCALATEDcarry a new fieldworkflowId, the workflow across all its versions, besideworkflowDefinitionId, which is one version. The completed and sent-back events also carryfinishedLate:truewhen the step ended after its deadline or was escalated,falsewhen it ended inside it, andnullwhen the step has no deadline. No field was removed or renamed. - New endpoints:
GET /api/v1/analytics/workflowsandGET /api/v1/analytics/workflows/{workflowId}, both taking an optionalfromandtodate of at most 53 weeks. Administrators may call them, and an API key with the new scopeanalytics:read. Each workflow’s summary carriessendBack, and the second endpoint answersopenWorkandstepsas well. - A workflow starting and finishing can be sent to an external system.
Integration subscriptions and the change feed offer two new events,
WORKFLOW_INSTANCE_STARTEDandWORKFLOW_INSTANCE_COMPLETED, listed with the workflow events as “Workflow started” and “Workflow finished”. Each names the document, the case and the workflow with its name. They report a whole case and happen at no step, so a subscription to them cannot be limited to a workflow step; a receiver that wants one workflow’s cases filters onworkflowId.
Every decision keeps the matching evidence it was taken on
- When somebody completes or sends back a workflow step on a matched document, Saphir keeps the matching evidence as it stood at that moment: every row each side of the match read, when it was read and what caused the read, the verdicts and the warnings. The live match goes on changing as the order and receipt are read again; the kept copy never does.
- In a document’s history, each such decision offers “Evidence at this decision”, which shows that copy read-only. The match above a document’s fields says when the last decision was taken on evidence that has been read again since, and opens that decision’s copy.
- The copy is Saphir’s evidence at the moment the action arrived. If the evidence was read again in the background while the page was open, it can differ slightly from what was on screen.
- API:
GET /api/v1/documents/{documentId}/revisions/{revisionNumber}/matchingreturns a decision’s kept evidence, or 404 withDOCUMENT_REVISION_MATCHING_NOT_FOUNDfor a revision that kept none. A revision now carrieshasMatchingEvidence, andGET /api/v1/documents/{documentId}/matchingcarrieslastDecisionwithrevisionNumber,actorSubject,occurredAtandreadAgainSince. - Decisions taken before this release kept no evidence.
A save no longer depends on a lookup the save did not touch
- A field that reads its values from a lookup is checked against the source system only when the write puts a new value into it. Correcting another field of the document, approving it, or deleting, adding or reordering line items no longer asks the source system about values the document already holds, so an outage there no longer refuses those saves. A value counts as already held when the document has it in the same field, or in the same column of any line of the same table.
- Creating or importing a document still checks every such value, and a new value that the source system does not list, or that cannot be checked because the source system is unreachable, is still refused as before.
ZUGFeRD and Factur-X invoices
- A ZUGFeRD or Factur-X PDF has endpoints of its own, beside the XML
ones:
POST /api/v1/e-invoices/hybrid/import,/hybrid/inspect,/hybrid/normalizeand/hybrid/render. Saphir finds the invoice data inside the PDF by its content and reads it exactly as it reads a stand-alone XML file. Each family refuses the other kind of file with 415 (EINVOICE_XML_EXPECTED,EINVOICE_PDF_EXPECTED). Supported: Factur-X / ZUGFeRD EN 16931, BASIC and EXTENDED, and XRechnung 3.0 inside a ZUGFeRD PDF. MINIMUM, BASIC WL and ZUGFeRD 1.0 are refused with the reason in the report. - EN 16931, BASIC and EXTENDED are also accepted as stand-alone XML, validated against the schemas of the Factur-X 1.09.2 / ZUGFeRD 2.5.2 publication.
- EXTENDED invoices with sub-invoice lines import with the right line
total. The common invoice’s
linesholds only the top-level lines, which add up to the invoice’s line total; the lines grouped under them arrive in a newsubLineslist, each withparentIdentifierandstatus(DETAIL,GROUPorINFORMATION). Existing mappings overlinesneed no change. A file whose sub-lines name a missing or ambiguous parent, or form a loop, is refused with the findingLINE_HIERARCHY_BROKEN. The drawn PDF shows each sub-line indented under its parent. - Structured early-payment discounts are read. An EXTENDED invoice’s
discount terms fill
paymentTerms.skontolike the#SKONTO#text convention does, with the new fieldsdueDate(the discount’s last day),basisDateandamountbesidedays,percentandbaseAmount; an entry hasdays,dueDateor both.paymentTerms.dueDateis always the invoice’s own due date, never the last day of a discount. An organization that installed the common e-invoice structure before these fields existed keeps importing as before; its mapping editor does not offer them, and Integrations → E-invoices says so. - An imported hybrid invoice keeps three files: the PDF as the supplier
sent it, the invoice data taken out of it (new attachment kind
EXTRACTED), and a PDF Saphir draws from that data. The invoice data is the binding part of a hybrid invoice and every mapped field comes from it, so the drawn PDF is shown beside the form by default. The answer names all three, andreviewCopyAttachmentIdsays which one is shown. - Administrators and configurators choose which PDF reviewers see first
under Integrations → E-invoices → Settings, or with
PUT /api/v1/e-invoices/settings(hybridReviewCopy:GENERATEDorSUPPLIED). The change is audited and applies to invoices imported afterwards. - Send every PDF invoice; Saphir tells you which ones are not e-invoices.
A readable PDF with no invoice data inside is refused with 422
EINVOICE_NO_EMBEDDED_INVOICE, so your capture process can route it to OCR. An encrypted or damaged PDF, or one carrying two invoices, is refused withEINVOICE_NOT_IMPORTABLE. - The hybrid report says what was checked about the PDF in a
pdfobject beside the unchanged XML report: whether it held exactly one invoice, the invoice data found inside, andpdfA, which is alwaysSKIPPED— Saphir does not check PDF/A conformance, nor whether the PDF’s pages show the same values as the invoice data. A document’s stored report (GET /documents/{id}/e-invoice-report) says which kind it was insourceKind.
XML invoices straight into review
POST /api/v1/e-invoices/importtakes an XRechnung and creates the document in one call: it checks the file, reads it into the common invoice structure, maps it with the mapping you name into the document type you name, draws a PDF for the reviewer and starts the workflow. The XML is stored as the document’s original, the PDF as the copy shown beside the form, and the inspection report beside them — all of it or none of it. Requiresdocuments:write, as importing a document does.- A readable invoice with schema findings is still imported, with the
findings shown. A file that cannot be read into an invoice is refused with
422
EINVOICE_NOT_IMPORTABLEand the reports, and nothing is created. A mapping that does not read the common e-invoice structure is refused with 400EINVOICE_MAPPING_SOURCE_MISMATCH, and one that declares no source at all with 400EINVOICE_MAPPING_SOURCE_UNDECLARED. - Sending the same invoice again returns the existing document and stores
nothing. When no name is given, the document is named after the invoice
number and the seller.
dryRuntries the import without storing;includePdf=falseleaves the PDF out. - Every import now says what it did in one field,
outcome:imported,duplicateordryRun, the same words a batch item’sstatususes. It is on the answer ofPOST /documents/importand insideimportedon the e-invoice import.dryRunandduplicateare still there. A name read throughnamePointerthat is longer than 255 characters is now shortened instead of failing the import. - Integrations → E-invoices → Import into review does the same by hand, with the starter invoice type and mapping chosen for you when they are the only ones.
- A document imported this way shows an Original invoice validation
section: what Saphir found in the XML when it arrived. Correcting the
fields changes neither the original nor the report. The report is also at
GET /api/v1/documents/{documentId}/e-invoice-report, for whoever may read the document, and is kept as long as the document’s files.
Files stored with a document
- Every document has an Attachments section below its fields, listing each file stored with it: its name, what kind of file it is, its size, who added it and when, with a download. The review copy — the PDF every reviewer compares the form against — is one of them, marked as such.
- A reviewer can add a file to the document they are working on — a
delivery note, a photo, an e-mail. Whoever may edit the document’s fields at
that moment may add one; an administrator or configurator may add one to any
draft or finalized document. Accepted are PDF, XML, PNG, JPEG, text, CSV and
e-mail (
.eml) files of up to 10 MB, and up to 25 files per document. - Any PDF of a document can be opened beside the form. When there is more than one, the viewer offers a choice; picking a file shows it to you alone and says it is not the review copy. An administrator or configurator can make the PDF on screen the review copy for everybody.
- Replacing the PDF in the viewer keeps the previous one. It stays in the list.
- Files supplied with a document stay. A PDF staged for an import is stored as the document’s original and cannot be removed; a file added as supporting evidence can be removed by whoever added it, or by an administrator or configurator, as long as it is not the review copy. PDFs stored before this release are kept, marked as earlier uploads.
- Adding, removing and changing the review copy is recorded in the audit trail, with the file’s name and SHA-256.
- New endpoints:
GETandPOST /api/v1/documents/{documentId}/attachments,GET …/attachments/{attachmentId}/content,DELETE …/attachments/{attachmentId}andPUT …/attachments/{attachmentId}/review.GETandPUT /documents/{documentId}/pdf,hasPdfandpdfUploadIdkeep working against the file in the viewer;PUT /pdfnow adds a file rather than overwriting one. API version 1.2.0. - New configuration:
app.limits.max-attachment-bytes(10 MiB) andapp.limits.max-attachments-per-document(25). The retention period for an archived or deleted document’s files isapp.retention.archived-attachment-days(see the renamed settings below).
Several files with one import
- An import can bring any number of files with the document it creates,
not only one PDF — an e-invoice’s XML original together with a PDF drawn from
it, for instance. Each file is staged first with
POST /api/v1/documents/import/attachments, stating whether it is an original (SOURCE), produced from another staged file (GENERATED, naming that file) or supporting evidence (SUPPORTING). The import lists them inattachmentUploadIdsand names the PDF for the viewer inreviewCopyUploadId; the document is created with all of its files or not at all. The answer lists each stored file beside the upload it came from. - A generated file says what it was made from. The document’s Attachments section shows Generated from and the source file’s name.
- Integrations → Import takes any accepted file as an original, not only a PDF. A PDF is shown beside the form; an XML is stored with the document.
- The same file can go with several documents — two invoices against one order confirmation — by staging it once for each.
- Breaking:
POST /api/v1/documents/import/pdf, the import’spdfUploadIdandIMPORT_PDF_UPLOAD_NOT_FOUNDare gone. Stage the PDF withkind=SOURCEand list it inattachmentUploadIds, naming it inreviewCopyUploadId. The attachment kindUNRECORDEDis gone too: files stored with it are nowSOURCE. New refusals:IMPORT_ATTACHMENT_REFUSED(400, with areason) andIMPORT_ATTACHMENT_UPLOAD_NOT_FOUND(404). - Renamed settings, since both now cover every file type, not only PDFs:
app.retention.staged-import-pdf-hoursis nowapp.retention.staged-import-attachment-hours(default 24, maximum 168), andapp.retention.archived-pdf-daysis nowapp.retention.archived-attachment-days(default 365), with its environment variableARCHIVED_PDF_RETENTION_DAYSnowARCHIVED_ATTACHMENT_RETENTION_DAYS.
An XML invoice as a PDF a person can read
- Integrations → E-invoices → Show as PDF draws a supported XRechnung, in UBL or CII, as an A4 PDF in German or English, with a preview on the page and a download named after the invoice number. Nothing is stored or imported.
- The PDF shows what the sender wrote. Amounts keep exactly the decimals they were sent with, in the separators of the chosen language; no total is calculated or corrected, and a field the invoice leaves out has no row. Every page says that the PDF was generated from an XML invoice, is not the original and is not a validation result, and carries the SHA-256 of the file it came from.
- What the PDF does not show, it lists. Content the common invoice structure has no field for is counted on the first page and listed by path on the last.
- A file that cannot be read into an invoice is not drawn. The screen shows the inspection report instead; a schema-invalid file that can still be read is drawn.
POST /api/v1/e-invoices/rendertakes the XML as multipartfileand an optionallanguage(deoren, defaulten) and answersapplication/pdf. A file that cannot be read is refused with 422EINVOICE_NOT_RENDERABLE, carrying the inspection and normalization reports; an unsupported language with 400EINVOICE_LANGUAGE_UNSUPPORTED. API keys need the new scopee-invoices:render. The limits are those of inspect.
Configuration templates, and a ready-made invoice type
- Document types → Create from template offers configuration Saphir ships and applies it in one step. The first template creates an invoice document type — invoice number, dates, seller and buyer, the four totals, payment terms with Skonto, and a table of invoice lines — and a published mapping into it from the common e-invoice structure, so an XRechnung in UBL or CII lands in the same fields. The texts are written in the language the application is used in, English or German; field names are the same in both.
- What a template creates is yours. It is ordinary configuration from the moment it exists, changed in the usual editors, and nothing links it back to the template. Applying the template again creates a second document type and mapping beside the first, with a number added to the name.
- No workflow is created. Attach one before importing documents into the new type.
- The e-invoice source schema must be installed first, on Integrations → E-invoices; the dialog links to it.
- New endpoints:
GET /document-type-templates,GET /document-type-templates/{templateKey}andPOST /document-type-templates/{templateKey}/apply, each taking alocaleofenorde. Applying needs bothconfiguration:writeandmappings:writefor an API key. - Names are no longer unique. Two property types, or two document types, may now have the same name; the id identifies them. Inside one document type a field name is still unique, because it is the field’s key in the document, and two names that differ only in case count as the same.
Errors in the standard problem-details format
- Every error response is now an RFC 9457 problem, sent as
application/problem+json. HTTP client libraries that understand problem details read it without Saphir-specific code. The members aretype,title,status,detailandinstance, plus Saphir’scode,traceIdand, for a rejected request,errors. - Renamed members.
messageis nowdetail,httpStatusisstatus, andpathisinstance.timestampis gone; the response’sDateheader carries the same moment. The schema isProblemin the published contract, replacingSaphirError. - Values that belonged to one refusal moved to the top level. They used to
sit under
details; a version conflict now carriesexpectedVersionandactualVersiondirectly. A lifecycle refusal’sstatusvalue is nowdocumentStatus, so it cannot be mistaken for the HTTP status. - Rejected inputs are listed under
errors, each naming the input bypointer(a JSON Pointer into the request body, such as#/items/3/documentTypeId),parameterorheader, with adetail. This replacesdetails.fieldsand itsfieldandissue. - Errors raised before a request reaches Saphir’s own logic have codes of
their own:
REQUEST_MALFORMED,AUTHENTICATION_REQUIRED,API_KEY_INVALID,ACCESS_DENIED,ROUTE_NOT_FOUND,CONCURRENT_MODIFICATION,REQUEST_TOO_LARGE,MEDIA_TYPE_UNSUPPORTED,REQUEST_REJECTEDandINTERNAL_ERROR. They replace the HTTP status names (BAD_REQUEST,UNAUTHORIZED,NOT_FOUNDand so on) these responses used as codes. Every other code is unchanged. - A failed PDF download answers with its real status. A request for a document’s PDF that fails is answered with the actual error, such as 404, as a problem, rather than with 406 because the error could not be written as a PDF.
Checking an e-invoice before anybody relies on it
- A new screen inspects an electronic invoice’s XML. Integrations → E-invoices takes one XML file, identifies what it is, and reports whether its structure holds. Nothing is imported, stored or sent: the file is read, the report is returned, and the file is forgotten. Administrators, configurators and integrators can use it.
- The same report is available to an integration, at
POST /api/v1/e-invoices/inspect— one multipart field,file, with the machine capabilitye-invoices:inspect. It answers 200 with a report for anything it could read, including invalid and unsupported XML, so a sending system can ask “will Saphir take this?” without treating the answer as an error. - The report says which checks ran, not only whether the file passed. Safe parsing, format identification, XML schema validation and business rules each carry their own result, and a check that did not run says so rather than staying silent. Business rules are not run in this release, and every report states it: a valid result means the XML satisfies its schema, and is not a statement that the invoice satisfies EN 16931 or is arithmetically correct.
- XRechnung 3.0 CIUS is what is read — in UBL 2.1 Invoice and CreditNote, and in UN/CEFACT CII D16B. Other formats and profiles, including the KoSIT extension and CVD profiles, are reported as unsupported rather than guessed at. The report names the schema bundle it used, so a verdict can be traced to the grammars that produced it.
- Findings carry a stable code, a severity and, where the parser knew one, a line and column in the submitted file. At most 100 are reported, and the report says when there were more.
- Limits worth knowing before wiring it up. A file may be up to 10 MiB; requests over that are refused with 413. Four inspections run at once and one may take up to five seconds — beyond either, the answer is 503, which means “ask again” and never that the invoice is invalid. A file that exceeds the structural limits (128 levels deep, 100,000 elements, 128 attributes on one element) is reported invalid with a finding that says so.
- Nothing in a submitted file is trusted to point outwards. Document type declarations are refused, external entities are not resolved, and a schema location named inside the file is ignored in favour of the bundled schemas.
Reading an e-invoice into fields a mapping can use
- The same screen now reads an invoice into Saphir’s own structure. Integrations → E-invoices gains a second action beside Inspect: it converts a supported invoice into one common set of fields — parties, dates, totals, the VAT breakdown, payment terms and the lines — and shows the result. As with an inspection, nothing is imported, stored or sent.
- One structure covers both supported syntaxes. An invoice sent as UBL and
the same invoice sent as CII produce the same fields, so a mapping built once
works for suppliers using either. The structure carries a version,
saphir.einvoice.invoice/1, in every response. - Install it as a source schema, and mappings can point at it. The screen lists every field with the path a mapping rule addresses it by and the EN 16931 business term it carries, and an administrator or configurator can publish it into their organization with one button. It is installed once; a second press returns the schema that already exists.
- Values arrive exactly as the sender wrote them. Amounts and quantities are
carried as text, so
336.90does not become336.9. Nothing is recalculated — a total that disagrees with its own lines arrives as supplied — and a field the sender omitted stays absent rather than becoming zero. - The conversion says what it did not carry. Where an invoice holds content the common structure has no field for, the response names the place in the file it was found, so a partial conversion is never presented as a complete one. At most 50 such notes are reported, and the response says when there were more.
- Early-payment discounts are read out of the payment terms. German invoices
write Skonto into the payment terms text as
#SKONTO#TAGE=14#PROZENT=2.00#, because the European standard has no field for it. Those are decoded into days and a percentage a mapping can use, and the whole original text is kept beside them. A block that cannot be read produces a note and no entry rather than a half-read discount. - An invoice that fails schema validation is still read. Its findings are reported and the fields are produced anyway, because an invoice missing a required element is exactly the case a reviewer exists to correct.
- New configuration for uploads. A multipart upload is bounded by
spring.servlet.multipart.max-file-size(11 MB),max-request-size(12 MB) andfile-size-threshold(11 MB), each with an environment override. The first two must stay above the 10 MiB an e-invoice operation accepts, so that the endpoint’s own refusal — which names the limit — is the one a caller meets. The third keeps an accepted upload in memory rather than in the servlet temp directory. - New endpoints.
POST /api/v1/e-invoices/normalizetakes one multipartfileand returns the inspection report, the converted invoice and the conversion’s own findings; it needs the machine capabilitye-invoices:normalize, which is separate frome-invoices:inspectbecause it returns the invoice’s business content rather than only a verdict.GETandPOST /api/v1/e-invoices/source-schemadescribe and install the structure. Reading needsschemas:read— an integrator writing a connector can see the fields — and installing needsconfiguration:write. The same limits as inspection apply: 10 MiB, four at a time, five seconds each. An invoice carrying more than 4 Mi characters of text is more than the conversion holds; it reports that and produces no fields, and the structural report beside it still applies. - Install a schema under a key you choose, once.
POST /api/v1/schemas/by-key/{key}creates and publishes a schema under that key and answers201; asked again, it answers200with the schema already there and changes nothing, so a connector can install the structure it sends without checking first.GET /api/v1/schemas/by-key/{key}reads it back, or answers404withSCHEMA_KEY_NOT_FOUND. Creating needsconfiguration:write, readingschemas:read. A schema published under a key beginning withsaphir.cannot be retired.
Signing in looks like the product being signed in to
- The sign-in page carries Saphir’s own design. The form the identity provider draws when a user signs in — and every page around it, the account lockout notice after too many wrong attempts and the forced password change included — now carries the application’s own layout, colours and type.
- The application no longer has a sign-in screen of its own. Arriving without a session hands the browser straight to the identity provider, whose page now looks like the product; the separate screen and its button are gone.
- Username and password are asked for on one page. A user who belongs to one organization signs in on the stock single form; a user who belongs to several picks theirs on the next page.
- The sign-in page speaks the same two languages as the application. The identity provider serves English and German, and the application tells it which one a user is working in, so a reviewer in the German interface is handed a German sign-in page.
- Nothing to configure. The theme ships inside the Keycloak image and is named in the realm; a deployment that updates both receives it without a further step.
Checking an invoice against what was ordered and received
- A workflow step can now read an invoice’s purchase-order and goods-receipt lines out of your ERP and compare them against the invoice. The step names a published matching definition; when a case reaches that step, Saphir calls the configured targets, pairs the fetched rows with the invoice’s lines, applies the tolerances you configured, and records a verdict for each line and for the document. The reviewer sees all of it in a panel under the invoice’s fields.
- Nothing about matching ever blocks the work. A target that will not answer, an order Saphir cannot find, a line nothing pairs with: each is reported and none refuses a document. A person can always work the case and move it on.
- The goods-receipt side is optional. A customer whose ERP cannot serve
line-level receipt data configures only the purchase-order side. Saphir then
performs a two-way match, reports the document as
incomplete, and raises amissing_legwarning saying so — it does not report a three-way match it did not perform. - Two rows carrying one identifier are shown, not resolved. Both are kept,
both are marked, and every invoice line they would pair with is reported as
ambiguousuntil a person decides. The panel names the column the pairing is configured on and how many rows share a value, which is what tells a configuration mistake apart from real business data.
New for an operator configuring this
- A published schema may declare a
tablefacet — typed columns and one designated id column — which is the row shape an ERP’s answer is mapped into. It appears onPOST /schemas,PUT /schemas/{schemaId}and the schema response astable. A table schema’s root must be an object of scalar columns; anything else is refused when the schema is saved. - A step data fetch is a new kind of integration configuration, at
/integration/fetches. It reads rows from an existing target — sharing that target’s endpoint, credential, timeout and activation state — and maps them into a table schema. Its request-template placeholders are filled from the document’s own properties, which is what lets it run with nobody at the keyboard.modeisfillfor a step’s own read, orsuggestfor a picker a person chooses from atPOST /integration/fetches/{id}/rows. - Every fetch run is recorded, at
GET /integration/fetches/{id}/runs: what caused it, who asked, the values sent, the text searched for, how many rows came back, how many shared an identifier, and what went wrong. This is where a repeated outage is told apart from a repeated correction. - A matching definition is configured at
/matching/definitions. It names the document type it matches for, the repeating group holding the invoice’s lines, the property each line is paired by, one or two legs, and the column pairs to compare with their tolerances. The two tolerances on a pair — a relative percent and an absolute amount — are an or: a variance inside either is within tolerance. Definitions are drafted, published and superseded like mapping definitions; a published version is immutable. - A workflow step gains an optional
matchingnaming a published matching definition and its version. Publication refuses a step naming one that is not published, that names a different version, or that was written against a different document type version than the workflow governs. - A workflow predicate gains an optional
subject,content(the default, and what every existing predicate means) ormatching. UndermatchingthefieldPathaddresses the verdict:documentVerdict,lines[*].verdict,warnings[*].kind,legs[*].roleorlegs[*].fetched. A path outside that list is refused when the workflow is published. - A document property type gains an optional
fetchId, valid on STRING properties and never set together withlookupId. It offers values from asuggestfetch’s rows; unlike a lookup it does not constrain what may be stored, because the candidates depend on what the document already says.
New for a reviewer or an integrator reading a document
GET /documents/{documentId}/matchinganswers with the document header, the rows fetched for each leg with the time each was read, the verdict per line and per document, and the warnings. A document nothing has matched answers with an empty record rather than a 404.POST /documents/{documentId}/matching/refreshreads the evidence again — the reviewer’s retry, and what the picker triggers after a selection. It answers 202 without waiting, because the call reaches your ERP. PasspickerSelection=truewhen a selection caused it. A document nothing has ever matched answers 409: there is no definition to re-run.- Matching follows saved corrections. Typed and selected reference values
stay in the form until saved. The application then reads matching again.
Comparisons identify their
lineGroupPathanddocumentVersion; a verdict computed for an older document version reads asincompleteuntil refreshed. - The matching record is never document content. It is not diffed into the revision trail, not indexed for search, and never sent by an outbound delivery. A booking export ships what the business decided; this is the evidence the machine looked at on the way to deciding.
Verdicts
- Per line:
matched,within_tolerance,exceeded,unmatched,ambiguous. A line is judged against every leg that answered and takes the worst of them. - Per document:
in_order,tolerable,failed,incomplete, in that order of precedence. A line over tolerance makes the documentfailedeven when a leg is missing.incompletecovers a leg that is not configured, a fetch that did not answer, and lines that could not be paired.
Migrations
schema_schema.schemasgainstable_id_columnandtable_columns_json.integration_schemagainsintegration_fetches,integration_fetch_parametersandintegration_fetch_runs.mapping_schemagainsmatching_definitions,matching_legsandmatching_column_pairs.document_schema.documentsgainsmatching_json, empty for every existing document.document_schema.document_property_type_versionsgainsfetch_id.
Not in this release
- Configuration screens for table schemas, step data fetches, matching definitions and a step’s matching reference. All five are configured through the REST API for now; the reviewer’s panel and the picker are in the application.
- Adding several fetched rows together under one pairing key — partial deliveries spread across receipts. Duplicates are detected and shown; summing them is not.
- Cumulative matching against previously invoiced quantities, unit-of-measure conversion, currency variance and price-history reasoning.
- A history of fetched snapshots. The record keeps the latest, and the fetch run records say what happened.
How sure the machine was
- An import may now say how confident it was about each field it filled.
ImportDocumentRequesttakes an optionalconfidenceobject shaped like the document’s own content — a score from 0 to 1 where the content holds a value, and a row of scores where it holds a row of a property group. Omit it for payloads that do not come from an extraction engine. A property left out of the object carries no score, which is not the same as a score of zero. A score outside 0 to 1, and a name the document type does not declare as a property, are both refused rather than stored — on a dry run as well, so an engine can find out before the import that would be refused. - The scores are read as their own resource, at
GET /documents/{documentId}/confidencefor the document as it stands and atGET /documents/{documentId}/revisions/{revisionNumber}/confidencefor any point in its history. Both answer with the document header and the scores, so one request gives a caller the name and status beside them. - A score lives exactly as long as the value it describes. The import records them; every later revision keeps the ones whose values it did not change and drops the ones it did, so the scores always describe the values standing beside them and never a value a reviewer has corrected. A repeat import matching an existing document does not restate them.
- The review form marks the fields the engine was least sure of. Each scored field shows the percentage under the control, and the ones below the attention boundary are additionally labelled Check. Inside a table of repeating properties only the cells below that boundary are marked, so a scored table does not grow a line per row to say what needs no attention. The mark disappears as soon as the value is corrected, because the score no longer describes what is on screen. Nothing is decided on that number — it says where to look first, and every value still passes through the same review as before.
- A mapping rule can now read the score out of the sending system’s own
payload. A
COPYorFOR_EACHrule takes an optionalconfidenceSource, a JSONPath into the same payload as itssourceIdentifier, and the score it finds is written wherever that rule writes its value — rows included, one score per item. So an extraction engine sends its scores in its own words, beside its own values, and the mapping definition translates both. A rule that computes its value — a constant, a join, a calculation, a code translation or a condition — may not carry one, because nothing read that value off a page. The field is in the mapping editor beside the fallback, and the mapping trial returns the scores it produced underconfidence, so a mapping can be tried before anything is imported. - A document type can declare which fields an extraction engine fills.
confidenceExpectedon a field or on a group column, besiderequiredandidentification, and in the type editor as Extracted. It changes nothing about whether a document is accepted: an import that carries no score for a declared field is still imported, the response lists the field underconfidenceWarnings, and the review form marks it Not reported rather than saying nothing at all. That is the difference between an engine that never reported a field and one that has stopped reporting it. - Confidence may come from the mapping or from the request, and not from
both. An import that names a mapping definition producing scores and also
carries
confidenceis refused, so a misconfigured mapping cannot hide behind a hand-written score. - The marks are shown while the document stands at its first workflow step, and again if it is sent back to that step. A later approver is judging the reviewer’s decision rather than the engine’s proposal.
A document, its content and what is known about it are separate resources
GET /documents/{documentId}now answers with the document itself — name, type, status, owner, version, timestamps — and no longer carriescontent. Read the values fromGET /documents/{documentId}/content, which answers with the same header and the content together, so a screen that draws a form still makes one request. Listing documents no longer ships a content tree per row.- The revision list is revision headers. A revision’s values are at
GET /documents/{documentId}/revisions/{revisionNumber}/content, and what was known about them atGET /documents/{documentId}/revisions/{revisionNumber}/confidence. Drawing a history of twelve revisions used to transfer twelve copies of the content. POST /documentsandPUT /documents/{documentId}/contentanswer with the header and the content, which is what they wrote; archiving and taking over ownership answer with the header alone, because neither changes a value.
More of the screen is the work
- Every page’s header is smaller. It carried a large title and a full-size subtitle above a rule, and on a 1440x900 screen that was 141px before any page’s content began. The same eyebrow, title, subtitle and rule now take 113px, and each page starts higher up the window.
- Pages no longer scroll by the height of the top bar. Every screen in the application was exactly one bar taller than the browser window, so a page whose content fitted still showed a scrollbar. It does not any more.
- The workflow designer fits the window. It used to place 490px of headings, tabs and toolbars above the diagram on a 900px screen and then scroll a further 466px, which put the Save bar and the lower half of the diagram out of view. The diagram’s own heading row is gone — the page title two rows above already said the same words — and Fit diagram has moved beside the element palette. What is left above the diagram is 388px, and the page no longer scrolls in any meaningful sense.
- The sidebar can be collapsed to its icons, using the control at the foot of it, which is worth roughly 170px of width to whatever you are working on. Every destination stays exactly where it was and keeps its name on hover; only the labels go. The choice is remembered in your browser, so a laptop and a large monitor each keep their own answer, and it applies to wide windows only — on a narrow one the sidebar is already a drawer.
- A step’s inspector shows at a glance which parts of it are configured. Each section that holds something — candidate groups, a deadline, routing rules, field permissions — is marked on its header, so the panel can be read without opening anything.
- Fixed: in a routing rule with more than one group, only the first group could be removed. Groups after it either did nothing or removed a group from a different rule. The same fault affected renaming, reordering and deleting a rule other than the first, and the summed fields of a completion rule.
Configuring a work step no longer means scrolling a form five screens tall
- The panel on the right of the workflow designer now reads as a summary of the step. Each of its sections is closed when you select a step, and each closed header says what that section holds: “Deadline · 2 days after arrival”, “Step fields · 6 of 25 editable”, “Routing rules · 3 rules”, “Four eyes · 2 steps barred”. Reading a step’s configuration no longer means opening it. Several sections can stand open at once, and the header naming the step now stays in view while the panel scrolls.
- Field permissions, routing rules, value rules and completion rules open in a wide sheet over the diagram, because each of them is a table and the panel is a narrow column. Press the section header to open it; Escape or a press outside returns you to the diagram. The diagram stays visible around the sheet, which matters for the sections that are computed from it — the steps a four-eyes rule may bar are the ones that can reach this step.
- Field permissions are a table there, not a list. One field per row with its three permissions on that row, grouped by the object each field belongs to — supplier fields together, line-item fields together — with a tick-all per group for granting a whole object in one press. A search box narrows by field path, and “Granted only” hides the fields this step holds nothing over. A document type with twenty-five fields is now a screen rather than five.
- The panel can be dragged wider, between its original width and roughly twice that, by the handle on its left edge. The handle answers the left and right arrow keys as well as the pointer, and Home and End jump to the two limits. The width is remembered in your browser, so it is per machine — a laptop and a large monitor keep their own answers — and it is not stored with your account.
- Nothing about a workflow’s contents changed, and no saved workflow needs anything done to it. This is where the same settings are configured, not what they mean.
A step can route its work by what the document says, and enforce four eyes
- A workflow step can now send its work somewhere other than its candidate groups, decided by the document in front of it. Add routing rules on the step: each is a condition over a document field and the groups the work goes to when it holds. This is what an approval limit is — an invoice at or above 50 000 goes to the board, one at or above 5 000 to the managers, anything else to the step’s own groups.
- Rules are read from the top and the first match decides, so write the bands from the highest threshold down. It is deliberately not the union of every matching rule: an approval limit exists to take an invoice away from the people who may not approve it, and a union would offer it to them anyway. Work matching no rule goes to the step’s candidate groups, which are still required for exactly that reason.
- Routing by a field’s value uses the same conditions as a validation rule, so “cost centre is one of 4711, 4712, 4713” routes to the group that owns those cost centres. The groups are picked from the organization directory; a group path cannot be built out of a document value, because a group that turns out not to exist would leave the work where nobody can see it.
- The condition may read a field the step cannot edit. That is the ordinary case: the amount that decides which band applies is usually one the approver must not change.
- The assignment is fixed when the work item is created. Correcting the amount afterwards does not move work already in somebody’s basket; moving it is a reassignment, which is an action with a person’s name against it.
- Four eyes. A step can bar the people who completed named earlier steps in the same workflow run. Whoever checked an invoice then cannot approve it: the item is not in their basket or their counts, they cannot take it, and nobody can assign, escalate or hand it over to them. Nor can they change the document’s content while that step is open. They keep the read access their earlier work earned them.
- The bar holds for administrators as well. An administrator can still see the item in the tenant-wide list and hand it to somebody else — otherwise a step whose only candidate is barred would strand work — but cannot complete it themselves. Give a step with a four-eyes rule a group with more than one person in it.
- A stand-in nomination leaves a barred item with its owner instead of moving it, and the rest of the nomination’s work moves as usual.
- Sending work back does not count as completing the step, so the person who sent it back is not barred later; whoever eventually completes that step is.
- Configure both on the step in the workflow designer, under the candidate groups. The four-eyes picker offers only the steps this one can be reached from, since barring the completer of a step that never runs first bars nobody. Publishing is refused for a rule with no group, two rules on a step sharing a name, a condition reading a field the document type does not have, or a four-eyes rule naming a step that cannot precede this one.
- The review queue and the document page say which rule routed an item and how many people a four-eyes rule is keeping out of it, so “why is this in my basket” has an answer without opening the workflow.
- Workflow steps accept two new optional fields,
assignmentRulesandseparationOfDuties. The work-item representation carries two new read-only fields,assignmentRuleKeyandexcludedActorSubjects. Acting on an item a four-eyes rule bars you from answers403with the codeWORKFLOW_SEPARATION_OF_DUTIES. - A database migration adds the columns and the table behind this. Existing work items name no rule and bar nobody, which is what every step meant before.
A workflow step’s deadline can come from a date in the document
- A step can be given a deadline read out of the document instead of a fixed time after the work arrives: pick a date field, add or subtract whole days, and optionally add the number of days the document itself carries. That last part is how a payment term reaches the deadline — an early-payment discount arrives as a number of days rather than a date, and it differs per supplier. An invoice dated 14 March with a 14-day term and an offset of −2 days falls due on 26 March.
- Configure it on the step in the workflow designer. The two kinds are exclusive: a step has either a fixed time or a document deadline, and publishing one that declares both is refused, as is one pointing at a field that is not a date, not a number, or inside a table.
- A document deadline moves when the document does. Correcting a date somebody read wrong moves every open deadline that depends on it, and takes work back out of overdue when the corrected date has not passed. Work that has been escalated stays escalated, because a person decided that.
- If the document does not carry the chosen date yet, the deadline counts from when the document reached Saphir and is shown as provisional, so the work is still tracked and ordered. It becomes a real document deadline as soon as the date is filled in. Note that this is when Saphir received the document, which is not necessarily when the invoice was received — the system that captured it may have held it first. Where the exact receipt date matters, have that system write it into a date field and point the deadline at it.
- The deadline says which deadline it is. A date on its own cannot tell a reviewer whether it is this step’s deadline, the day a discount expires, or the invoice’s own payment date, so the review queue names the document field the deadline was read from — and its column is headed “Finish by”, because it is about the work rather than about the invoice. A step’s own fixed time and a provisional arrival deadline are labelled as such.
- The same deadline is shown on the document itself, beside the current step and the link back into the workflow, so the screen where somebody acts on a case says when it has to be done.
- A date-only deadline expires at the end of that day in the deployment’s time
zone, set with
workflow.deadline.zone(defaultEurope/Berlin). Offsets are calendar days, not working days, matching how payment and discount terms are written. - The API’s work-item representation carries two new read-only fields:
dueSource, with the valuesstep_duration,document_dateanddocument_arrival, anddueBaseFieldPath, the document field adocument_datedeadline was counted from. Workflow steps accept a new optionaldeadlineobject.
Stops and restarts let in-flight work finish
- On shutdown the platform completes the requests it is already serving before the process exits — an outbound webhook call, a directory lookup, a synchronous transform — so a restart during a maintenance window does not reach the caller as a failed request.
SHUTDOWN_TIMEOUTbounds the wait, and defaults to30s.
Logs are machine-readable, and one request is one identifier
- In production every log line is a single JSON object on stdout, in Elastic Common Schema, so a collector can read it without pattern-matching sentences. The values a line is about — the document, the delivery, the fetch, the HTTP status — are fields on that object rather than text inside its message, which is what makes them searchable and groupable.
- Every line carries the
traceIdof the request that produced it, the same identifier the response returns asX-Trace-Idand the error body quotes. A customer reporting a failure with that identifier can be answered from the logs directly. Lines written for a tenant carrytenantIdas well. - The identifier survives the queue: an outbound webhook and a notification carry it on the message, so the delivery attempt’s lines join the request that caused it. Scheduled maintenance runs are given one of their own, so a night’s purge can be read as one sequence.
SAPHIR_ENVIRONMENTandSAPHIR_VERSIONare published on every line as the service’s environment and version; both default rather than being required. Other profiles keep human-readable lines, now with the identifier and the fields on them.
Every distributed jar carries its third-party licence notices
- The jar now contains
META-INF/THIRD-PARTY.txt, listing every component Saphir is built from and the licence it is offered under. Anyone receiving a binary receives the notices that go with it.
Document search finds values, and finds them quickly
- Searching documents now matches the values people entered, not a
serialized copy of the document. A field’s name is no longer searchable, so
searching for
invoiceNumberstops returning every document that has an invoice number, and a checkbox no longer makes its document matchtrue. - Values are matched as the type declares them. A money amount stored as
1234.50is found by typing either1234.50or1234,50, and a date stored as2024-03-14is found by typing either that or14.03.2024. The parts of an identifier are searchable on their own:RE-2024-000123is found by2024or by000123. - Search now matches whole words with the last one treated as a prefix, where
it previously matched any substring anywhere in the document. Typing
MüllfindsMüller; typingüllerno longer does. - Only fields the document’s type declares are searchable. Content carrying keys the type does not declare is stored and returned as before, but is not matched by a search.
- Migration.
documents.content_jsonanddocument_revisions.content_jsonchange fromTEXTtojsonb, and a newdocument_schema.document_searchtable is created and backfilled. A stored document that is not valid JSON will fail the migration rather than be carried forward. Document content is unchanged in the API.
The integrations area is split into targets, webhooks and reference data
- The web app’s integrations area is now three pages under one navigation section: Targets — the one list a target is edited in, since both directions use it — and Webhooks and Reference data, which pick targets in their forms and name them in their usage views. A target used only by lookups no longer appears dressed as a webhook, and deleting one warns about the lookups that hold it as well as the subscriptions.
- Nothing behind the API changes; this is the configuration screens catching up with the model — a definition is who Saphir talks to, and a delivery and a lookup ask the same system.
Lookups can be corrected after creation
- The reference-data screen gained an edit path for lookups: a row’s edit button loads the lookup into the form, and saving replaces it — every field travelling, since the API replaces the row and an omitted field would be a field reset. The usage view and the document picker follow the change, as they read the lookup live.
Document fields can read their values from an integration lookup
- A text property type can now name an integration lookup its values must
come from — cost centres, accounts, tax keys, suppliers. The lookup is an
optional constraint on a
STRINGproperty, set withlookupId, so a field bound to a list is still a string everywhere it is read, mapped or exported; a text property without a lookup remains free text. - A document write is accepted only after the lookup has been asked and answered with the value; a value the lookup could not be asked about is refused with the reason rather than stored unchecked.
- The document form offers the live list as a searchable picker, with search sent to the target as it is typed and further pages loaded on demand; the stored value is the entry’s value, never its label.
- The property type editor offers the lookup picker beside the format and the validation pattern, on the same text base type they constrain. Saving is refused for a lookup that no longer exists, and for a lookup whose request template declares arguments — supplying those from a document’s own fields is not supported yet.
- A constrained value is checked against the lookup live at write time:
when the lookup takes a search term the value is sent as the term, otherwise
the answer’s pages are read in order, bounded at twenty pages
(
integration.max-validation-pages). Past the bound the write is refused with a message that names the fix rather than silently accepted. - Lookup configuration itself is unchanged; a constrained field is simply a
reader of the lookups INT-5 added. For trying it on a developer machine,
dev/mock-reference-data.shstarts a mock reference-data target and seeds a working target, lookup, property type, document type and document against it;dev/run-dev.shruns it with the stack. - New database column
lookup_idondocument_schema.document_property_type_versions, constrained by a CHECK to appear only on rows whose base type isSTRING.
Workflow conditions can compare document fields and do arithmetic
- A workflow predicate can now compare one document field against another
document field instead of a constant —
compareFieldPathonDocumentFieldPredicate. Both sides use the same coercion the ordered comparisons already used: numbers numerically, date-times chronologically, everything else lexically. A comparison against a constant keeps its existing string semantics. - A predicate can sum fields before the comparison —
addFieldPathsonDocumentFieldPredicate— so net plus tax can be checked against gross. Each operand must resolve to exactly one numeric value, and so must the expected side; amounts are added exactly as stored, with no further rounding. A rule whose operands cannot be resolved does not match. - An
equalsornot_equalspredicate can carry a tolerance — a non-negative decimal onDocumentFieldPredicate— and then compares numerically, matching when the absolute difference is at most (equals) or more than (not_equals) the tolerance: an amount within tolerance of the order. Values that are not numbers never match, and neither does a rule whose operands are missing. - The workflow designers’ condition editors — on transitions and on step completion rules — offer a compare-to picker (a value or another field), a tolerance input where the subject field is an amount, and an add-to-sum picker listing the document’s NUMBER and MONEY fields.
- Summed and compared fields must exist in the pinned schema, like the subject field, but are not required to be editable at the step — a rule may check entered values against fields the document arrived with.
- The three new predicate fields are additive and validated in shape: the definition is refused when a tolerance sits on an ordered comparison, when a compared field is combined with a constant, or when a sum is attached to an operator that reads no values.
Document properties can hold money
-
A new MONEY property base type stores amounts as decimal strings such as
"12.30"— never as JSON numbers, which cannot hold an amount exactly. -
A MONEY property type declares decimal places (
scale, 0–12, default 2), an optional ISO 4217 currency code, and a rounding rule (HALF_UPby default, the rule most invoicing systems state). A value that arrives with more fractional digits than the declared scale is rounded with that rule before it is stored, and every stored value carries exactly the declared number of decimal places. -
MONEY fields are edited in the document form with the currency code shown beside the field, and the property type editor offers a grouped currency picker and the seven rounding rules by name.
-
The new type is additive:
DocumentPropertyBaseType,SchemaNodeTypeand the three new fields onDocumentPropertyType,CreateDocumentPropertyTypeRequestandDocumentTypePropertyjoin the existing contract, and a JSON number written into a MONEY field is refused — integrators mapping into one convert the source with aSTRINGconversion, which the rule editor suggests and the compiler accepts. A money field can likewise be copied into a free-text field without a conversion. -
Schema change:
document_property_type_versionsgainsamount_scale,currencyandrounding_mode, with a constraint that only a MONEY property type carries them. Flyway applies this automatically. -
The interface is set in the IBM Plex superfamily, and the two faces divide the screen by who is speaking. Everything the system asserts — column headers, status, counts, identifiers, timings — is set in Plex Mono; everything a person wrote or reads as prose is set in Plex Sans. A reviewer can now tell a machine-supplied value from a human one by its shape, before reading it.
-
The palette is the product’s own sapphire, taken unaltered from the logo, against greys with almost no colour of their own. Blue appears where it means something: the primary action, the current destination, the selected filter.
-
Surfaces are ruled with hairlines rather than drop shadows. Shadow now appears only on what genuinely floats — a dialog, the mobile drawer, a sticky action bar, the account menu — so a dialog reads as a dialog again.
-
Every screen keeps the same content column, the same margins and the same control heights, and the header’s controls sit directly above the page’s own. Nothing shifts position as you move between screens.
-
The work basket’s status counts are one ruled strip rather than five separate cards, and the selected band is marked in its own semantic colour.
-
Status, feedback and the work-item context banner carry their state on a coloured edge, so state is visible at a glance down the side of a page rather than only in a filled badge.
-
Who you are signed in as, the interface language, notification settings and the way out are gathered into one account menu in the top right. Each language is named in its own language.
-
Text, controls and pointer targets meet WCAG AA. Every text pair clears 4.5:1 against the background it is drawn on, the edge that identifies a control clears 3:1 against every background it sits on, and pointer targets are at least 24px.
-
The integrations screen is titled Integrations, matching what the navigation calls it, and its description now covers everything it holds: deliveries, configuration, the change feed, lookups, imports, usage and the API contract. Both locales carry the new heading and description.
Every resource is served under its API version
- Breaking — every endpoint moved: resources are now addressed under their
major version.
POST /api/documents/importisPOST /api/v1/documents/import, and so on for all 111 operations. The unversioned path answers404; there is no alias, because two addresses for one resource is what the version segment exists to remove. - The contract, Swagger UI and health deliberately stay where they are, at
/api/openapi.yaml,/api/openapi.json,/api/swagger-ui.htmland/api/actuator/health. Finding out which version a platform speaks cannot require knowing it already, and liveness is a fact about the process rather than about a version of its API. - Nothing to change in a generated client beyond regenerating it: the
version is in the contract’s
serversURL, so the base comes with the document. A hand-written client needs/v1added to its base URL once. - The version segment always matches the major of the contract’s
info.version, so a client reading1.4.0knows it is calling/v1. - The integrations page’s API tab names the base URL a caller should use, reading it from the served contract rather than composing it, and lists what a client must tolerate across a minor version.
The API contract is published, and clients are generated from it
- Every running platform serves its own contract as one self-contained
document:
GET /api/openapi.yamlandGET /api/openapi.json. Neither needs a credential, and both describe exactly the API that instance serves. - Swagger UI at
/api/swagger-ui.htmlnow browses that published contract. ./mvnw -Pclients generate-sourceswrites a client library intotarget/clientsfor TypeScript, Python, Java and C#. Each takes its package version from the contract’sinfo.version, so the version an integrator pins is the version of the API they built against. Nothing is pushed to a package registry; generate against the instance you integrate with.- New policy: API versioning and deprecation
states what a major, minor and patch change mean, the four things a client
must tolerate to survive a minor one — unknown fields, unknown enum values,
reworded messages, and whole-object updates — and that a deprecation is
announced in the contract with the date it stops answering, never less than
90 days ahead. The API version is
1.0.0and is deliberately not the platform’s build version. - New documentation: an integration cookbook covering a case import, a nightly batch with its originals, a safe retry, receiving outcomes by webhook, polling the change feed instead, answering a lookup, and writing a value back into a case.
- The integrations page gained an API tab: the contract’s version, both downloads, and the command that turns it into a client.
Change feed for systems that poll
- A system that cannot receive webhooks can now read what happened by polling.
GET /integration/feed-consumers/{id}/eventsreturns the events after a cursor, oldest first, in a total order that does not change. Send noafteron the first call and thenextCursorof the previous answer thereafter.limitdefaults to 100 and may be up to 500. - The cursor is opaque: store it exactly as given and send it back. Store the
events and the cursor in one transaction of your own — a cursor stored without
its events skips them permanently. Polling the same cursor twice returns the
same events, each with a stable
id. - A cursor whose events have passed out of retention is answered
410 INTEGRATION_FEED_CURSOR_EXPIRED; the caller resynchronises from the document API and starts again with no cursor. A cursor this feed did not issue is answered400. - New configuration:
app.retention.change-feed-days(CHANGE_FEED_RETENTION_DAYS), default 30. This is how long a consumer may be absent and still resume. Feed events are purged with the other retention jobs. - New endpoints:
GET/POST /integration/feed-consumers,PUT/DELETE /integration/feed-consumers/{integrationFeedConsumerId}. A consumer names the events it wants — empty means all of them — and optionally a published mapping, which is applied as each event is read. Command phases are refused. - New API scope:
integration-feed:read, which permits polling the feed and nothing else. Configuring consumers stays behindintegrations:readandintegrations:write. - Events are recorded only for an organization that has at least one feed consumer. Deactivating a consumer stops it reading, not the recording, so it resumes where it left off.
- Migration:
integration_schema.integration_change_eventsandintegration_schema.integration_feed_consumersare created. - The integrations page gained a Change feed tab: the configured consumers, when each last polled, and a preview of what one would read. Previewing never moves a consumer’s own position.
Expanded integration event catalog
IntegrationEventTypegained six values, so a subscription can now name the fact it is interested in rather than a broad one it has to filter:DOCUMENT_FINALIZED,DOCUMENT_ARCHIVED,DOCUMENT_DELETED,WORKFLOW_STEP_SENT_BACK,WORKFLOW_WORK_ITEM_ASSIGNEDandWORKFLOW_WORK_ITEM_ESCALATED.- A document lifecycle transition is reported twice: once as
DOCUMENT_STATUS_CHANGEDand once as the outcome it reached. A target subscribed to both receives both calls for one transition. WORKFLOW_STEP_ENTEREDis delivered when workflow execution reaches a human step. It arrives before theWORKFLOW_WORK_ITEM_ASSIGNEDfor the same step.- Workflow scoping —
workflowDefinitionIdwithworkflowNodeKey— is accepted for all fiveWORKFLOW_*event types. Setting it for any other event type is refused, and the message names the event type. - The integrations page of the web app offers the full catalog when a subscription is created, and names each event in the operator’s language in both English and German rather than showing the API constant.
Import deduplication
- A document type field can be marked as an identification field. Imports are
then deduplicated on the values of all such fields together: repeating the
same payload returns the existing document with HTTP 200 and
duplicate: trueplusexistingDocumentId, instead of creating a second document or starting a second workflow instance. A dry run reports the same match without creating anything. ImportedDocumentgainedduplicateandexistingDocumentId; a created import still answers 201 withduplicate: false.- An identification field counts as required without the Required flag being set, and cannot be a grouped column; the document type editor refuses only the second when the draft is saved. The editor offers the flag beside Required, on ungrouped fields only.
- Identification values must be present in the mapped content; an import whose mapping omits one is rejected with the field named.
- Manual document creation is not deduplicated. Imports are deduplicated from the moment the feature ships; documents imported before then stay outside the identity key.
Batch import
POST /documents/import/batchruns 1 to 500 import requests in one call, in order, and reports what happened to each. Every item follows the single import’s semantics — mapping, document-type validation, naming, deduplication and the atomic workflow start.- Each result carries the item’s position (
index), astatus—imported,duplicate,dryRunorfailed— and either the imported document or the refusal in the standard error shape, with the code, message, details and HTTP status the single-import endpoint would have answered. - Items are independent: each is imported in its own transaction, so a refused item does not roll back or stop the others. The request is refused as a whole only when it is malformed as a batch — no items, more than 500, or an item missing a required field — and the error names the offending position.
- A retried batch reports the items that already arrived as
duplicatewith theirexistingDocumentIdinstead of importing them twice. - The integrations page of the web app gained an Import tab that runs a batch through the same endpoint; it defaults to a dry run, which reports each item’s outcome without creating anything.
Combined payload and original ingest
POST /documents/import/pdftakes a PDF ahead of the import that will own it and answers 201 withpdfUploadId,expiresAtandsizeBytes. It accepts the same payloads the document PDF endpoint does:application/pdf, up to the configured 10 MiB, refused otherwise.ImportDocumentRequestgainedpdfUploadId. An import that names one attaches that original to the document in the same transaction that creates it, so a document is never created without the original sent for it: if the original can no longer be claimed, the import is refused with 404IMPORT_PDF_UPLOAD_NOT_FOUNDand no document is created. This works for a batch item as it does for a single import.ImportedDocumentgainedpdfStored, true when the import attached a staged original. It is false for a dry run, and false for a duplicate: a repeated import leaves the existing document’s original as it is.- A dry run checks that the named original is still claimable and leaves it staged for the real import that follows.
- An upload no import claims expires and is purged. New configuration property:
app.retention.staged-import-pdf-hours, default 24, maximum 168; the purge runs with the existing retention schedule. - The Import tab of the web app takes one PDF per payload, in the order the payloads are given, and reports per item whether the original was attached.
Original documents in review
- A document can carry its original PDF, uploaded and downloaded through the document API, and the web app shows it beside the form while the document is being reviewed.
DocumentgainedhasPdf, so a client can tell whether an original exists without fetching it. It is answered on every read of a document, including the responses to writes, and resolved for a whole page in a single query.- Uploading an original requires
DOCUMENT_WRITE. A reviewer without that right sees the original and can work from it, but supplies one through somebody who has it. - The upload request body no longer declares
maxLengthin the specification. The size bound is enforced by the server when the bytes arrive, so generated clients are unaffected. - The development seed gains an invoice document type and 24 invoices, each with
its PDF attached through the API. The field values are committed beside the
files, so seeding needs no PDF tooling and each document matches its original.
The type composes
totalAmount,currency,sku,quantityandunitPricefrom the existing property-type library.
Inbound lookups
- A webhook target can now be asked a question and answer with a list to choose from — which purchase orders belong to a supplier, which cost centres an invoice may be booked to. New endpoints manage lookups and read their entries.
- A lookup points at an existing webhook target and uses its endpoint, credential, timeout and activation state. A target is configured and rotated once, and pausing it stops its lookups as well as its deliveries.
- A lookup carries a request template appended to the target’s endpoint, with
{argument}placeholders supplied by the caller. Arguments must be non-empty scalars of unreserved characters, so a value fills one path segment and cannot alter the structure of the URL. - A search term is sent as a whole query parameter under a configurable name and
is percent-encoded as one value, so it may contain anything a supplier name
contains —
Müller & Co.is sent as written. Terms longer than 200 characters are truncated rather than refused. - Paging is
PAGE_NUMBERorOFFSET, under the parameter names the target uses, with the target’s first page number configurable as 0 or 1. Callers always ask for page 0 and the platform translates. Cursor paging is not supported. - The answer is read with RFC 6901 JSON Pointers naming the array of items and, within one item, the value and the label. An item whose value pointer finds nothing usable is skipped and counted, and the count is reported beside the entries, so a short list is visibly short.
- An answer may be held for a configurable time, from 0 seconds — the default, meaning no caching — to 24 hours. Answers are held in memory, separately per organization, question, search term and page, and are dropped when the lookup or its target changes. Failures are never held.
- Lookups are read live and are not versioned: a lookup is asked and answered within one call, so there is nothing to freeze the way a queued delivery freezes its request.
- Reads are not written to the delivery log, which continues to record only what Saphir sent to an external system. A failed read is reported to the caller as HTTP 502 with the reason, and logged once by the platform.
- Configuration that could not take effect is refused while the lookup is being saved: a target whose credential signs the request body, which a read has none of; paging parameters on a lookup that does not page; a search, page or size parameter that the target’s endpoint or the request template already sets; a pointer that is not a JSON Pointer; and a page size or hold time outside its bounds.
- Deleting a webhook target that a lookup still reads from is refused, and the message says how many lookups use it.
- The web app gained a Lookups tab: the list, the configuration form, and a panel that runs a lookup with its own arguments and shows what came back, whether the answer was held or freshly fetched, and how many items could not be read.
Mapping rule kinds
- Mapping rules can now translate, join, compute and branch, in addition to copying a value, writing a constant and repeating over an array.
LOOKUPtranslates a value through a table ofwhen→thenentries and says what to do when nothing matches: warn, use the rule’s default, or pass the value through. Values are matched as text, so a code sent as a number and the same code quoted are one key. Pass-through suits a partial table, where a few values need translating and the rest are already correct.CONCATjoins an ordered list of parts, each a source path or a literal, with an optional separator. Parts that resolve to nothing are skipped rather than written asnull, and a rule whose every source part is missing produces no value, so the rule’s default can answer for it.ARITHMETICadds, subtracts, multiplies or divides two or more operands in arbitrary precision.DIVIDErequires a scale. A missing operand fails the rule rather than counting as zero, so an absent amount is never mistaken for an amount of zero.CONDITIONALtests a source value for equality, ordering, presence or blankness and chooses between two branches, either of which may be empty. An empty branch writes nothing, which is how a field is set only in the cases that call for it.- Any rule that reads a source can carry a
defaultValue, used when that source is absent. It is not available onCONSTANT, which has no source, or onFOR_EACH, whose target is one item of an array. - A default answers an absent source only. A failed conversion, an ambiguous
filter or an unmatched lookup remains a warning, so a broken mapping stays
visible. A
COPYof a field that arrived asnullwrites that null through; for the computing kinds an explicit null counts as absent. decimalFormatstates the pattern an incoming number is written in, so a payload carrying1.234,56is read as one thousand two hundred and thirty-four. It sits beside the existingsourceDateFormat.- Everything a kind needs beyond a single source path is configured as one JSON arguments value on the rule, validated when the mapping is compiled and again when it runs.
- Compilation refuses arguments a kind has no use for, an empty lookup table, a
CONCATwith no parts, anARITHMETICwith fewer than two operands, aDIVIDEwithout a scale, aCONDITIONALwith no branches, and a default the target cannot hold. - The web app’s mapping editor offers each new kind with its own configuration.
Synchronous response write-back
- A webhook subscription can call an external system before a document is created or saved and write the answer onto that document, so a value the external system returns — a booking number, for example — reaches the document it belongs to.
WEBHOOK_SYNCruns at a command phase,BEFORE_DOCUMENT_CREATEorBEFORE_DOCUMENT_UPDATE. Command phases and past-tense events cannot be mixed on one subscription, and one command phase takes one synchronous subscription.APPLY_DOCUMENT_CONTENT_PATCHmaps the response through a required inbound mapping and merges it into the content being written. Absent fields are left alone, an explicit null sets a property rather than deleting it, and arrays are replaced whole rather than merged by position.- A response that would change anything outside its permitted paths is refused whole rather than trimmed, so an external system is never told it wrote something the document does not contain.
- Workflow steps gained
integrationWritableFieldPaths, separate fromeditableFieldPathsand empty by default. A reviewer may correct an invoice number while an integration fills a booking number that reviewer does not touch; enabling a synchronous target grants it nothing until the fields are named at the step. - No document lock is held across the external call, and the caller’s expected version is re-checked before the write. The invocation record is written in its own transaction, so diagnostics survive an operation the transformation refused.
- Delivery diagnostics report transport and application outcomes separately
through
IntegrationApplicationOutcome, alongside the document, the expected version and the revision a patch produced, so an HTTP 200 whose patch was refused is not shown as a success. - Replay is not offered for synchronous invocations, whose stored response applies to a document that may have moved on.
- Changed: a subscription’s
mappingDefinitionIdis nowoutboundMappingDefinitionIdin both the API and the database, alongside the newinboundMappingDefinitionId. Existing asynchronous subscriptions keep their behaviour and migrate to acknowledgement-only.
Integration authentication
- A webhook target can authenticate with the OAuth2 client credentials grant. The stored secret is the client secret and is exchanged at a configured token endpoint for a short-lived access token, which is what the target receives; the client secret itself never reaches it.
- Tokens are re-acquired rather than refreshed, within a configurable skew of the stated expiry, and nothing about a token is persisted.
- Tokens are cached per target, so a webhook remains one outbound call. An entry is bound to a digest of the client secret, token endpoint, scope and client-authentication form it was obtained with, so rotating or moving any of them acquires a new token, and the cache itself holds no credential. A target answering 401 has its cached token discarded and the following retry acquires a fresh one.
- Both client-authentication forms are supported:
Authorization: Basic, andclient_id/client_secretas form fields, which a good number of deployed servers accept exclusively. - The token endpoint is validated against the outbound address boundary when the target is saved and again before each exchange, and the exchange uses the same guarded client as a delivery.
authUsernamecarries the identifying half of the credential for both schemes that have one: the user name forBASIC, the client identifier forOAUTH2_CLIENT_CREDENTIALS.IntegrationDefinitiongainedauthTokenUrl,authScopeandauthClientAuthentication, and the web app’s target form offers all of them.- Added
integration.token-expiry-skew-ms(default 30s) andintegration.default-token-ttl-ms(default 60s, used only when the issuer states no lifetime).
Outbound egress boundary
- Webhook targets are reached over
https. Plaintexthttprequiresintegration.allow-plaintext-http, which defaults to closed, is set only in the development profile, and logs a warning at startup wherever it is open. It is a separate switch fromintegration.allow-internal-endpoints, so relaxing the address range for a local receiver does not also permit sending a credential in the clear. OutboundAddressPolicyjudges outbound addresses against the IANA special-purpose registries, covering carrier-grade NAT,0.0.0.0/8, the reserved, benchmarking and documentation ranges, and the IPv6 transition ranges, whose embedded IPv4 address is where a packet would arrive.- Deliveries resolve through
GuardedAddressResolverGroup, so the policy applies to the address the delivery socket is actually given rather than only to the hostname that was validated earlier. - The API-key header name is held to the same rules as a configured request header, and one reserved-header list is shared by the request-version service, the registry service and the delivery client.
- URLs written to operator logs are recorded without their query string or user information.
- An endpoint URL carrying a fragment is refused, since a fragment never reaches the server.
deployment/compose.yamldeclares an egress policy: the database, identity provider and broker sit on an internal network, and the application is the only container that can reach the internet.
Integration transport
- A webhook target can carry a path template — a suffix appended to its endpoint
URL with
{field}placeholders filled from the mapped payload — so a delivery can address one resource, such asPUT /api/invoices/{invoiceNumber}, rather than always posting to a collection. - The template is a suffix and never a whole URL, so the scheme, host and port
are not part of what an operator writes. A placeholder resolves only to a
non-empty scalar of unreserved characters; anything that could change the
URL’s structure fails the delivery instead of being sent, and
..,//,#, a backslash and an authority are refused when the target is saved. A template cannot be added to an endpoint that already carries a query string. - A webhook target carries an HTTP method (
POST,PUTorPATCH), a request content type, and additional request headers, instead of always sending a JSONPOST. The headers the platform sets itself —Authorization,X-Saphir-Signature,Idempotency-Key,Content-Type,Content-LengthandHost— are refused, as are values carrying a control character. - What a target sends — endpoint, method, content type, headers and path
template — is held in
integration_request_versions, one immutable row per distinct request. The newest version is the target’s current request. A delivery references the version it was queued against, so editing a target while work sits in the queue does not change what that work sends. Saving a target that changes nothing about the request creates no new version. - Outbound credential resolution compares the delivery’s request version to the target’s newest one, so any change to the request shape withholds the credential from work queued against the older version.
- Changed:
IntegrationDeliverygainedrequestVersionId,httpMethodandcontentType, and itsendpointUrlis read from the referenced request version.IntegrationDefinition,IntegrationDefinitionRequestandIntegrationDeliverygainedpathTemplate, offered by the web app’s target form. - Removed:
integration_definitions.endpoint_urlandintegration_delivery_logs.endpoint_url, both migrated into request version rows. - Added
integration.allow-internal-endpoints, which relaxes the outbound address boundary and nothing else, so a developer can point a target at a receiver on their own machine. It defaults to closed, is set only in the development profile, and logs a warning at startup wherever it is open. Scheme, host and user-info checks still apply when it is open.
Document and schema model
- Documents store arbitrary JSON content and pin the exact immutable schema version that governs it. Document property snapshots are keyed by technical revision UUIDs with normalized property-type version references.
- Schema definitions are recursive and document-independent, supporting scalar, object, array and raw JSON roots.
- Property types are document-owned and immutable, with backend-managed lineage, primitive base types, email formatting and optional pattern validation. Exact property-type composition is the only document-type authoring path: names and descriptions come from the property type, while requiredness and multiplicity belong to each composition.
- Document types have mutable drafts, explicit publication, readable immutable versions, version history endpoints, and exact version pinning for new documents, so drafts and later releases do not alter existing documents.
- Document creation, draft saves and workflow-applied changes run atomic backing-schema generation and semantic property validation.
- Mapping definitions are compiled against exact source and target schema
versions, including selector, pointer, constant and type checks, and report
non-fatal rule warnings rather than failing a whole run.
FOR_EACHmapping is item-aligned for reshaping repeated structures. - Removed: the duplicate property-type API, persistence model, document property rows, validation codec, seeds and obsolete migrations; direct document-type binding to arbitrary schemas; schema compatibility endpoints; generic document-type mutation; persisted required-field lists; and ambiguous schema-type aliases with the superseded execution endpoint.
Workflow
- Workflow definitions can be saved as structurally incomplete inactive drafts; full graph validation is enforced on activation.
- Publishing a workflow stores a new version and supersedes the one it replaces. A document type keeps one active version, one editable draft and its superseded versions as immutable history, and running documents keep the version they were started on.
- Changed: a workflow has a stable
workflowIdand counts its own versions from 1, whileidaddresses one version; paths and runtime references useworkflowVersionId. Workflows reportstatus(ACTIVE,DRAFT,SUPERSEDED) instead of a read-onlyisActiveflag, and no longer carrydraftOfId. - Workflow editability, predicates and completion rules address schema field paths and validate content only when advancing a work item.
- Work steps expose required field paths, permit required-only read-only fields populated upstream, and refuse entry while such a field is empty.
- Added structured inclusive (OR) and parallel (AND) split/join gateways with explicit pairing, graph validation, branch activation tracking and safe join synchronization.
Accountability and history
- Added immutable, tenant-isolated document revisions with full content snapshots, deterministic changed paths, actor issuer and subject, request correlation, and optional workflow-instance, work-item and node context.
- Added read-only document revision endpoints and an administrator and auditor audit search API.
- Added an append-only audit module covering document changes, workflow runtime actions and configuration mutations, across schemas, document types, workflow definitions, mapping definitions, integration definitions and subscriptions, instance starts, assignment changes, lock ownership changes, draft saves and work-item completions.
- Changed: deleting a document records a retained
DELETEDlifecycle revision, so accountability history is kept. - Changed: a content save that changes nothing is idempotent — neither the concurrency version nor the business revision advances.
Security and deployment
- Added a disposable Keycloak development realm with PKCE SPA configuration, API audience, platform roles, groups and local users.
- Business endpoints are secured as an OAuth2 resource server with issuer, signature, timestamp and audience validation, and Keycloak realm roles are converted to Spring Security authorities.
- Added Spring method authorization for administrator, configurator, worker, integrator and auditor capabilities, with denials returned as standardized HTTP 403 responses.
- Added a workflow-owned authenticated work basket and direct and group assignment authorization using stable OIDC subjects and group claims.
- Added a single-server deployment stack for Saphir, Keycloak and PostgreSQL, including generated secrets, health waiting and database backups.
Document editing
- Added a version-checked document content-save endpoint that accepts incomplete drafts without advancing workflow state.
- Added workflow-mediated content authorization for active executions, enforcing assignment, caller-owned editing locks and editable field paths while keeping persistence in the document module.
- Removed: generic document
PUTandPATCHoperations. Instance metadata is immutable after creation, content changes use the narrow save command, and future lifecycle changes require explicit domain commands.
Platform foundations
- Documents, document types and property types are managed through a paginated REST API with filtering and search.
- The OpenAPI 3.0.3 specification is the contract. It is split across files
under
openapi/, Java interfaces and models are generated from it, and it is served at/api/api-docsand browsable at/api/swagger-ui.html. - Error responses are standardized across every endpoint, with consistent schemas and HTTP status codes.
- Each business module owns a database schema, created and versioned by Flyway.
- Development runs on an in-memory H2 database and deployment on PostgreSQL, selected by profile, with a VS Code launch configuration for both running and debugging.
Versioning Scheme
This project follows Semantic Versioning:
- MAJOR: Breaking changes
- MINOR: New features (backward compatible)
- PATCH: Bug fixes (backward compatible)
Until 1.0.0 the major number stays at 0, and each completed feature is one minor version: 0.1.0, 0.2.0, 0.3.0 and so on. A breaking change before 1.0.0 is released as a minor version too, and its entry says what a consumer must change. A fix to a version that is already released is a patch version.
Release Process
A release is a merge of develop into main. The pipeline tags it; nobody
creates a tag by hand.
- On
develop, move theUnreleasedentries under a new version heading with its date, and leaveUnreleasedin place above it. - On
develop, set the same version inpom.xmlhere and inpackage.jsoninsaphir-app(npm version <version> --no-git-tag-version, which also updatespackage-lock.json).sh tools/release-version.shprints what each repository declares. - Add the release to
CHANGELOG.mdin both repositories, from the previous release’s tag:git-cliff --config cliff.toml --tag v<version> --prepend CHANGELOG.md v<previous>..HEAD. Not a plain regeneration: the previous tag sits onmain’s merge commit, whichdevelopdoes not contain, so a plain run cannot see where the last release ended and files every earlier entry under the new version. - Merge
developintomainin both repositories. Therelease-tagjob in each pipeline creates the tagv<version>on the merge commit, and fails if that tag already exists — which means the version was not raised. - The tag starts a pipeline of its own, which builds the platform’s container image under the version’s name.
Further Reading
- API reference — companion pages to the specification
- Development guidelines — architecture and conventions
- Deployment — Keycloak and server operations