---
schema_version: "1"
id: e0ea48c5b8a296000cb51b8b8c9ca58e535cbeacd4ccba0416772d210e901872
title: OcrSampleDocument
collection: legacydeveloper
version: current
locale: en-us
portal_url: https://docs.salesforce.com/legacydeveloper/current/en-us/api_meta/meta_ocrsampledocument.md
canonical_url: https://developer.salesforce.com/docs/atlas.en-us.api_meta.meta/api_meta/meta_ocrsampledocument.htm
source_site: developer.salesforce.com
content_type: documentation
content_hash: 995b2ab5a4f7a9ddd90a404c21722d2a611963d1506fad06b787c129673fd50f
description: Represents the details of a sample document or a document type that's used as a reference while extracting and mapping information from a customer form. This type extends the Metadata metadata type and inherits its fullName field.
---
# OcrSampleDocument

Represents the details of a sample document or a document type that's used as a reference while extracting and mapping information from a customer form. This type extends the Metadata metadata type and inherits its fullName field.

![Important](https://developer.salesforce.com/docs/atlas.en-us.api_meta.meta/api_meta/images/icon_note_important.png)

#### Important

Where possible, we changed noninclusive terms to align with our company value of Equality. We maintained certain terms to avoid any effect on customer implementations.

The OcrSampleDocument type doesn’t need to represent a real sample document. It can also be an abstract document that represents all documents of the same DocumentType. In such cases, the contentAsset and documentHeight fields are null.

## File Suffix and Directory Location

OcrSampleDocument components have the suffix .ocrSampleDocument and are stored in the ocrSampleDocuments folder.

## Version

OcrTemplate components are available in API version 52.0 and later.

## Special Access Rules

To use this metadata type, your Salesforce org must have the AWSTextract1000LimitAddOn license.

## Fields

<table class="featureTable sort_table" summary="">



          <thead class="thead sorted" align="left">
            <tr>
              <th class="featureTableHeader  " id="d710578e112">Field Name</th>

              <th class="featureTableHeader  " id="d710578e115">Field Type</th>

              <th class="featureTableHeader  " id="d710578e118">Description</th>

            </tr>

          </thead>

          <tbody class="tbody">
            <tr>
              <td class="entry" headers="d710578e112" data-title="Field Name"><span class="keyword parmname">applicationType</span></td>

              <td class="entry" headers="d710578e115" data-title="Field Type">OcrApplicationType (<a class="xref" href="https://developer.salesforce.com/docs/atlas.en-us.api_meta.meta/api_meta/meta_objects_intro.htm#enumeration_title">enumeration</a> of type string)</td>

              <td class="entry" headers="d710578e118" data-title="Description">The type of application using the OCR sample document.
                <p class="p">Possible values are:</p>

                <ul class="ul bulletList">
                  <li class="li"><samp class="codeph nolang">EinsteinDocumentReader</samp></li>

                  <li class="li"><samp class="codeph nolang">Industries</samp></li>

                </ul>
              </td>

            </tr>

            <tr>
              <td class="entry" headers="d710578e112" data-title="Field Name"><span class="keyword parmname">contentAsset</span></td>

              <td class="entry" headers="d710578e115" data-title="Field Type">string</td>

              <td class="entry" headers="d710578e118" data-title="Description">The ID of the OCR sample document asset.
                <p class="p">This field is null if the OcrSampleDocument is an abstract
                  document representing the DocumentType.</p>
              </td>

            </tr>

            <tr>
              <td class="entry" headers="d710578e112" data-title="Field Name"><span class="keyword parmname">documentHeight</span></td>

              <td class="entry" headers="d710578e115" data-title="Field Type">double</td>

              <td class="entry" headers="d710578e118" data-title="Description">The normalized height of the OCR sample document page.
                <p class="p">This field is null if the OcrSampleDocument is an
                  abstract document representing the DocumentType.</p>
              </td>

            </tr>

            <tr>
              <td class="entry" headers="d710578e112" data-title="Field Name"><span class="keyword parmname">documentType</span></td>

              <td class="entry" headers="d710578e115" data-title="Field Type">string</td>

              <td class="entry" headers="d710578e118" data-title="Description">Required. The type of the OCR sample document.</td>

            </tr>

            <tr>
              <td class="entry" headers="d710578e112" data-title="Field Name"><span class="keyword parmname">masterLabel</span></td>

              <td class="entry" headers="d710578e115" data-title="Field Type">string</td>

              <td class="entry" headers="d710578e118" data-title="Description">Required. The label for the OCR sample document.</td>

            </tr>

            <tr>
              <td class="entry" headers="d710578e112" data-title="Field Name"><span class="keyword parmname">ocrSampleDocumentFields</span></td>

              <td class="entry" headers="d710578e115" data-title="Field Type">
                <a class="xref" href="#OcrSampleDocFields">OcrSampleDocumentField</a>[]
              </td>

              <td class="entry" headers="d710578e118" data-title="Description">The details of the field in a form whose value is extracted and mapped to a
                Salesforce object field.</td>

            </tr>

            <tr>
              <td class="entry" headers="d710578e112" data-title="Field Name"><span class="keyword parmname">ocrSampleDocumentPages</span></td>

              <td class="entry" headers="d710578e115" data-title="Field Type">
                <a class="xref" href="#OcrSampleDocPages">OcrSampleDocumentPage</a>[]
              </td>

              <td class="entry" headers="d710578e118" data-title="Description"><span class="ph" id="ocrsampledocpage"><a name="ocrsampledocpage"><!-- --></a>A collection of fields that define a page in the OCR
                  sample document.</span></td>

            </tr>

          </tbody>

        </table>

## OcrSampleDocumentField

Represents the details of the field in a form whose value is extracted and mapped to a Salesforce object field.

<table class="featureTable sort_table" summary="">
          <caption><span class="tablecap">Table 1. Fields</span></caption>



          <thead class="thead sorted" align="left">
            <tr>
              <th class="featureTableHeader  " id="d710578e275">Field Name</th>

              <th class="featureTableHeader  " id="d710578e278">Field Type</th>

              <th class="featureTableHeader  " id="d710578e281">Description</th>

            </tr>

          </thead>

          <tbody class="tbody">
            <tr>
              <td class="entry" headers="d710578e275" data-title="Field Name"><span class="keyword parmname">cellColumnNumber</span></td>

              <td class="entry" headers="d710578e278" data-title="Field Type">int</td>

              <td class="entry" headers="d710578e281" data-title="Description">The column number in the item with the cell storing this field’s value.
                Available in API version 56.0 and later.</td>

            </tr>

            <tr>
              <td class="entry" headers="d710578e275" data-title="Field Name"><span class="keyword parmname">cellColumnSpanValue</span></td>

              <td class="entry" headers="d710578e278" data-title="Field Type">int</td>

              <td class="entry" headers="d710578e281" data-title="Description">The number of columns that span the cell storing this field’s value. Available
                in API version 56.0 and later.</td>

            </tr>

            <tr>
              <td class="entry" headers="d710578e275" data-title="Field Name"><span class="keyword parmname">cellRowNumber</span></td>

              <td class="entry" headers="d710578e278" data-title="Field Type">int</td>

              <td class="entry" headers="d710578e281" data-title="Description">The row number in the item with the cell storing this field’s value. Available
                in API version 56.0 and later.</td>

            </tr>

            <tr>
              <td class="entry" headers="d710578e275" data-title="Field Name"><span class="keyword parmname">cellRowSpanValue</span></td>

              <td class="entry" headers="d710578e278" data-title="Field Type">int</td>

              <td class="entry" headers="d710578e281" data-title="Description">The number of rows that span the cell storing this field’s value. Available in
                API version 56.0 and later.</td>

            </tr>

            <tr>
              <td class="entry" headers="d710578e275" data-title="Field Name"><span class="keyword parmname">fieldLabelMaxX</span></td>

              <td class="entry" headers="d710578e278" data-title="Field Type">double</td>

              <td class="entry" headers="d710578e281" data-title="Description">A normalized coordinate representing the right edge of the bounding box of the
                key.</td>

            </tr>

            <tr>
              <td class="entry" headers="d710578e275" data-title="Field Name"><span class="keyword parmname">fieldLabelMaxY</span></td>

              <td class="entry" headers="d710578e278" data-title="Field Type">double</td>

              <td class="entry" headers="d710578e281" data-title="Description">A normalized coordinate representing the bottom edge of the bounding box of the
                key.</td>

            </tr>

            <tr>
              <td class="entry" headers="d710578e275" data-title="Field Name"><span class="keyword parmname">fieldLabelMinX</span></td>

              <td class="entry" headers="d710578e278" data-title="Field Type">double</td>

              <td class="entry" headers="d710578e281" data-title="Description">A normalized coordinate representing the left edge of the bounding box of the
                key.</td>

            </tr>

            <tr>
              <td class="entry" headers="d710578e275" data-title="Field Name"><span class="keyword parmname">fieldLabelMinY</span></td>

              <td class="entry" headers="d710578e278" data-title="Field Type">double</td>

              <td class="entry" headers="d710578e281" data-title="Description">A normalized coordinate representing the top edge of the bounding box of the
                key.</td>

            </tr>

            <tr>
              <td class="entry" headers="d710578e275" data-title="Field Name"><span class="keyword parmname">fieldValueName</span></td>

              <td class="entry" headers="d710578e278" data-title="Field Type">string</td>

              <td class="entry" headers="d710578e281" data-title="Description">Name of the referred field value. Available in API version 56.0 and
                later.</td>

            </tr>

            <tr>
              <td class="entry" headers="d710578e275" data-title="Field Name"><span class="keyword parmname">isAutoExtractedValue</span></td>

              <td class="entry" headers="d710578e278" data-title="Field Type">boolean</td>

              <td class="entry" headers="d710578e281" data-title="Description">Indicates whether the key is automatically extracted (<samp class="codeph nolang">true</samp>) or not (<samp class="codeph nolang">false</samp>). Available in API version 57.0 and later.
                <p class="p">This field helps to distinguish auto-extracted keys from manual ones.</p>
              </td>

            </tr>

            <tr>
              <td class="entry" headers="d710578e275" data-title="Field Name"><span class="keyword parmname">keyContent</span></td>

              <td class="entry" headers="d710578e278" data-title="Field Type">string</td>

              <td class="entry" headers="d710578e281" data-title="Description">The content in a particular area of the form, representing the field that is
                extracted by OCR.</td>

            </tr>

            <tr>
              <td class="entry" headers="d710578e275" data-title="Field Name"><span class="keyword parmname">ocrSampleDocument</span></td>

              <td class="entry" headers="d710578e278" data-title="Field Type">string</td>

              <td class="entry" headers="d710578e281" data-title="Description">Required. The associated OCR sample document used as a reference while
                extracting and mapping information from a customer form.</td>

            </tr>

            <tr>
              <td class="entry" headers="d710578e275" data-title="Field Name"><span class="keyword parmname">ocrSampleDocumentPage</span></td>

              <td class="entry" headers="d710578e278" data-title="Field Type">string</td>

              <td class="entry" headers="d710578e281" data-title="Description">A reference to a page of the OCR sample document that contains the
                key.
                <p class="p">This field is null if the OcrSampleDocument is an abstract document
                  representing the DocumentType.</p>
              </td>

            </tr>

            <tr>
              <td class="entry" headers="d710578e275" data-title="Field Name"><span class="keyword parmname">ocrSampleDocumentPageItem</span></td>

              <td class="entry" headers="d710578e278" data-title="Field Type"><a class="xref" href="https://developer.salesforce.com/docs/atlas.en-us.api_meta.meta/api_meta/meta_ocrtemplate.htm" title="Represents the details of the mapping between a form and a Salesforce object using Intelligent Form Reader. This type extends the Metadata metadata type and inherits its fullName field.">OcrTemplate</a></td>

              <td class="entry" headers="d710578e281" data-title="Description">A reference to the item on the sample document page containing this field's
                value. Available in API version 56.0 and later.</td>

            </tr>

          </tbody>

        </table>

## OcrSampleDocumentPage

Represents a collection of fields that define a page in the OCR sample document. This type exists only if the OcrSampleDocument is a real sample document and not an abstract document representing the DocumentType.

Table 2. Fields
| Field Name | Field Type | Description |
| --- | --- | --- |
| ocrSampleDocument | string | Required. The associated OCR sample document used as a reference while extracting and mapping information from a customer form. |
| ocr​Sample​Document​Page​Items | [OcrSampleDocument](# "Represents the details of a sample document or a document type that's used as a reference while extracting and mapping information from a customer form. This type extends the Metadata metadata type and inherits its fullName field.") | The collection of page items with the associated OCR sample document page. Available in API version 56.0 and later. |
| pageHeight | double | The normalized height of the OCR sample document page. |
| pageNumber | integer | Required. The page number of the page in the associated OCR sample document. |

## OcrSampleDocumentPageItem

Represents a foreign key reference to the item on the sample document page containing a value for the page item.

<table class="featureTable sort_table" summary="">
          <caption><span class="tablecap">Table 3. Fields</span></caption>



          <thead class="thead sorted" align="left">
            <tr>
              <th class="featureTableHeader  " id="d710578e626">Field Name</th>

              <th class="featureTableHeader  " id="d710578e629">Field Type</th>

              <th class="featureTableHeader  " id="d710578e632">Description</th>

            </tr>

          </thead>

          <tbody class="tbody">
            <tr>
              <td class="entry" headers="d710578e626" data-title="Field Name"><span class="keyword parmname">hasHeader</span></td>

              <td class="entry" headers="d710578e629" data-title="Field Type">boolean</td>

              <td class="entry" headers="d710578e632" data-title="Description">Indicates whether the OCR sample document page item has a header (<samp class="codeph nolang">true</samp>) or not (<samp class="codeph nolang">false</samp>). The default value is <samp class="codeph nolang">false</samp>.
                Available in API version 56.0 and later.</td>

            </tr>

            <tr>
              <td class="entry" headers="d710578e626" data-title="Field Name"><span class="keyword parmname">sequenceNumber</span></td>

              <td class="entry" headers="d710578e629" data-title="Field Type">int</td>

              <td class="entry" headers="d710578e632" data-title="Description">Required. The sequence number of the item on an OCR sample document page with
                multiple items. Available in API version 56.0 and later.</td>

            </tr>

            <tr>
              <td class="entry" headers="d710578e626" data-title="Field Name"><span class="keyword parmname">title</span></td>

              <td class="entry" headers="d710578e629" data-title="Field Type">string</td>

              <td class="entry" headers="d710578e632" data-title="Description">The title of the OCR sample document page item. Available in API version 56.0
                and later.</td>

            </tr>

            <tr>
              <td class="entry" headers="d710578e626" data-title="Field Name"><span class="keyword parmname">type</span></td>

              <td class="entry" headers="d710578e629" data-title="Field Type">ItemType (enumeration of type string)</td>

              <td class="entry" headers="d710578e632" data-title="Description">Required. Specifies the type of OCR sample document page item. Available in API
                version 56.0 and later.<p class="p">Valid value is <samp class="codeph nolang">TABLE</samp>.</p>
              </td>

            </tr>

          </tbody>

        </table>

## Declarative Metadata Sample Definition

The following is an example of a OcrSampleDocument component.

<?xml version="1.0" encoding="UTF-8"?>
<OcrSampleDocument xmlns="http://soap.sforce.com/2006/04/metadata">
   <contentAsset\>asset\_01jpeg</contentAsset\>
   <documentHeight\>1.24</documentHeight\>
   <documentType\>Form</documentType\>
   <masterLabel\>Form</masterLabel\>
   <ocrSampleDocumentFields\>
   ...<cellColumnNumber\>1</cellColumnNumber\>
      <cellColumnSpanValue\>1</cellColumnSpanValue\>
      <cellRowNumber\>1</cellRowNumber\>
      <cellRowSpanValue\>1</cellRowSpanValue\>
      <fieldLabelMaxX\>0.5975854</fieldLabelMaxX\>
      <fieldLabelMaxY\>0.46625894</fieldLabelMaxY\>
      <fieldLabelMinX\>0.5065626</fieldLabelMinX\>
      <fieldLabelMinY\>0.39605626</fieldLabelMinY\>
      <keyContent\>Last Name</keyContent\>
     <ocrSampleDocument\>image240</ocrSampleDocument\>
     <ocrSampleDocumentPage\>1</ocrSampleDocumentPage\>
     <ocrSampleDocumentPageItem\>
         <hasHeader\>false</hasHeader\>
         <sequenceNumber\>1</sequenceNumber\>
         <title\>Table1</title\>
         <type\>TABLE</type\>
     </ocrSampleDocumentPageItem\>
   </ocrSampleDocumentFields\>
   <ocrSampleDocumentPages\>
      <ocrSampleDocument\>Form</ocrSampleDocument\>
      <pageHeight\>1.0</pageHeight\>
      <pageNumber\>1</pageNumber\>
   </ocrSampleDocumentPages\>
   <ocrSampleDocumentPages\>
      <ocrSampleDocument\>Form</ocrSampleDocument\>
      <pageNumber\>2</pageNumber\>
   </ocrSampleDocumentPages\>
</OcrSampleDocument\>

The following is an example package.xml that references the previous definition.

<?xml version="1.0" encoding="UTF-8"?>
<Package xmlns="http://soap.sforce.com/2006/04/metadata">
   <types\>
      <members\>\*</members\>
      <name\>DocumentType</name\>
   </types\>
   <types\>
      <members\>\*</members\>
      <name\>ContentAsset</name\>
   </types\>
   <types\>
      <members\>\*</members\>
      <name\>OcrSampleDocument</name\>
   </types\>
   <version\>68.0</version\>
</Package\>

## Wildcard Support in the Manifest File

This metadata type supports the wildcard character \* (asterisk) in the package.xml manifest file. For information about using the manifest file, see [Deploying and Retrieving Metadata with the Zip File](https://developer.salesforce.com/docs/atlas.en-us.264.0.api_meta.meta/api_meta/file_based_zip_file.htm).