Metadata Route

12 minute read Last updated on July 12, 2024

Metadata Route

The Metadata Route Node routes documents according to metadata-based search rules defined by the user. With this process, you can create routing conditions using any metadata that is associated with documents in the workflow. For example, if an Advanced OCR node has been added to the workflow, you can search for any of the scanned zones that were defined. Once rules have been set up, the node routes documents based on whether or not they meet the conditions that you have specified.

This node can have the following outbound connectors:

  • Yes - If the metadata condition has been met.

  • No - If the metadata condition has not been met.

  • Error - If the document type is not supported.

To open the Metadata Route node’s configuration window, add a Metadata Route process node to your workflow and double-click on it.

Configuring the Metadata Route Node

Metadata Route Node

  • Enabled - To enable this node in the current workflow, check the box at this field. If you leave the box blank, the workflow ignores the node and documents pass through as if the node was not present. Note that a disabled node does not check for logic or error conditions.

  • Node Name - The node name defaults to this field. This name appears in the workflow below the node icon. Use this field to specify a meaningful name for the node that indicates its use in the workflow.

  • Node Description - Enter an optional description for this node. A description can help you remember the purpose of the node in the workflow or distinguish nodes from each other. If the description is long, you can hover the mouse over the field to read its entire contents.

Buttons

  • Metadata - To access the Metadata Browser window, click this button.
  • Help - To access Online Help, click this button.
  • Cancel - To exit the window without saving any changes, click this button.
  • Save - To preserve your node configuration and exit the window, click this button.

Metadata Rules

Setting Up Metadata Rules

To set up a metadata rule, do the following:

Step 1: Selecting Metadata

You can choose to use any metadata associated with documents in the workflow. When you click on the Select Metadata Key button, the Metadata Browser will appear, listing all of the metadata available, categorized by metadata type. For example, if you have created a zone in an Advanced OCR node, that zone would be listed in the pop-up window, under the OCR heading. Note that no metadata key will appear unless you have set up a metadata key in another process node in the workflow. On the Metadata Browser, you can do the following:

  • Expand the list by clicking on the + sign next to the metadata that you are interested in. For example, if you are interested in OCR metadata, click on the + sign next to OCR and the following expandable list will appear:

    Metadata Browser

  • Collapse the list by clicking on the - sign next to the appropriate metadata.

  • Choose metadata to add to the rule by clicking on the metadata and clicking on the Select button. At this point, the Metadata Browser will close and you will return to the Metadata Route window.

  • Search for metadata by entering the appropriate text string in the empty Search field on the right-hand side of the window.

Step 2: Specifying Conditions

Next, do the following:

  • Specify a Condition from the drop-down menu. Options are:

    Condition Description Allows Match case Requires Metadata Value
    Is The Metadata Key matches the Metadata Value exactly. Yes Yes
    Contains The Metadata Key contains the Metadata Value anywhere. Yes Yes
    Is Less Than The value of the Metadata Key is lower than the value entered in the Metadata Value. No Yes
    Is Less Than or Equal To The value of the Metadata Key is lower than or is the same as the value entered in the Metadata Value. No Yes
    Is Greater Than The value of the Metadata Key is higher than the value entered in the Metadata Value. No Yes
    Is Greater Than or Equal To The value of the Metadata Key is higher than or is the same as the value entered in the Metadata Value. No Yes
    Is Between The value of the Metadata Key is between the values entered in the two Metadata Value areas. The order of the two entries does not matter. No Yes
    Is Equal to Or Between The value of the Metadata Key is the same as either value or is between the values entered in the two Metadata Value areas. The order of the two entries does not matter. No Yes
    Regular expression The value of the Metadata Key fits within the parameters described by the expression or selected pattern. Yes Yes
    Exists There is a Metadata Key for the file. No No
    Has Value The metadata extracted from the Metadata Key contains any value. No No
  • Check the Not checkbox to search for the opposite of the selected Condition.

  • Check the Match case checkbox to search for the exact case of the Metadata Value entered. Note that Match case is not available for all Metadata Keys.

  • Add more conditions using the + icon, or click on the X icon to delete a condition.

In the following illustration, a rule has been set up to direct all documents that have an invoice number containing “195” to a certain folder:

