> ## 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.

# FetchingCapturedData

> Set up the FetchingCapturedData Pega activity for a multi-document case: fetch captured JSON by template name and branch to the matching data transform.

For more information about creating activities, see [Creating a Pega activity](/flexi-capture/connectors/pega/pega-activity-create).

## Pages & Classes

| **Page name** | **Class** |
| ------------- | --------- |
| Case          | Work-     |

## Parameters

| **Name**      | **Data type** | **Required** |
| ------------- | ------------- | ------------ |
| CaseId        | String        | Yes          |
| templateName  | String        | Yes          |
| jsonData      | String        | No           |
| executionMode | String        | No           |

## Steps

Step 1:

**Method**: Obj-Open-By-Handle.

**Step page**: Case.

**InstanceHandle**: Param.caseId.

<Frame>
  <img src="https://mintcdn.com/abbyy/KEmWsO92hkr7eybZ/images/flexi-capture/connectors/Pega148.png?fit=max&auto=format&n=KEmWsO92hkr7eybZ&q=85&s=edf58a44aef0a09546dfa10358449c35" alt="Screenshot of the FetchingCapturedData activity in Pega, showing Step 1 with the Obj-Open-By-Handle method on the Case step page and InstanceHandle set to Param.caseId." width="1098" height="324" data-path="images/flexi-capture/connectors/Pega148.png" />
</Frame>

Step 2:

**Method**: Property-Set

| **PropertiesName**  | **ProperiesValue**                                        |
| ------------------- | --------------------------------------------------------- |
| Param.executionMode | DESERIALIZE                                               |
| Param.jsonData      | @ABBYY.FetchingCapturedData(.BatchId, Param.templateName) |

