Getting Started with Document Processing | MuleSoft Documentation
# Getting Started with Document Processing
Before you analyze documents with IDP, you must create and publish document actions, the configurable schema definitions containing the necessary instructions to process your documents.
After you publish a document action to Anypoint Exchange, you can programatically call the IDP API to execute the document action and extract data from a document. As a result, the document action analyzes the provided document and returns a response in JSON format with all the extracted fields. You can query the IDP API to check the status of an execution at any time.
## Document Actions
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.
IDP provides preconfigured **Invoice** and **Purchase Order** templates for creating custom document actions. Each template provides a set of expected fields to extract from the document into a structured response. When creating a new document action, choose the type that aligns best with the document to process. For example, the **Invoice** type can process invoices, receipts, and similar documents. If none of these types align with your documents, use the **Generic** type to fully customize the fields to extract by asking questions in natural language.
Configure document action settings to select the large language models (LLMs) to use when extracting the data, enable PII masking or image recognition. IDP supports the following models:
  * OpenAI’s `GPT-4o (gpt-4o-2024-08-06)` LLM
  * OpenAI’s `GPT-4o Mini (gpt-4o-mini-2024-07-18)` LLM
  * Google’s `GEMINI-2.0 Flash 001` LLM


After you create a document action, publish it to Anypoint Exchange to make it available for consumption from RPA and through the IDP API.
## Reviews
Document actions return a JSON response that contains the extracted fields and their detected values. Each of these values has a confidence score that determines the accuracy of the value during the extraction.
A document is queued for review if any of the following conditions is met:
  * At least one non-hidden field shows a confidence score lower than the configured threshold.
  * At least one non-hidden field marked as required is missing or could not be extracted.


After a reviewer verifies and approves the result, the execution status changes to `SUCCEEDED`. For the possible statuses and their definitions, see the Execution Status Reference.
## IDP API
You can trigger the execution of any of your published document actions to analyze the provided documents and query the results of the execution by using the IDP API. You must configure a connected app to call the IDP API.
For configuration and usage instructions, see: Processing Documents and Retrieving Results With the API.
## IDP and RPA Integration
You can execute your published document actions and query the results by using the Submit Document to MuleSoft IDP and Retrieve Results from MuleSoft IDP action steps from MuleSoft RPA. You must configure a connected app to call IDP and you must publish your document actions to make them available to RPA.
For configuration and usage instructions, see: Processing Documents and Retrieving Results With RPA.
## See Also
  * Analyzing Documents Using Pre-Built Schemas
  * Publishing Document Actions
  * Reviewing Processed Documents