---
schema_version: "1"
id: d5aa939150e68aa24576e1e90273c0430939ef488def5de0fa1565938b368184
title: Analyzing Documents Using Pre-Built Schemas
collection: mulesoft
version: current
locale: en-us
portal_url: https://docs.salesforce.com/mulesoft/current/en-us/idp/creating-document-actions.md
canonical_url: https://docs.mulesoft.com/idp/creating-document-actions
source_site: docs.mulesoft.com
content_type: documentation
content_hash: 5f9e77ece82468b0adbfdfda7705263d8d911b772dd8d75494e743789682d664
description: MuleSoft Documentation Site
latest: true
---
---
product: IDP
---

# Analyzing Documents Using Pre-Built Schemas

> For the full documentation index, see: https://docs.mulesoft.com/llms.txt

To analyze any type of document and fully customize the output structure instead of using pre-built
schemas, see
[Analyzing Documents With Custom User-Defined Schemas](https://docs.mulesoft.com/idp/analyzing-documents-with-einstein).

A _document action_ is a multi-step process that uses multiple AI engines to scan a document, filter
out fields, and return a structured response as a JSON object. Each document action defines the
types of documents it expects as input, the fields to extract, and the fields to filter out from the
response.

You can hide fields, mark fields as required, configure the minimum confidence score accepted for
each field to extract, and configure Prompts to enhance and refine the data-extraction process by
asking questions using natural language.

Create a document action using a predefined type as a template, and then specify the fields that are
mandatory, the fields that must be excluded from the JSON response, and the minimum confidence score
expected for each field.

After you create a new document action, you can add reviewers and publish it to Anypoint Exchange,
which enables RPA to execute the document action and also creates an API that you can call from any
external system.

> [!WARNING] Do not delete document action assets from Anypoint Exchange. Because the asset is
> discoverable, existing integrations might be using it. Deleting the asset from Exchange breaks
> those integrations and leaves an orphan document action in the IDP UI that is no longer tied to
> any Exchange asset. To retire a document action, see
> [Retire a Document Action](https://docs.mulesoft.com/idp/publishing-document-actions#retire-document-action).

When you create a document action, ensure that the configured schema works for each uploaded
document. If you can’t customize the schema to work with all sample documents, consider creating
multiple document actions. For example, purchase orders from multiple vendors might be different
enough to require a separate document action for each vendor.

Creating a document action with a pre-built schema requires the following tasks:

1.  [Upload Sample Files and Preview the Results](#upload-files)

2.  [Configure the Schema for the Extraction](#configure-schema)

    Unless you select the Generic document action, which doesn’t use a schema.

3.  [Add Prompts to Refine the Result](#add-prompts)

Processing documents consumes Automation Credits. IDP charges Automation Credits per execution,
based on the number of pages in the submitted document, regardless of whether the document was
previously processed. See
[Automation Credits Usage and Rates](https://docs.mulesoft.com/general/automation-credits-usage-and-rates) for details.

> [!IMPORTANT] Resubmitting the same document, retrying a failed or partially failed execution, and
> reprocessing a document all create a new execution. Each of these executions consumes Automation
> Credits in full. IDP doesn’t deduplicate submissions or discount credits for documents that were
> already processed.

## Before You Begin Creating Document Actions

Ensure you have any of the following Anypoint permissions:

Manage Actions

Gives a user complete access to IDP and assigns reviewer permission by default for every document
action.

Build Actions

Enables a user to create, edit, publish, and execute document actions and assign reviewers to the
actions.

## Upload Sample Files and Preview the Results

To start creating a new document action, upload sample files to test the extraction process:

1.  In the sidebar, click **Document Actions**.

2.  Click **Create New**.

3.  Select the type of document to use as a template, specify a name for your document action, and
    click **Create**.

4.  Click **Select files** and upload sample files to analyze.

    You can upload up to 10 files with a size limit of 8 MB per file.

5.  Click **Run** to analyze the files and get a preview of the results.

The document action editor shows a preview of the analyzed document that you can zoom in and out for
better visibility. Navigate the different pages of the document using the **Previous** (**<**) and
**Next** (**\>**) buttons. Switching pages updates the extracted values shown in the **Outputs**
section.

IDP highlights fields in yellow when the extracted values have a confidence score below the
configured threshold.

After uploading the sample files, configure the schema.

## Configure the Schema for the Extraction

If you are creating a Generic document action, skip this step as there’s no schema to configure.
Instead, use prompts to extract the data from your documents.

Configure the schema by selecting fields to hide from the response, fields that are required, and
the minimum confidence score accepted for each field:

1.  In the **Outputs** section, click **Fields** and select any of the extracted field names to
    configure the following settings:

    - **Visibility**: defines if this field shows in the output JSON result. Click **Visibility**
      (![2%](/mulesoft/current/en-us/idp/_images/visibility-icon.png)) to hide this field.

    - **Threshold**: the minimum required confidence score accepted for this field. If the returned
      **Confidence** value is below the threshold, the document is queued for human review.

      See [Confidence Scores by Model](https://docs.mulesoft.com/idp/supported-models#confidence-scores) for details about using
      models with self-reported confidence scores.

    - **Required**: select this option to send the document to review if the field is missing or
      can’t be extracted.

    You can click **Focus** (![2%](/mulesoft/current/en-us/idp/_images/focus-icon.png)) to center the preview in the
    corresponding field.

2.  If your document contains tables, click **Tables** to configure the extraction settings for the
    table columns.

After configuring the schema, add Prompts to your document action.

## Add Prompts to Refine the Result

Add Prompts to refine the results of the extraction by asking questions about the document using
natural language:

1.  In the **Outputs** panel, click **Prompts**.

2.  Click **Add New**.

3.  Configure the required details:

    - **Name**: a unique name for the query.

    - **Instruction**: a unique question or request in English, using natural language.

      > [!WARNING] Prompts don’t support special characters. Ensure you use alphanumeric characters
      > when writing your prompts. This limitation doesn’t apply to documents, which can contain any
      > type of characters or symbols.

    - **Required**: select this option to send the document to review if the question can’t be
      answered.

    - **Confidence Threshold**: the minimum accepted value to prevent the document from getting
      queued for review.

4.  Click **Add**.

5.  Click **Run** to analyze the document again and see the results of the prompts.

6.  Click **Save**.

### Enhance Data Extraction with Einstein

By default, IDP uses its natural language processing model (IDP NLP) to extract data based on the
configured prompts. When you create a document action, you can select Einstein to analyze the
document and extract the data.

Use Einstein to answer complex questions about the document, such as asking the total of an invoice
after deducting taxes and other concepts, or to extract data from non-standard documents such as a
driver’s license or a medical record that contains handwriting.

To improve data extraction using Einstein to answer your prompts, see
[Enhancing Data Extraction with Einstein](https://docs.mulesoft.com/idp/enhancing-data-extraction-with-einstein).

## Configure Document Action Settings

After you create a document action, click **Settings** to configure it. The available settings
depend on when you created the document action:

<table><colgroup><col> <col> <col> <col></colgroup><thead><tr><th>Setting</th><th>Description</th><th>Available From</th><th>Considerations</th></tr></thead><tbody><tr><td><div><div><p><strong>Location callouts</strong></p></div></div></td><td><div><div><p>Show a bounding box around the analyzed value in the document preview.</p></div></div></td><td><div><div><p>March 10th, 2026</p></div></div></td><td><div><div><ul><li><p>Available for Generic document actions with customized schemas.</p></li><li><p>Supported only for Gemini models with Multimodal enabled in the document action.</p></li><li><p>When enabled, confidence score for the field reflects extraction and label geometry.</p></li><li><p>Location callouts support a maximum of 40 fields, including table cells. Each table cell counts as a field. Enable this feature if your document action contains 40 or fewer fields and table cells combined.</p></li><li><p>For the best experience with location callouts, treat every field and table item as a single entity that returns a single value, rather than multiple values or JSON.</p></li></ul></div></div></td></tr><tr><td><div><div><p><strong>Multimodal</strong></p></div></div></td><td><div><div><p>Enables the model to read and interpret images within documents.</p></div></div></td><td><div><div><p>May 8th, 2025</p></div></div></td><td><div><div><ul><li><p>Cannot be used simultaneously with PII masking.</p></li><li><p>Accuracy of checkbox processing varies by model depending on form complexity.</p><div><p>See <a href="https://docs.mulesoft.com/idp/supported-models">Supported Models</a> for more information about how each model performs when processing checkboxes.</p></div></li></ul></div></div></td></tr><tr><td><div><div><p><strong>Model</strong></p></div></div></td><td><div><div><p>Select the predictive large language model (LLM) to use when executing this document action.</p></div></div></td><td><div><div><p>February 5th, 2025</p></div></div></td><td><div><div><p>Choose the model that best fits your document processing needs. See <a href="https://docs.mulesoft.com/idp/supported-models">Supported Models</a> for additional details about each model.</p></div></div></td></tr><tr><td><div><div><p><strong>PII Masking</strong></p></div></div></td><td><div><div><p>Mask personally identifiable information from your documents before sending them to the predictive model.</p></div></div></td><td><div><div><p>February 5th, 2025</p></div></div></td><td><div><div><ul><li><p>Salesforce Organization Preferences override this setting.</p></li><li><p>Reduces character limit to 120,000 per request.</p><div><p>See <a href="https://docs.mulesoft.com/idp/quotas-and-limits#prompt-limits">Prompt Limits</a> for additional details.</p></div></li><li><p>Cannot be used simultaneously with Image Recognition.</p></li><li><p>For more information, see <a href="https://help.salesforce.com/s/articleView?id=ai.generative_ai_trust_layer.htm&amp;type=5">Einstein Trust Layer</a>.</p></li></ul></div></div></td></tr></tbody></table>

> [!NOTE] To access all new features, create a new document action.

## See Also

- [Adding Reviewers](https://docs.mulesoft.com/idp/adding-reviewers)

- [Publishing Document Actions](https://docs.mulesoft.com/idp/publishing-document-actions)

- [RPA Overview](https://docs.mulesoft.com/rpa-home/)

- [Analyzing Documents With Custom User-Defined Schemas](https://docs.mulesoft.com/idp/analyzing-documents-with-einstein)
