A box of mail rarely holds one kind of document. Batch split sorts the documents of a batch into groups and lets each group go its own way: invoices on to Index / Validate, credit notes to another Batch Setup, clean documents straight to export, documents with problems to an operator. Every group but one becomes a new batch, linked to the batch it came from.
There are two ways to split:
- Automatically, with a Batch split step in the workflow. DocView puts every document in a group by the rules you set.
- By hand, with Split batch on the operator screens (Quality check, Classification, Index / Validate and Verify). The operator ticks the documents that should go into a new batch.
What happens when a batch is split
- The documents of each group move to their batch with their pages, field values, page text and images. Nothing is scanned, read or extracted again unless the group goes to a step that does that.
- One group stays in the original batch. The others become new batches, called – unless you choose another name.
- Each new batch gets a copy of the batch fields, the source files its pages came from, the batch's information (such as where it came from) and its booking, so a box booked in still shows every batch made from it.
- The history of both batches says what happened: SplitInto on the original, SplitFrom on the new batch.
- Each batch is exported on its own.
- In the Batch Manager the batches show Split from and Split into with links, and the group name. Tick Split batches in the filter to list them. Search finds documents and page text in the new batches.
Deleting one batch of a split never removes images another batch still uses.
Add a Batch split step
- Open the Batch Setup and go to the Workflow tab. If the version is released, create a draft first.
- Under Add a step:, click Batch split. DocView places it after Extraction & validation.
- Set up the group rules (see below) and where each group goes.
- Click Save workflow, then release the version.
Rules for where the step can go:
- Batch split needs OCR, separation & classification before it.
- When it splits by field value or problems, it also needs Extraction & validation before it.
- A workflow can have more than one Batch split step, for example one by document type after classification and one by problems after extraction.
Note: DocView Workers run Batch split like OCR and export. If you use worker profiles that list modules, add Batch split to a profile; the DocView Workers page warns when no running DocView Worker takes it.
Group rules
The rules are checked in order, from the top. The first rule that gives a document a group decides; documents no rule matched go to the group under Documents no rule matched (called "Rest" unless you name it).
| Group by | What it does | Group name |
|---|---|---|
| Document type | Takes the document types you tick (none ticked: every type). Documents without a type never match. | Empty: each type is its own group, named after the type |
| Field value with Each value its own group | One group per value of the field, for example one batch per country | Empty: the value itself. Use {value} in a name, for example Country {value} |
| Field value with Value is in a list | Documents whose value is one of the values you list (one per line, case does not matter) | Needed |
| Field value with Value matches a pattern | Documents whose value matches a regular expression, for example ^DE |
Needed |
| Problems | Documents with problems or Documents without problems. Tick what counts as a problem: invalid values, low confidence, rejected, unclassified, needs review (none ticked: all of them) | Needed |
| Script | A short script that returns the group name of a document, or nothing to let the next rule decide | The script's answer |
Group when empty on a field rule puts documents whose field is missing or empty in a group of their own. Leave it empty to let the next rule decide.
A script sees document (number, className, classKey, classConfidence, needsReview, state, pages, invalid, lowConfidence, fields) and batch (name, priority, source, fields, documentCount, pageCount). For example:
if (document.fields.Total && Number(document.fields.Total) > 10000) { return 'Large invoices'; }
return null;
A script that fails stops the batch with the reason in the Batch Manager, and nothing is split.
Where each group goes
Every rule, and the documents no rule matched, has its own destination:
| Setting | Choices |
|---|---|
| Batch Setup | This Batch Setup, or another Batch Setup |
| Step | Next step (this Batch Setup) or First step after Scan (another one), or any later step by name, for example to skip Verify |
| Priority | 1 (highest) to 10; empty keeps the batch's priority |
| New batch name | Empty: {parent} – {group}. You can use {parent}, {group}, {n} (the number of the new batch), {date} and {setup} |
When a group goes to another Batch Setup, it uses that Batch Setup's version in use (the released version operations use). Document types are matched by their key and fields by their name, table columns by table and column name, batch fields by name. Values without a matching field are left out. Documents whose type the other Batch Setup does not have become unclassified and need review.
Which group stays in the original batch
Which group stays in this batch decides which group keeps the original batch:
- The largest group (default): the group with the most documents (then the most pages).
- The documents no rule matched.
- The group of the first rule that matched a document.
The original batch then goes where its group goes. A batch whose documents all fall into one group is not split; it simply goes where that group goes.
Documents that were never put into a document (loose pages) stay in the original batch.
Example: credit notes elsewhere, clean invoices straight to export
- Rule 1: Document type, tick Credit note, group name "Credit notes", Batch Setup "AP credit notes", First step after Scan.
- Rule 2: Problems, Documents with problems, group name "To check", step Index / Validate.
- Documents no rule matched: group name "Clean", step PDF generation & export.
- Which group stays in this batch: The documents no rule matched.
Split a batch by hand
Administrators switch the command on per step:
- On the Workflow tab, open Operations allowed in this step under a Quality check, Classification, Index / Validate or Verify step.
- Tick Split into new batch. It is off in every step until you tick it.
- Under Split into new batch: where the new batch can go, add the destinations operators may choose (a step of this Batch Setup or another Batch Setup, priority and name, as above). With none listed, the new batch goes to this Batch Setup's next step.
Delete batch is in the same list. It is ticked for Scan steps and off in every other step until you tick it, so operators in later modules cannot delete a whole batch by mistake.
Operators also need the permission Split into new batch through their role. See Users, roles and permissions.
To split a batch on an operator screen:
- Click Split batch on the ribbon.
- Tick the documents (in Quality check: the documents or pages) that should go into the new batch. The document you are on is ticked already.
- Choose where the new batch goes and, if you like, give the group a name (otherwise "Split 1", "Split 2"…).
- Click Split.
The documents leave your batch at once and you carry on with the rest. At least one page must stay in your batch. Discard changes cannot bring split-off documents back.