Specifying Conditions

In the following illustration, a rule has been set up to direct all documents that have an invoice number NOT containing “195” to a certain folder:

Specifying Conditions

Note: The Metadata Route node rounds numbers at 16 digits when using numerical comparisons, which can impact document routing in certain circumstances. For example:

  • 21.000000000000001 (17 significant digits) will round to 21.00000000000000 (16 significant digits)

  • 21.000000000000009 (17 significant digits) will round to 21.00000000000001 (16 significant digits).

Step 3: Specifying Metadata Values from Metadata Browser

You can choose to use any metadata associated with documents in the workflow. When you click on the Metadata button, the Metadata Browser will appear, listing all of the metadata available, categorized by metadata type. On the Metadata Browser, you can do the following:

  • Expand the list by clicking on the + sign next to the metadata that you are interested in.

  • Search for metadata by entering the appropriate text string in the empty Search field on the right-hand side of the window.

  • Drag-drop metadata keys from the Metadata Browser window to the Metadata Value field.

  • Specify a page-level and/or occurrence number for the metadata reference by entering the correct syntax in the Metadata Value field.

Using Pattern Matching with Regular Expression Condition

If you choose the Regular expression condition, you can use the Pattern Matching Tool to define your regular expression. More information about Regular expressions can be found on this reference page.

Note: For more information about using the Pattern Matching Tool, see the Pattern Matching Tool section below.

Do the following:

  1. Choose Regular expression as a Condition. A Browse Patterns button will appear next to the Metadata Value field, as in the following illustration:

    Using Pattern Matching with Regular expression Condition

  2. Click on the Browse Patterns button to open the Pattern Matching Tool.

  3. Use the Pattern Matching Tool to select or create a pattern; then select the Save button. The Pattern Matching Tool will close.

  4. In the Metadata Value field, you will see the regular expression for the Pattern that you chose, as in the following illustration:

    Using Pattern Matching with Regular expression Condition

Step 4: Specifying Page Ranges For Processing

The Page Range Process area allows you to specify the range for the metadata rule.

Specifying Pages

Options include:

  • Document - Metadata associated with the file.

  • Any page - Metadata associated with any page within the file.

  • Any even page - Metadata associated with any even pages within the file.

  • Any odd page - Metadata associated with any odd pages within the file.

  • First page - Metadata associated with the first page of the file.

  • Last page - Metadata associated with the last page of the file.

  • Custom page range - Apply the rules to a custom page range. Once you choose this option, an empty field will appear to enter the page range. Do the following:

    • Specify a page range by using commas and/or dash signs counting from the start of the document. For example, to specify pages 1, 2, 5, 6, and 7, enter:

      1, 2, 5-7

    • Specify a specific sequence within a range of pages by using parentheses. For example, to specify every third page from pages 1 to 10, enter:

      1-10(3)

    • Specify the last page by using ‘end.’ For example, to specify pages 15-20 of a 20-page document, enter:

      end(-5)-end

    Note: If you specify a page range that does not correspond to the number of pages in the incoming document (e.g., processing pages 10-20 for a three-page document), then the file will go out on error.

    Click here for more examples
      To specify pages 1, 2, 5,6,7, and 19 of a 20-page document, enter: 1,2,5-7, end(-1).
    
      To specify pages 10-15 of a 20-page document, enter: 10-end(-5).
    
      To specify every other page from pages 10-15 of a 20-page document, enter: 10-end(-5)(2).
    
      To specify pages 15-20 of a 25-page document, enter: end(-10)-end(-5).
    
      To specify pages 10-20 of a 20-page document, enter: end(-10)-end.
    

Setting Up Multiple Rules

The Metadata Route node supports multiple rules. Add a new rule by selecting the (Add Rule ) icon in the upper-right hand corner of the node. When using multiple rules, they can be combined by selecting the AND and/or OR from the drop-down menu that appears on the left-hand side of any rules beyond the first, as in the following illustration:

Setting Up Multiple Rules

