---
schema_version: "1"
id: 85d098878e9da7de14d0267f76bf6e530501249c1686c4812c471b5df071fdb7
title: Review Contract Data and Update Records Example
collection: admin
version: current
locale: en-us
portal_url: https://docs.salesforce.com/admin/current/en-us/platform/264-0-0/automate_flow_task_example_contract_review_hitl.md
canonical_url: https://help.salesforce.com/s/articleView?id=platform.automate_flow_task_example_contract_review_hitl.htm&release=264.0.0&type=5
source_site: help.salesforce.com
content_type: documentation
content_hash: d927e58100dd656f66556e03b0cf5a7210f7c2ee683510ce75197bc195e69754
description: This example walks through a screen flow where a sales operations analyst reviews extracted contract data, corrects low-confidence values, then updates Contract and Opportunity records.
products:
  - Flow Builder
  - Salesforce Platform
release: "264"
---
# Review Contract Data and Update Records Example

This example walks through a screen flow where a sales operations analyst reviews extracted contract data, corrects low-confidence values, then updates Contract and Opportunity records.

### Required Editions

<table class="slds-table slds-table_bordered slds-max-medium-table_stacked slds-m-bottom_small edition"><colgroup><col></colgroup><tbody><tr class=""><td class="slds-cell-wrap" style="vertical-align:top;">Available in: Lightning Experience</td></tr><tr class=""><td class="slds-cell-wrap" style="vertical-align:top;"><a href="https://help.salesforce.com/s/articleView?id=platform.flow_ref_supported_editions.htm&amp;release=264.0.0&amp;type=5" title="Learn about the editions and user interfaces that support Flow Builder. Some Flow Builder features integrate with other Salesforce products that require additional licenses.">View supported editions.</a></td></tr><tr class=""><td class="slds-cell-wrap" style="vertical-align:top;">This feature requires the MuleSoft for Flow: IDP add-on. <strong>Professional</strong> Edition requires the API access add-on. To purchase, contact your Salesforce account executive.</td></tr><tr class=""><td class="slds-cell-wrap" style="vertical-align:top;">Document processing features require <a href="https://help.salesforce.com/s/articleView?id=ai.generative_ai_enable.htm&amp;type=5&amp;language=en_US" target="_blank">Einstein generative AI</a> turned on in Setup, and Data 360 provisioned and enabled for your org.</td></tr><tr class=""><td class="slds-cell-wrap" style="vertical-align:top;">MuleSoft for Flow: IDP features used with Agentforce require the Foundations or Agentforce 1 edition. To purchase these editions, contact your Salesforce account executive.</td></tr></tbody></table>

<table class="slds-table slds-table_bordered slds-max-medium-table_stacked slds-m-bottom_small permission">
        <colgroup>
          <col style="width:50%">
          <col style="width:50%">
        </colgroup>
        <thead class="slds-text-title_caps ">
          <tr class="">
            <th scope="colgroup" class="slds-cell-wrap" colspan="2" style="text-align:center;vertical-align:top;" id="d277893e88">User Permissions
              Needed</th>
          </tr>
        </thead>
        <tbody>
          <tr class="">
            <td data-label="User Permissions Needed" class="slds-cell-wrap" style="vertical-align:top;" headers="d277893e88 ">To create, read, edit, and delete document processing
              configurations:</td>

            <td class="slds-cell-wrap" style="vertical-align:top;" headers="d277893e88 ">Manage Document Processing Configurations</td>

          </tr>
          <tr class="">
            <td data-label="User Permissions Needed" class="slds-cell-wrap" style="vertical-align:top;" headers="d277893e88 ">To open, edit, or create an orchestration in Flow
              Builder:</td>

            <td class="slds-cell-wrap" style="vertical-align:top;" headers="d277893e88 ">Manage Flow</td>

          </tr>
          <tr class="">
            <td data-label="User Permissions Needed" class="slds-cell-wrap" style="vertical-align:top;" headers="d277893e88 ">To create screen flows for human review
              interfaces:</td>

            <td class="slds-cell-wrap" style="vertical-align:top;" headers="d277893e88 ">Manage Flow</td>

          </tr>
        </tbody>
      </table>

A sales operations analyst manually reviews contracts and populates Salesforce records with agreement date, amount, and account name. This example automates that process with a human-in-the-loop step: the flow extracts data from an uploaded contract, shows a review screen where the analyst can view and edit low-confidence values, then updates the Contract record and validates the amount against an Opportunity record. If the amounts match, the flow checks a validated box on the Opportunity and updates the contract number. Extraction and review run on the same flow path, so Content Document ID and Document Processing Configuration ID auto-populate.

