How to use the Conditional Extraction step to dynamically route documents to different extractors.
This feature is not yet supported for the JSON Schema config type.
The Conditional Extraction step allows you to dynamically route documents to different extractors based on variable values available within a workflow execution, including previous step outputs, external data fetches, and run metadata that you provided. This is particularly useful when you need to apply different extraction processors based on known or extracted document characteristics.
Common use cases for conditional extraction include:
To configure the Conditional Extraction step, add it to your workflow and click the “Configure” button.
The configuration has two main sections:
First, select the variable that will determine which extractor to use. Hook up the step to previous steps to have these variables available. You can choose from:
The selected variable’s value will be used to match against your defined routes.
The variable input autocompletes with the variables from previous steps. However, to add a metadata field or an external data validation field, just type the variable name in the input field and select the variable from the dropdown.
Next, configure the routing logic by defining conditions and their corresponding extractors:
Here’s an example of how to configure conditional extraction based on a previously extracted field:
Let’s say you have a lot of insurance documents and you want to route them to different extractors based on the provider_name
field.
provider_name
field which will be available after you connect the extraction1 step:You can select the extraction1
variable from the dropdown.
Here’s an example of how to configure conditional extraction based on a metadata field:
provider_name
which you would send in your API request:How to use the Conditional Extraction step to dynamically route documents to different extractors.
This feature is not yet supported for the JSON Schema config type.
The Conditional Extraction step allows you to dynamically route documents to different extractors based on variable values available within a workflow execution, including previous step outputs, external data fetches, and run metadata that you provided. This is particularly useful when you need to apply different extraction processors based on known or extracted document characteristics.
Common use cases for conditional extraction include:
To configure the Conditional Extraction step, add it to your workflow and click the “Configure” button.
The configuration has two main sections:
First, select the variable that will determine which extractor to use. Hook up the step to previous steps to have these variables available. You can choose from:
The selected variable’s value will be used to match against your defined routes.
The variable input autocompletes with the variables from previous steps. However, to add a metadata field or an external data validation field, just type the variable name in the input field and select the variable from the dropdown.
Next, configure the routing logic by defining conditions and their corresponding extractors:
Here’s an example of how to configure conditional extraction based on a previously extracted field:
Let’s say you have a lot of insurance documents and you want to route them to different extractors based on the provider_name
field.
provider_name
field which will be available after you connect the extraction1 step:You can select the extraction1
variable from the dropdown.
Here’s an example of how to configure conditional extraction based on a metadata field:
provider_name
which you would send in your API request: