Note: This release is in preview. Features described here don’t become generally available until the latest general availability date that Salesforce announces for this release. Before then, and where features are noted as beta, pilot, or developer preview, we can’t guarantee general availability within any particular time frame or at all. Make your purchase decisions only on the basis of generally available products and features.

Fetch Active OCR Templates Action

Fetch all the active OCR templates in an org.

Use this action to automate OCR template selection for the text extracted from an uploaded document.

Special Access Rules

This action is available in API version 58.0 and later for users with the AWSTextract1000LimitAddOn or IntelligentDocumentReaderAddOn license.

Supported REST HTTP Methods

URI
/services/data/vXX.X/actions/standard/fetchActiveOcrTemplates
Formats
JSON, XML
HTTP Methods
POST
Authentication
Authorization: Bearer token

Inputs

Input Details
documentTypeId
Type
string
Description
Optional. The ID of the document type associated with the OCR template.

You can specify up to 20 document type IDs.

Note

targetObjects
Type
string
Description
Optional. The comma-separated list of target object API names associated with the OCR template.

Outputs

Output Details
ocrTemplates
Type
string
Description
The comma-separated list of OCR template records that match the specified document type ID and target objects.

Example

Sample Request

1{
2   "inputs":[
3      {
4         "documentTypeId":"0deT10000004CCbIAM,0ghT11000004CCbIF",
5         "targetObjects":"Account,Contact"
6      }
7   ]
8}

Sample Response

1[
2   {
3      "actionName":"fetchActiveOcrTemplates",
4      "errors":null,
5      "isSuccess":true,
6      "outputValues":{
7         "ocrTemplates":{
8            "ocrTemplates":[
9               {
10                  "ocrTemplateId":"48tT1000000004IIAQ",
11                  "ocrTargetObjects":[
12                     {
13                        "targetObjectRecordType":null,
14                        "targetObject":"Account",
15                        "ocrTargetObjectId":"97hT100000000HjIAI"
16                     },
17                     {
18                        "targetObjectRecordType":null,
19                        "targetObject":"CareDiagnosis",
20                        "ocrTargetObjectId":"97hT100000000HoIAI"
21                     }
22                  ],
23                  "name":"bb",
24                  "documentTypeId":"0deT10000004CCbIAM",
25                  "developerName":"bb"
26               },
27               {
28                  "ocrTemplateId":"48tT10000004CF1IAM",
29                  "ocrTargetObjects":[
30                     {
31                        "targetObjectRecordType":null,
32                        "targetObject":"Account",
33                        "ocrTargetObjectId":"97hT10000004CelIAE"
34                     }
35                  ],
36                  "name":"scrlicense",
37                  "documentTypeId":"0deT10000004CCbIAM",
38                  "developerName":"scrlicense"
39               },
40               {
41                  "ocrTemplateId":"48tT1000000004NIAQ",
42                  "ocrTargetObjects":[
43                     {
44                        "targetObjectRecordType":null,
45                        "targetObject":"Contact",
46                        "ocrTargetObjectId":"97hT100000000HtIAI"
47                     }
48                  ],
49                  "name":"bb2",
50                  "documentTypeId":"0ghT11000004CCbIF",
51                  "developerName":"bb2"
52               }
53            ]
54         }
55      },
56      "version":1
57   }
58]