Skip to main content
Common patterns for writing a Condition activity script. Each sample reads from Context.Transaction.Documents and returns a boolean.

Checking for rule errors in a document

The script below returns true if at least one transaction document has rule errors, an undetermined document class, or suspicious symbols. Otherwise it returns false.

Checking whether manual review is required

The following script returns true — routing documents to manual review — if at least one transaction document has any of:
  • Rule errors
  • An uncertain document type
  • Suspicious fields or field characters (including nested children and repeating instances)
Otherwise it returns false and the documents continue to the export step.