For a scenario where a user attaches a document to a record and reviews in the Approvals experience via an orchestration, see [Process and Review Attached Documents Example](https://help.salesforce.com/s/articleView?id=platform.automate_flow_task_example_record_triggered_attachment_hitl.htm&release=264.0.0&type=5 "This example walks through a record-triggered flow that runs when a user attaches a document to a record. The flow extracts data, routes to an approval action and flow orchestration, then to a screen flow where the user reviews and corrects extracted values before the flow updates the record.").

Before you build this example:

- Create a document processing configuration that extracts contract fields (for example, agreement date, total amount, contract number, account name). See [Define What Data to Extract from Your Documents](https://help.salesforce.com/s/articleView?id=platform.automate_flow_task_define_data_extraction.htm&release=264.0.0&type=5 "Document Processing Configurations define the structure and rules for extracting data from your documents. By creating these configurations, you define what information to look for and how to organize the extracted data. This step is essential before you can process documents in your flows or set up review workflows.").
- Ensure you have Contract and Opportunity objects with the fields you want to update (for example, agreement date, total amount, contract number, and a validated checkbox on Opportunity).
- Understand the pipeline pattern. See [Extracting Data from Digital and Scanned Documents](https://help.salesforce.com/s/articleView?id=platform.automate_flow_concepts_document_processing.htm&release=264.0.0&type=5 "Extract structured data from invoices, purchase orders, forms, and other unstructured or semi-structured documents using AI-powered analysis in Flow. Automate data entry and processing workflows by converting document content into structured information that can be used in your business processes. Use human review workflows to validate extracted data and ensure accuracy for critical business decisions.").

1. Open the Flows list view.
    
    - From the Automation app, select the **Flows** tab.
    - From the **Flows** tab in any Lightning app, click the actions menu and select **Open Flow**.
    - From Setup, in the Quick Find box, enter Flows, and then select **Flows**.
    
    Note that the Automation app and Flows tab options don't require Setup access.
2. Create a screen flow.
    - From the Automation app, click **New** | **Screen** | **Screen Flow**.
    - From Setup, click **New Flow** | **Screen** | **Screen Flow**.
3. Add a Screen element as the start and add the File Upload screen input component so users can upload a document (or add another trigger that provides a Content Document ID).
    
    For multiple files, add a Loop element and place the extraction and review steps inside the loop.
4. Add the Extract Data from Document action and configure it.
    
    1. Set Content Document ID to the document from your trigger or screen (for example, from the file upload).
    2. Set Document Processing Configuration to your contract extraction configuration.
    
    The action outputs Content Document ID, Document Processing Configuration ID, and Extracted Data. See [Flow Core Action: Extract Data from Document](https://help.salesforce.com/s/articleView?id=platform.automate_flow_ref_elements_actions_extract_data_from_document.htm&release=264.0.0&type=5 "Extract structured data from documents using AI-powered analysis, with optional human review before the flow continues.").
5. Add a Decision element to route to the review screen when your conditions require human review.
    
    1. Define outcomes based on confidence scores, field values, or business rules (for example, if contract number confidence is below a threshold, go to review).
    2. For each field you want to evaluate, you can add a separate outcome or condition. Today you set the threshold in the flow; a future enhancement may provide a single review-required output from the extraction action with the threshold set in the schema editor.
    
    See [Flow Element: Decision](https://help.salesforce.com/s/articleView?id=platform.flow_ref_elements_decision.htm&release=264.0.0&type=5 "Evaluate a set of conditions, and route users through the flow based on the outcomes of those conditions. This element performs the equivalent of an if-then statement.").
6. On the outcome path that requires review, add a Screen element and add the Review Extracted Data component.
    
    1. For Extracted Data, pass the Extract Data output from the Extract Data from Document action.
    2. Leave Content Document ID and Document Processing Configuration ID unset; they auto-populate when the component is on the same flow path as the extraction action.
    
    The review screen shows all extracted fields and tables; low-confidence values appear in red. Reviewers can edit values and submit. See [Review Extracted Data Screen Component](https://help.salesforce.com/s/articleView?id=platform.automate_flow_ref_screencmp_review_extracted_data.htm&release=264.0.0&type=5 "Review and modify data returned by the Extract Data from Document action.").
7. After the review screen, add an Update Records element to update the Contract record.
    1. Identify the record to update (for example, by record ID from the flow context).
    2. Set field values from the Review Extracted Data component’s Modified Data output (for example, agreement date, total amount, contract number).
8. Add a Decision element to check whether the contract amount matches the Opportunity amount.
    1. Compare the amount from Modified Data to the amount on the related Opportunity record.
    2. If the amounts match, route to an outcome that updates the Opportunity (for example, check a validated box and set the contract number).
9. Add an Update Records element on the match outcome to update the Opportunity record (validated checkbox and contract number).
10. Save and activate the flow. Run it with a sample contract to verify extraction, review, and record updates.