Route batches, folders and documents

Document Routing enables you to move documents and folders via script from a parent to a child batch. You can direct the parent and the child batches to any module in the defined Kofax Capture queue. The child batch inherits its settings from the parent batch. Alternatively, you can assign the child batch a different batch class and restart processing.

The functionality is defined by setting special XValues that are analyzed and applied after the Batch_Close event is fired. The XValues at the XDocInfo (document) level determine if a document is moved; the XValues at the first level XFolder (folder) determine if a folder is moved; in both cases implicitly a child batch is created. The XValues at the root XFolder level define the next module to process both parent and child batches, if the child batch is assigned to a different batch class, or the naming of the new batch.

Routing batches

Batch Routing (routing of documents) is available only with Kofax Capture Version 9 or later and is available for all modules that support scripting.

Routing folders

Routing of folders is included starting with Kofax Capture Version 9 Service Pack 1 or later and is available for all modules that support scripting.

Assigning a new batch class

Assigning different batch classes to the created child batches is available starting with Kofax Capture Version 9 service pack 2 or later and is available for all modules that support scripting.


A visual representation of the Document Routing batch event sequence.

Document Routing occurs in the following sequence:

  • After the Batch_Close event the root XFolder, the XFolders on the first level and the XDocInfos are checked for XValues.

  • For each specified child batch the marked folders with their complete substructure are routed, the routing XValues of their sub-elements (folders and documents) are ignored. Then the leftover documents marked for the actual child batch are routed. When closing the child batch, the Batch_Close event for each child batch is fired with the CloseMode parameter set to Child, after which, the child batch is routed to the designated module. If the child batch is created for a different batch class than the parent batch has, this event is skipped for performance reasons to avoid an additional project load to execute this event.

  • Finally the Batch_Close event is fired for the parent batch and is routed to the designated module. If the parent batch is empty or contains only empty folders because all documents are routed, the parent batch is deleted then the Batch_Close event is not fired.

  • All Document Routing related XValues are deleted after they are applied.