> ## Documentation Index
> Fetch the complete documentation index at: https://docs.abbyy.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Process documents in a Pega case

> Create and run a Pega case that sends a document to ABBYY Vantage and retrieves the transaction status and extracted field results.

After you configure the case type and the connection, create a case to see how documents are processed in ABBYY Vantage.

## Create and run a case

<Steps>
  <Step title="Open the User Portal">
    In Pega Dev Studio, choose either your Pega application (**Invoices** as shown in the screenshot) or **Abbyy Vantage Sample**. Click **Launch Portal > User Portal**.

    <Frame>
      <img src="https://mintcdn.com/abbyy/sAK9EyrYIxrZ9f2p/images/vantage/developer/connectors/pega/launch-user-portal.png?fit=max&auto=format&n=sAK9EyrYIxrZ9f2p&q=85&s=90fccb6bc8130f79e4cbbd977df2e384" alt="Launch Portal menu with the User Portal option in Pega Dev Studio" width="878" height="107" data-path="images/vantage/developer/connectors/pega/launch-user-portal.png" />
    </Frame>
  </Step>

  <Step title="Create a case">
    Create a case of the case type you configured (for example, Invoice processing).

    <Frame>
      <img src="https://mintcdn.com/abbyy/sAK9EyrYIxrZ9f2p/images/vantage/developer/connectors/pega/create-case.png?fit=max&auto=format&n=sAK9EyrYIxrZ9f2p&q=85&s=db4e9450c5088260b9c2cd74dd9e05e3" alt="Creating a new Invoice processing case in the Pega User Portal" width="819" height="438" data-path="images/vantage/developer/connectors/pega/create-case.png" />
    </Frame>
  </Step>

  <Step title="Upload a document and select a skill">
    In the window that opens, upload the document image. You can use the sample images in the connector distribution archive, such as `Invoice US_1.tif`. In the **Skills** drop-down list, select **Default Process Skill**, and then click **Create**.

    <Frame>
      <img src="https://mintcdn.com/abbyy/sAK9EyrYIxrZ9f2p/images/vantage/developer/connectors/pega/new-case-skill-upload.png?fit=max&auto=format&n=sAK9EyrYIxrZ9f2p&q=85&s=d4a5e144b67d884fd12f5655ac15dcf0" alt="New Invoice processing window with the Skill Name set to Default Process Skill and Invoice US_1.tif uploaded" width="1058" height="323" data-path="images/vantage/developer/connectors/pega/new-case-skill-upload.png" />
    </Frame>
  </Step>
</Steps>

<Note>
  If you cannot get a list of skills, review [Configure a connection to ABBYY Vantage](/vantage/connectors/pega/configure-connection) to check that your connection settings are correct.
</Note>

## Get the transaction status

<Steps>
  <Step title="Open the case">
    Your new case appears with a transaction identifier and a transaction status.

    <Frame>
      <img src="https://mintcdn.com/abbyy/sAK9EyrYIxrZ9f2p/images/vantage/developer/connectors/pega/case-transaction-status.png?fit=max&auto=format&n=sAK9EyrYIxrZ9f2p&q=85&s=25beb57b9d1c16ad0e44aecc48cb97c2" alt="New Pega case showing the transaction identifier and status" width="1146" height="486" data-path="images/vantage/developer/connectors/pega/case-transaction-status.png" />
    </Frame>
  </Step>

  <Step title="Refresh on the Get Status stage">
    On the **Get Status** stage, click **Actions > Refresh**. This sends a request to get the transaction status. Wait for the transaction to be processed, and then refresh the case again.

    <Frame>
      <img src="https://mintcdn.com/abbyy/sAK9EyrYIxrZ9f2p/images/vantage/developer/connectors/pega/refresh-case.png?fit=max&auto=format&n=sAK9EyrYIxrZ9f2p&q=85&s=2004e5dfdae5aac6ff4ff054138ee38b" alt="Actions menu with the Refresh option on the Get Status stage" width="882" height="490" data-path="images/vantage/developer/connectors/pega/refresh-case.png" />
    </Frame>
  </Step>

  <Step title="Submit when the transaction is processed">
    Once the transaction reaches the **Processed** status, the **Get Status** page displays the status, a list of documents, and result files for each document. Click **Submit** to continue to the next stage.

    <Frame>
      <img src="https://mintcdn.com/abbyy/sAK9EyrYIxrZ9f2p/images/vantage/developer/connectors/pega/get-status-results.png?fit=max&auto=format&n=sAK9EyrYIxrZ9f2p&q=85&s=e965c138d0bf5a6a19868cc17c1d6f65" alt="Get Status page showing the Processed status with documents and result files" width="1136" height="539" data-path="images/vantage/developer/connectors/pega/get-status-results.png" />
    </Frame>
  </Step>
</Steps>

## Get the processing results

On the **Get Processing Results** stage, a form displays all the data extracted from your document. The form is created dynamically. To see other extracted fields, process the `BankStatement.tif` sample image in a new case.

<Frame>
  <img src="https://mintcdn.com/abbyy/sAK9EyrYIxrZ9f2p/images/vantage/developer/connectors/pega/processing-results-form.png?fit=max&auto=format&n=sAK9EyrYIxrZ9f2p&q=85&s=e9785e488daabfb458436251147f96f4" alt="Get Processing Results form showing data extracted from the document" width="1131" height="803" data-path="images/vantage/developer/connectors/pega/processing-results-form.png" />
</Frame>

The Data Transform rules parse the JSON file downloaded from ABBYY Vantage. The file with the FileType `Json` is used to get the fields.

<Note>
  The **Get Processing Results** stage displays the data extracted for the first document in a transaction only, and classification results are not shown on this stage. To work with all documents in a transaction and get classification data, set up an additional configuration.
</Note>

If needed, refresh the case again by clicking **Actions > Refresh** on the **Get Processing Results** stage. The files downloaded from ABBYY Vantage are then added to the case attachments.

<Frame>
  <img src="https://mintcdn.com/abbyy/sAK9EyrYIxrZ9f2p/images/vantage/developer/connectors/pega/case-attachments.png?fit=max&auto=format&n=sAK9EyrYIxrZ9f2p&q=85&s=4fb555acaa9b5bd871cb30a38c989e2d" alt="Pega case attachments with the files downloaded from ABBYY Vantage" width="992" height="305" data-path="images/vantage/developer/connectors/pega/case-attachments.png" />
</Frame>

If your ABBYY Vantage skill contains a Review activity, you can get a review link on the **Get Status** stage.

## Result files by skill type

The result files downloaded from ABBYY Vantage vary depending on the skill applied to the document.

| Skill                | Result file formats                                                                   |
| -------------------- | ------------------------------------------------------------------------------------- |
| Document skill       | `Json`, `FieldsJson`                                                                  |
| Classification skill | `Json`                                                                                |
| OCR skill            | `OcrJson`, `Txt`, `Xml`, `Xlsx`, `Docx`, `Pdf` (depending on skill settings)          |
| Process skill        | All enabled formats (depending on the export settings in the skill's Output activity) |

## Next steps

For the REST rules that call the ABBYY Vantage public API, see [Connect REST rules](/vantage/connectors/pega/connect-rest-rules).