Note: When using multiple rules, the node processes AND rules before processing OR rules. Any rule with AND selected will combine with the row above to form a single validation event. For example, in the following illustration, the node will check to see if the metadata for zone 1 is “XY39” and if the metadata for zone 2 contains “2021”. If both are true, the document will be routed along the “Yes” path. If either of those conditions is not true, the node will check to see if the metadata for zone 1 contains “XYZ”. If it does, the document will be routed along the “Yes” path. If either of the AND rules and the OR rule is false, the document will be routed along the “No” path.

Multiple Rule Example

Pattern Matching Tool

The Pattern Matching Tool allows you to search a document for a pattern of characters, rather than a specific value. Common patterns include Social Security Numbers (SSNs), phone numbers, dates, zip codes, and credit card numbers. To use patterns in your advanced search, do the following:

  1. Choose Regular expression from the Condition drop-down list.

  2. Select the Browse Patterns button (Browse Pattern )that appears in the Metadata Value field area.

The Pattern Matching Tool opens, as in the following illustration:

Pattern Matching Tool

On the Pattern Matching Tool, groups of predefined patterns are listed in the Patterns area on the left-hand side of the window. You can do the following:

  • To view the patterns within each group, select a specific category. The patterns will appear in the content area on the right-hand side of the window. For example, Telephone Number Patterns may resemble the following illustration:

    Pattern Matching Tool

  • To add a pattern to the Metadata Route node, do the following:

    • Select a category from the Patterns list in the Pattern Matching Tool.

    • Select the pattern that you are interested in.

    • Select the Save button.

    • The Pattern Matching Tool will close and the regular expression associated with the pattern will appear in the Metadata Route node’s Metadata Value field, as in the following illustration:

      Rule 1 Properties

Creating a New Pattern

To create a new pattern, click on the + button in the Patterns area. The New Pattern window will appear, as in the following illustration:

New Pattern

Do the following:

  1. Select a group for the new pattern using the Group drop-down list. If you want to create a new group, select the Create New Group… option.

    a. If you select the Create New Group option, an empty Group Name field will appear underneath the Group drop-down list, as in the following illustration:

    New Pattern

    b. You must enter a name for the new group in the Group Name field. The new group will appear under the Patterns list.

  2. In the Name field, enter identifying text for the new pattern. This will appear in the Pattern Matching Tool window next to the newly created pattern.

  3. In the Mask field, enter the masked characters that make up the new pattern. The mask is an example pattern value that will be detected by the regular expression. For example, “XXX-XX-XXXX” is one possible mask for a Social Security Number.

  4. In the Regular expression field, enter the regular expression for the new pattern.

  5. Select the Save button when you are done.

The new pattern will then appear in the Pattern Matching Tool window, categorized under the Group that you specified.

For example, if you want to create a pattern that searches for Telephone Numbers with the following format: (1) – XXX-XXX-XXXX, you could do the following:

  1. Click the Add New Pattern icon to open the New Pattern window.

  2. Choose Telephone Number from the Group drop-down list.

  3. Enter a name for the new pattern in the Name field.

  4. Enter 1-XXX-XXX-XXXX in the Mask field

  5. Enter 1-\d{3}-\d{3}-\d{4} in the Regular expression field.

  6. Select the Save button.

Working with Patterns

Each pattern listed in the Pattern Matching Tool window includes copy, edit, and delete icons. Patterns that come standard with the application can only be copied (not edited or deleted). However, you can copy, edit, or delete patterns that you have created.

Copying Patterns

To copy patterns, click on the Copy Pattern icon next to the pattern you are interested in copying. The Copy Pattern window will appear, as in the following illustration:

Pattern Matching Tool

On this screen, you can modify the Group that the pattern is associated with, its name, mask, and regular expression. When you are done, select the Save button. A copy of the original pattern will automatically appear at the end of the list in the Pattern Matching window.

Editing Patterns

To edit a pattern that you have created, click on the Edit Pattern icon next to the pattern you are interested in editing. The Edit Pattern window will appear, as in the following illustration:

Edit Pattern

On this screen, you can change the Group that the pattern is associated with, its name, mask, and regular expression. When you are done, select the Save button. The edited pattern will automatically appear at the end of the list in the Pattern Matching window.

Deleting Patterns

To delete a pattern that you have created, click on the Delete Pattern icon next to the pattern you are interested in removing. A message will appear, asking you to confirm the delete operation.