For more information, see [FetchingCapturedData](/flexi-capture/connectors/pega/pega-func-multiple-docs#fetchingcaptureddata).

**Jump**:

| **When**                            | **if true**        | **true param** | **if false**   | **false param** |
| ----------------------------------- | ------------------ | -------------- | -------------- | --------------- |
| StepStatusFail                      | Jump to Later Step | ERR            | Continue Whens |                 |
| Param.templateName=="Invoice\_eng"  | Jump to Later Step | INVOICE        | Continue Whens |                 |
| Param.templateName=="Banking\_eng"  | Jump to Later Step | BANKING        | Continue Whens |                 |
| Param.templateName=="Contract\_eng" | Jump to Later Step | CONTRACT       | Continue Whens |                 |
| Param.templateName=="Letter\_eng"   | Jump to Later Step | LETTER         | Continue Whens |                 |
| Param.templateName=="Price\_eng"    | Jump to Later Step | PRICE          | Exit Activity  |                 |

**On exception, jump to later step label**: ERR.

<Frame>
  <img src="https://mintcdn.com/abbyy/KEmWsO92hkr7eybZ/images/flexi-capture/connectors/Pega149.png?fit=max&auto=format&n=KEmWsO92hkr7eybZ&q=85&s=28e65ccdd575fd32da470cb286bc4e45" alt="Screenshot of the FetchingCapturedData activity in Pega, showing Step 2 with the Property-Set method setting Param.executionMode to DESERIALIZE and Param.jsonData to @ABBYY.FetchingCapturedData(.BatchId, Param.templateName)." width="1105" height="247" data-path="images/flexi-capture/connectors/Pega149.png" />
</Frame>

<Frame>
  <img src="https://mintcdn.com/abbyy/KEmWsO92hkr7eybZ/images/flexi-capture/connectors/Pega150.png?fit=max&auto=format&n=KEmWsO92hkr7eybZ&q=85&s=aa466bb5c6ef65b6056e1bcf2c0ef3b9" alt="Screenshot of the Jump conditions dialog for Step 2 in Pega, showing conditions that route to label ERR on StepStatusFail and to the INVOICE, BANKING, CONTRACT, LETTER, and PRICE labels based on the value of Param.templateName." width="989" height="451" data-path="images/flexi-capture/connectors/Pega150.png" />
</Frame>

Step 3:

**Label**: INVOICE.

**Method**: Apply-DataTransform

| **Name**          | **Value**     |
| ----------------- | ------------- |
| DataTransform     | jsonToInvoice |
| PassParameterPage | true          |

For more information, see [jsonToInvoice](/flexi-capture/connectors/pega/pega-dt-many-docs#jsontoinvoice).

**Jump**:

| **When** | **if true**   | **true param** | **if false** | **false param** |
| -------- | ------------- | -------------- | ------------ | --------------- |
| true     | Exit Activity |                |              |                 |

**On exception, jump to later step label**: ERR.

<Frame>
  <img src="https://mintcdn.com/abbyy/KEmWsO92hkr7eybZ/images/flexi-capture/connectors/Pega151.png?fit=max&auto=format&n=KEmWsO92hkr7eybZ&q=85&s=201c65905a310364d529b907a47d0c80" alt="Screenshot of the FetchingCapturedData activity in Pega, showing Step 3 labeled INVOICE with the Apply-DataTransform method, the DataTransform parameter set to jsonToInvoice, and PassParameterPage selected." width="1097" height="205" data-path="images/flexi-capture/connectors/Pega151.png" />
</Frame>

<Frame>
  <img src="https://mintcdn.com/abbyy/Xgx3EG8BZs5YQjIJ/images/flexi-capture/connectors/Pega152.png?fit=max&auto=format&n=Xgx3EG8BZs5YQjIJ&q=85&s=ed5d0dc273bc37635d92f5b0ca463b89" alt="Screenshot of the Jump conditions dialog for Step 3 in Pega, showing a When condition of true set to Exit Activity, with the on-exception label set to ERR." width="991" height="276" data-path="images/flexi-capture/connectors/Pega152.png" />
</Frame>

Step 4:

**Label**: BANKING.

**Method**: Apply-DataTransform

| **Name**          | **Value**     |
| ----------------- | ------------- |
| DataTransform     | jsonToBanking |
| PassParameterPage | true          |

For more information, see [jsonToInvoice](/flexi-capture/connectors/pega/pega-dt-many-docs#jsontoinvoice).

**Jump**:

| **When** | **if true**   | **true param** | **if false** | **false param** |
| -------- | ------------- | -------------- | ------------ | --------------- |
| true     | Exit Activity |                |              |                 |

**On exception, jump to later step label**: ERR.

<Frame>
  <img src="https://mintcdn.com/abbyy/Xgx3EG8BZs5YQjIJ/images/flexi-capture/connectors/Pega153.png?fit=max&auto=format&n=Xgx3EG8BZs5YQjIJ&q=85&s=9fe6bd2c207de65ffb2044c4e0b170fa" alt="Screenshot of the FetchingCapturedData activity in Pega, showing Step 4 labeled BANKING with the Apply-DataTransform method, the DataTransform parameter set to jsonToBanking, and PassParameterPage selected." width="1101" height="198" data-path="images/flexi-capture/connectors/Pega153.png" />
</Frame>

<Frame>
  <img src="https://mintcdn.com/abbyy/Xgx3EG8BZs5YQjIJ/images/flexi-capture/connectors/Pega154.png?fit=max&auto=format&n=Xgx3EG8BZs5YQjIJ&q=85&s=92f565029dd24f1608b27687190ed15d" alt="Screenshot of the Jump conditions dialog for Step 4 in Pega, showing a When condition of true set to Exit Activity, with the on-exception label set to ERR." width="989" height="271" data-path="images/flexi-capture/connectors/Pega154.png" />
</Frame>

Step 5:

**Label**: CONTRACT.

**Method**: Apply-DataTransform

| **Name**          | **Value**      |
| ----------------- | -------------- |
| DataTransform     | jsonToContract |
| PassParameterPage | true           |

For more information, see [jsonToContract](/flexi-capture/connectors/pega/pega-dt-many-docs#jsontocontract).

**Jump**:

| **When** | **if true**   | **true param** | **if false** | **false param** |
| -------- | ------------- | -------------- | ------------ | --------------- |
| true     | Exit Activity |                |              |                 |

**On exception, jump to later step label**: ERR.

<Frame>
  <img src="https://mintcdn.com/abbyy/Xgx3EG8BZs5YQjIJ/images/flexi-capture/connectors/Pega155.png?fit=max&auto=format&n=Xgx3EG8BZs5YQjIJ&q=85&s=a7a124fb7b177d5093435acbf2c73a22" alt="Screenshot of the FetchingCapturedData activity in Pega, showing Step 5 labeled CONTRACT with the Apply-DataTransform method, the DataTransform parameter set to jsonToContract, and PassParameterPage selected." width="1109" height="210" data-path="images/flexi-capture/connectors/Pega155.png" />
</Frame>

<Frame>
  <img src="https://mintcdn.com/abbyy/Xgx3EG8BZs5YQjIJ/images/flexi-capture/connectors/Pega156.png?fit=max&auto=format&n=Xgx3EG8BZs5YQjIJ&q=85&s=2795ce2c38a5dafbf3e1db76eead3a29" alt="Screenshot of the Jump conditions dialog for Step 5 in Pega, showing a When condition of true set to Exit Activity, with the on-exception label set to ERR." width="998" height="274" data-path="images/flexi-capture/connectors/Pega156.png" />
</Frame>

Step 6:

**Label**: LETTER.

**Method**: Apply-DataTransform

| **Name**          | **Value**    |
| ----------------- | ------------ |
| DataTransform     | jsonToLetter |
| PassParameterPage | True         |

For more information, see [jsonToLetter](/flexi-capture/connectors/pega/pega-dt-many-docs#jsontoletter).

**Jump**:

| **When** | **if true**   | **true param** | **if false** | **false param** |
| -------- | ------------- | -------------- | ------------ | --------------- |
| true     | Exit Activity |                |              |                 |

**On exception, jump to later step label**: ERR.

<Frame>
  <img src="https://mintcdn.com/abbyy/Xgx3EG8BZs5YQjIJ/images/flexi-capture/connectors/Pega157.png?fit=max&auto=format&n=Xgx3EG8BZs5YQjIJ&q=85&s=a6b337ee6e900d5e953495f308008e71" alt="Screenshot of the FetchingCapturedData activity in Pega, showing Step 6 labeled LETTER with the Apply-DataTransform method, the DataTransform parameter set to jsonToLetter, and PassParameterPage selected." width="1095" height="201" data-path="images/flexi-capture/connectors/Pega157.png" />
</Frame>

<Frame>
  <img src="https://mintcdn.com/abbyy/Xgx3EG8BZs5YQjIJ/images/flexi-capture/connectors/Pega158.png?fit=max&auto=format&n=Xgx3EG8BZs5YQjIJ&q=85&s=c7d9fe5bdd3ab0464d78f11f3c8b09d5" alt="Screenshot of the Jump conditions dialog for Step 6 in Pega, showing a When condition of true set to Exit Activity, with the on-exception label set to ERR." width="994" height="285" data-path="images/flexi-capture/connectors/Pega158.png" />
</Frame>

Step 7:

**Label**: PRICE.

**Method**: Apply-DataTransform

| **Name**          | **Value**   |
| ----------------- | ----------- |
| DataTransform     | jsonToPrice |
| PassParameterPage | True        |

For more information, see [jsonToPrice](/flexi-capture/connectors/pega/pega-dt-many-docs#jsontoprice).

**Jump**:

| **When** | **if true**   | **true param** | **if false** | **false param** |
| -------- | ------------- | -------------- | ------------ | --------------- |
| true     | Exit Activity |                |              |                 |

**On exception, jump to later step label**: ERR.

<Frame>
  <img src="https://mintcdn.com/abbyy/Xgx3EG8BZs5YQjIJ/images/flexi-capture/connectors/Pega159.png?fit=max&auto=format&n=Xgx3EG8BZs5YQjIJ&q=85&s=d51f91dd559e7023aaaea8df5150fdc6" alt="Screenshot of the FetchingCapturedData activity in Pega, showing Step 7 labeled PRICE with the Apply-DataTransform method, the DataTransform parameter set to jsonToPrice, and PassParameterPage selected." width="1103" height="188" data-path="images/flexi-capture/connectors/Pega159.png" />
</Frame>

<Frame>
  <img src="https://mintcdn.com/abbyy/Xgx3EG8BZs5YQjIJ/images/flexi-capture/connectors/Pega160.png?fit=max&auto=format&n=Xgx3EG8BZs5YQjIJ&q=85&s=9880110d6d5f21129cabfb77772104ba" alt="Screenshot of the Jump conditions dialog for Step 7 in Pega, showing a When condition of true set to Exit Activity, with the on-exception label set to ERR." width="998" height="277" data-path="images/flexi-capture/connectors/Pega160.png" />
</Frame>

Step 8:

**Label**: ERR.

**Method**: Page-Set-Messages.

**Message**: @unescapeHTML(@getWorstMessageName(tools)).

For more information, see [unescapeHTML](/flexi-capture/connectors/pega/pega-func-other).

<Frame>
  <img src="https://mintcdn.com/abbyy/Xgx3EG8BZs5YQjIJ/images/flexi-capture/connectors/Pega161.png?fit=max&auto=format&n=Xgx3EG8BZs5YQjIJ&q=85&s=bb91fc2004a8297aa26a886002fc20f1" alt="Screenshot of the FetchingCapturedData activity in Pega, showing Step 8 labeled ERR with the Page-Set-Messages method and the Message parameter set to @unescapeHTML(@getWorstMessageName(tools))." width="1130" height="238" data-path="images/flexi-capture/connectors/Pega161.png" />
</Frame>
