Set Up Document Extraction and Routing to Human Review

Add the Extract Data from Document action to your flow, configure the document and configuration inputs, store the output, and route the extracted data to human review.

Required Editions

Available in: Lightning Experience
View supported editions.
This feature requires the MuleSoft for Flow: IDP add-on. Professional Edition requires the API access add-on. To purchase, contact your Salesforce account executive.
Document processing features require Einstein generative AI turned on in Setup, and Data 360 provisioned and enabled for your org.
MuleSoft for Flow: IDP features used with Agentforce require the Foundations or Agentforce 1 edition. To purchase these editions, contact your Salesforce account executive.
User Permissions Needed
To create, read, edit, and delete document processing configurations: Manage Document Processing Configurations
To open, edit, or create an orchestration in Flow Builder: Manage Flow
To create screen flows for human review interfaces: Manage Flow

Before you set up document extraction and routing, ensure you have:

  • A document processing configuration that extracts the data you want to review
  • Experience creating flows and orchestrations in Flow Builder
  • Business rules that define when human review applies

Choose a record-triggered, schedule-triggered, platform event-triggered, or autolaunched flow based on when the process runs. You can use the Extract Data from Document action in any of these flow types. To process multiple documents, add a Loop element and place the action inside it.

To require human review, turn on Human Review Settings in the Extract Data from Document action. The flow pauses when a review is created and resumes automatically when the reviewer submits. See Flow Core Action: Extract Data from Document.

  1. Create a flow to manage the document processing workflow, or open an existing flow.
  2. Add a flow element to start the process when relevant conditions are met.
  3. Click add element after Start and select the Extract Data from Document invocable action from the Document Processing category.
  4. Specify the Content Document ID of the document record to analyze.

    Get this ID from a record-triggered flow when a document is uploaded, from a File Upload screen component, or from a previous flow element that creates or references content documents.

  5. Select a Document Processing Configuration to use for the extraction.
    1. If you don't see any configurations, create one in the Automation App first.
    2. Choose the configuration that best matches the type of document you're processing.
  6. Configure the output variable to store the extracted data.

    Store the extracted data in a variable so you can use it later in the flow. The variable holds a dynamic Apex class with all extracted fields and values. Use the extractedData output in subsequent elements or in a Transform element to map data to your output structure.

  7. To require human review, in the Human Review Settings section of the action, select an option for Let a human review extracted data.
    • Never: The extracted data goes straight to the next element without a review.
    • Only when needed: A review is created only when one or more extracted fields or table rows fall below the confidence threshold.
    • Always: A review is created for every document.
  8. For Assigned To, select the user who reviews the extracted data.
    If you leave Assigned To blank, the review is created without an assigned reviewer.
  9. Connect the Completed path to the elements that use the reviewed data, such as a Create Records element that uses the Extracted Data output.
    When a review is created, the flow pauses at the action. A reviewer completes the review from the Human Reviews tab of the Automation app. When the reviewer submits, the flow resumes on the Completed path with the reviewed values.

Save and activate the flow. When the flow creates a review, reviewers validate and correct the extracted data in the Human Reviews tab of the Automation app. See Review Extracted Document Data.