7.3 Intelligent Document Reader (OCR with Amazon Textract) & eSignature Integration
Key Takeaways
- Intelligent Document Reader (IDR) — the Public Sector build of Intelligent Form Reader — is a paid add-on that performs optical character recognition (OCR) through Amazon Textract running in the agency's own AWS account, reached over an external + named credential.
- Enablement is a seven-step chain: buy the add-on license, create the AWS account and an IAM user with Amazon Textract permissions, build the external and named credential, then choose "Use Your Own AWS Account" in Setup and select that credential.
- Document Form Templates map extracted key-value pairs (e.g., driver license numbers, tax IDs, birthdates, annual wages) directly to target Salesforce objects including IndividualApplication, Contact, Account, and custom records.
- Field-level confidence scores decide the routing: extractions at or above the agency's Straight-Through Processing (STP) threshold (typically 90%) commit automatically and mark the DocumentChecklistItem Accepted, while anything below it drops into the Human-in-the-Loop (HITL) Service Console workspace with side-by-side bounding boxes for caseworker correction.
- Integrated electronic signature solutions (e.g., DocuSign, Adobe Sign) orchestrate multi-party legal authorizations, envelope routing, digital certificate validation, and automated storage of executed, tamper-evident PDFs as ContentDocuments.
7.3 Intelligent Document Reader (OCR with Amazon Textract) & eSignature Integration
Exam Focus: Public sector agencies face crushing backlogs when caseworkers must manually re-type constituent data from scanned paper forms, identity cards, and tax documents into Salesforce records. On the AP-222 exam, candidates must understand the architecture of Intelligent Document Reader (IDR) — the Public Sector Solutions build of Intelligent Form Reader — which is powered by Amazon Textract running in the agency's own AWS account, the enablement prerequisites, the configuration of Document Form Templates, confidence scoring rules for Straight-Through Processing (STP) versus Human-in-the-Loop (HITL) verification, and the end-to-end integration of electronic signature platforms (such as DocuSign) to execute and archive legally binding public agreements.
Intelligent Document Reader (IDR): Architecture & Native OCR Engine
Modern public programs require applicants to submit physical or scanned documents to substantiate eligibility claims—such as Form W-2 for income verification, state driver licenses for identity verification, or utility bills for residency proof. In traditional implementations, caseworkers spent up to 40% of their workday manually transcribing data from PDFs into database fields, introducing human data entry errors and delaying benefit distribution.
Intelligent Document Reader (IDR) — the same engine Salesforce ships to other industry clouds as Intelligent Form Reader (IFR) — eliminates manual transcription by providing an optical character recognition (OCR) and machine learning extraction pipeline wired into Salesforce Public Sector Solutions. It is a paid add-on license, and Salesforce does not resell the OCR compute: the agency brings its own Amazon Web Services (AWS) account and Salesforce calls Amazon Textract through a named credential the admin configures.
┌─────────────────────────────────────────────────────────────────────────────┐
│ Intelligent Document Reader Engine │
├─────────────────────────────────────────────────────────────────────────────┤
│ 1. Ingestion: Constituent uploads PDF / JPEG / PNG to DocumentChecklistItem│
│ 2. OCR Processing: Salesforce calls Amazon Textract via a Named Credential │
│ • Agency supplies its OWN AWS account + IAM user with Textract perms │
│ • Textract usage is billed to the agency's AWS account, not Salesforce │
│ 3. Feature Extraction: Key-Value Pairs, Form Fields, and Relational Tables │
│ 4. Confidence Scoring: Field-level confidence scores calculated (0 - 100%) │
└──────────────────────────────────────┬──────────────────────────────────────┘
│
Does extraction meet STP Threshold?
/ \
/ \
Confidence >= 90% Confidence < 90%
/ \
▼ ▼
┌───────────────────────────────────────┐ ┌───────────────────────────────────┐
│ Straight-Through Processing (STP) │ │ Human-in-the-Loop (HITL) Workspace│
│ • Automated record field updates │ │ • Side-by-side visual viewer │
│ • Zero caseworker manual intervention│ │ • Bounding box validation │
│ • Advances case to next stage │ │ • Caseworker manual verification │
└───────────────────────────────────────┘ └───────────────────────────────────┘
Amazon Textract Integration — and the Prerequisite Everybody Gets Wrong
Behind the scenes, Intelligent Document Reader leverages Amazon Textract, a machine learning service from Amazon Web Services (AWS) that extracts text, handwriting, tables, and structured form data. The single most commonly missed AP-222 fact is who owns the AWS side of that call:
Bring Your Own AWS Account. Salesforce does not host Textract on the agency's behalf. Per Salesforce Help, the setup screen literally offers "Use Your Own AWS Account", and the documented prerequisite is that the agency creates an AWS account, creates an Identity and Access Management (IAM) user, assigns that user Amazon Textract permissions, and then wires it to Salesforce through an External Credential + Named Credential pair. Textract API consumption is billed to the agency's AWS account.
The complete enablement chain an architect must scope into the project plan:
| # | Prerequisite Step | Owner | Notes |
|---|---|---|---|
| 1 | Purchase the Intelligent Document Reader add-on license | Agency + Salesforce AE | Not included in the base PSS license; it is an extra-cost add-on |
| 2 | Create an AWS account | Agency cloud team | Procurement lead time is real — start early on government contracts |
| 3 | Create an IAM user and attach Amazon Textract permissions | Agency cloud team | Least-privilege: Textract only |
| 4 | Create an External Credential and Named Credential in Salesforce Setup | Salesforce admin | Authenticates the callout to AWS |
| 5 | Setup → Intelligent Document Reader → Use Your Own AWS Account, accept the terms, select the named credential | Salesforce admin | This is the step that turns the feature on |
| 6 | Optionally enable Amazon Textract AnalyzeID (identity documents) and Textract Tables (tabular data) | Salesforce admin | Separate toggles, each mapping to a distinct Textract API |
| 7 | Grant users CRUD on the document-processing objects and enable image preview | Salesforce admin | Document Checklist Item permissions inherit from the parent record |
Other architecture facts worth carrying into the exam:
- Distinct Textract APIs:
AnalyzeDocumenthandles general forms, AnalyzeID is the API used for identity documents (driver licenses, passports), and Analyze Document Tables extracts tabular structures. Each is enabled separately in Setup, so a scenario that says "we also need the line items off the invoice" is pointing at the Tables toggle. - Multi-Modal Document Extraction: IDR extracts both printed text and complex tabular data (such as itemized line items on a commercial invoice or municipal tax bill), identifying structural relationships between headers, keys, and values.
- Common Document Categories: Agencies typically template government-issued photo IDs (driver licenses, passports), tax documents (W-2, 1040, 1099), pay stubs, bank statements, and standardized agency enrollment applications.
- Government Cloud caveat: because the OCR callout leaves the Salesforce boundary for the agency's AWS account, an agency operating in Government Cloud or Government Cloud Plus must confirm the AWS region and account it uses carries the authorization its data classification demands. Do not assume the callout inherits Salesforce's FedRAMP boundary — it does not.
Form Template Mapping & Target Field Architecture
To translate raw extracted OCR text into actionable CRM records, administrators configure Document Form Templates in Salesforce Setup.
1. Document Form Template Setup
- With the feature enabled against the agency's named credential, the administrator navigates to Intelligent Document Reader in Setup and creates a document type, then a template for that document type.
- The template is associated with a specific
DocumentType(e.g.,State_Driver_LicenseorForm_W2_Wage_Statement). - An agency-representative sample document (PDF or image) is uploaded to serve as the structural baseline.
- Textract analyzes the sample document and exposes all detected key-value pairs in a visual mapping interface.
2. Mapping to Target Objects and Fields
Administrators map the detected source fields directly to standard or custom Salesforce object fields:
| Document Category | Extracted Form Field (Source Key) | Target Salesforce Object & Field |
|---|---|---|
| State Driver License | First Name + Last Name | Contact.FirstName, Contact.LastName |
| State Driver License | License Number | IndividualApplication.Driver_License_Number__c |
| State Driver License | Date of Birth | Contact.Birthdate |
| State Driver License | Expiration Date | DocumentChecklistItem.ExpirationDate__c |
| Form W-2 (Wage Statement) | Employer Identification Number (EIN) | Account.FederalTaxIdentifier |
| Form W-2 (Wage Statement) | Wages, Tips, Other Compensation (Box 1) | Income__c.Annual_Taxable_Income__c |
| Form W-2 (Wage Statement) | Social Security Wages (Box 3) | Income__c.FICA_Wages__c |
3. Data Transformation & Normalization
Extracted OCR data often requires cleansing before database insertion. IDR mapping configurations support data transformation rules:
- Date Formatting: Normalizes various textual date representations (e.g., "OCT 14 1988", "10/14/88", "1988-10-14") into standard Salesforce ISO date format (
YYYY-MM-DD). - Currency & Numeric Parsing: Strips currency symbols (
$), commas, and whitespace from monetary values, casting them into numeric decimal values. - String Cleansing: Automatically trims leading and trailing whitespace and enforces uppercase or proper-case capitalization.
Confidence Scoring, Straight-Through Processing (STP) & Human-in-the-Loop Workspaces
OCR accuracy is inherently probabilistic; degraded photocopies, folded paper creases, coffee stains, or handwritten notes can lead to misinterpretations. Public Sector Solutions balances automation speed with regulatory accuracy through Confidence Scoring and Human-in-the-Loop (HITL) workspaces.
┌─────────────────────────────────────────────────────────────────────────────┐
│ Human-in-the-Loop (HITL) Service Console Workspace │
├──────────────────────────────────────┬──────────────────────────────────────┤
│ Original Document Image (Left) │ Salesforce Field Mapping (Right) │
│ │ │
│ ┌────────────────────────────────┐ │ Target Object: IndividualApplication│
│ │ DRIVER LICENSE │ │ │
│ │ ┌───────────────────────────┐ │ │ First Name: [ Marcus ] (99%) │
│ │ │ LN: WASHINGTON │ │ │ Last Name: [ Washington ] (98%) │
│ │ │ FN: MARCUS │ │ │ │
│ │ │ LIC#: D8839201 │ │ │ License No: [ D8839201 ] (96%) │
│ │ │ DOB: 05/12/1984 │ │ │ │
│ │ │ EXP: 05/12/2028 │ │ │ DOB: [ 1984-05-12 ] (94%) │
│ │ └───────────────────────────┘ │ │ │
│ │ [ Blue Bounding Boxes Active ] │ │ [! LOW CONFIDENCE ALERT !] │
│ └────────────────────────────────┘ │ Exp Date: [ 2028-05-12 ] (72%) │
│ │ * Caseworker manually verifies box *│
│ │ │
│ │ [ Reject File ] [ Save & Verify ] │
└──────────────────────────────────────┴──────────────────────────────────────┘
1. Confidence Scores
For every extracted character, word, and key-value pair, Amazon Textract returns a mathematical confidence score ranging from 0.0% to 100.0%, reflecting the algorithm's statistical certainty.
2. Straight-Through Processing (STP) Governance
Agencies establish an organizational confidence threshold (typically 90% or 95%):
- Straight-Through Processing (STP): If every mandatory field on the uploaded document exceeds the STP threshold, the system automatically commits the extracted values to the mapped Salesforce fields, updates the
DocumentChecklistItemstatus toAccepted, and advances the application workflow without requiring any caseworker interaction. This enables agencies to process tens of thousands of routine applications instantly. - Exception Routing: If any single mandatory field falls below the defined threshold (e.g., an expiration date scored at 72% due to a shadow on the document), the system suspends automated commitment, flags the DCI as requiring manual review, and assigns a verification task to a caseworker queue.
3. The Human-in-the-Loop (HITL) Verification Workspace
Caseworkers conduct manual reviews using the purpose-built Intelligent Document Reader Verification Workspace embedded within the Public Sector Service Console:
- Interactive Side-by-Side Interface: The left panel renders high-resolution zoomable imagery of the constituent's uploaded document; the right panel renders the target Salesforce record fields with their populated OCR extractions and individual confidence scores.
- Visual Bounding Boxes: When a caseworker clicks into any field on the right (e.g.,
Driver License Number), the viewer on the left instantly highlights the corresponding physical text on the document using a colored bounding box polygon. This allows caseworkers to verify data in seconds without manually scanning the page. - Inline Corrections & Audit Logging: If the OCR engine misread a character (e.g., confusing an
8for aB), the caseworker corrects the value directly in the input field and clicks Save & Verify. The system commits the corrected data, logs the caseworker's user ID and timestamp, and records both the raw OCR value and the verified value in the audit history for complete legal defensibility.
Electronic Signature (eSignature) Architecture in Public Sector
Once documents are verified and applications are approved, public sector agencies must issue legally binding authorizations, formal contracts, and regulatory notices. Electronic signatures ensure agreements are executed quickly without reverting to physical paper mail.
┌─────────────────────────────────────────────────────────────────────────────┐
│ Public Sector eSignature Lifecycle │
├─────────────────────────────────────────────────────────────────────────────┤
│ 1. Document Assembly: OmniStudio DocGen produces final agreement PDF │
│ 2. Envelope Dispatch: Integration Procedure invokes eSignature REST API │
│ • DocuSign / Adobe Sign / Native eSignature integration │
│ • Sequential Routing: Constituent signs (1) ➔ Agency Director signs (2) │
│ 3. Digital Signing: Constituent receives secure link, verifies identity, │
│ applies cryptographic digital signature (PKI / X.509 Certificate) │
│ 4. Real-Time Webhook: eSignature Connect posts status callbacks to Apex │
│ • Status transitions: Sent ➔ Delivered ➔ Completed │
│ 5. Post-Execution Archival: Final tamper-evident PDF ingested into │
│ ContentVersion & linked via ContentDocumentLink to parent record │
└─────────────────────────────────────────────────────────────────────────────┘
Statutory Compliance & Legal Frameworks
Public sector electronic signature workflows must comply with rigorous statutory standards:
- ESIGN Act (Electronic Signatures in Global and National Commerce Act) & UETA: Establish that electronic signatures hold the same legal validity and enforceability as handwritten ink signatures.
- FedRAMP High & FIPS 140-2 Cryptographic Standards: Cloud eSignature solutions deployed in public agencies must maintain FedRAMP authorizations, encrypting documents at rest and in transit using certified cryptographic modules.
- Digital Certificates & PKI (Public Key Infrastructure): For high-assurance public transactions (such as multi-million dollar public infrastructure grants or child adoption consents), platforms utilize X.509 digital certificates that embed a cryptographic hash into the PDF, rendering any post-signing tampering immediately detectable.
Enterprise eSignature Integration Architecture (DocuSign / Adobe Sign)
Public Sector Solutions integrates with leading eSignature platforms (such as DocuSign eSignature for Salesforce or Adobe Acrobat Sign) using an event-driven architecture:
- Envelope Creation & Role Definition: An Integration Procedure or Flow triggers envelope assembly upon record approval. The envelope specifies:
- Source document (the rendered PDF generated via OmniStudio DocGen);
- Recipient routing order: e.g., Signer 1 (Constituent Applicant) must sign before Signer 2 (Municipal Agency Director) receives the document;
- Anchor tabs / Smart tags: locating signature lines, initials, and date fields dynamically.
- Constituent Signing Experience: The constituent receives an encrypted email or accesses the signing ceremony directly within an authenticated Experience Cloud portal session, applying their digital signature.
- Event-Driven Webhook Callbacks: Rather than polling for envelope status, the eSignature platform sends asynchronous HTTP POST notifications (via DocuSign Connect webhooks or Salesforce Outbound Messaging) into a Salesforce REST Apex service or platform event listener. As the envelope transitions from
SenttoDeliveredtoCompleted, the parent Salesforce record updates in real time. - Automated ContentDocument Archival: Upon completion, the webhook payload includes the finalized, digitally sealed PDF along with its complete Certificate of Completion (capturing IP addresses, signing timestamps, and identity verification logs). Automation inserts this file into
ContentVersionand creates aContentDocumentLinkassociating the executed contract directly with the parentIndividualApplicationorFundingAwardrecord.
Comparison: IDR vs. Manual Data Entry vs. Custom OCR Integrations
| Architectural Dimension | Intelligent Document Reader (IDR) | Manual Caseworker Data Entry | Custom External OCR (Lambda / Azure) | | :--- | :--- | :--- | | Transcription Speed | Sub-minute automated extraction & mapping | 10–25 minutes per document of manual clerical typing | Fast, but requires external API roundtrips and custom middleware | | Infrastructure & Licensing | PSS add-on license + the agency's own AWS account and Textract billing, but no custom middleware to build or maintain | Zero software licensing; massive labor and overtime costs | Requires separate cloud subscriptions, IAM credentials, and bespoke middleware you must build and maintain | | Accuracy & Verification | Automated confidence scoring with side-by-side HITL workspace | High human error rate due to clerical fatigue | High OCR accuracy, but lacks prebuilt Salesforce HITL console UI | | Straight-Through Processing | Native STP thresholding auto-commits high-confidence records | Impossible; 100% human labor touchpoint required | Possible, but requires writing extensive custom Apex logic and batch handlers | | Compliance & Governance | Salesforce-managed audit trail and HITL evidence; the agency still owns the AWS account's compliance posture | Data exposed to human eyes; risk of manual transcription leaks | Requires independent cybersecurity auditing for third-party endpoints |
💡 Real-World AP-222 Exam Scenarios & Case Analysis
Scenario 1: High-Volume SNAP Benefit Income Verification via Automated OCR
A state Department of Human Services processes 80,000 Supplemental Nutrition Assistance Program (SNAP) applications monthly. Applicants must upload their IRS Form W-2 or recent wage pay stubs. Caseworkers are overwhelmed by manual data entry, resulting in a 45-day application backlog. The agency requires an automated solution to extract employer names, EINs, and gross wages directly into the application record, while preserving human oversight for illegible files.
How should an enterprise architect configure the solution?
- Create a centralized
DocumentTypefor Form W-2 and configure an Intelligent Document Reader Form Template mapped to that document type. - Map the extracted source fields (Employer Name, Box 1 Taxable Wages, Box 3 Social Security Wages) to target fields on the
IndividualApplicationand childIncome__crecords. - Set the agency Straight-Through Processing (STP) confidence threshold to 90%.
- High-confidence submissions automatically populate income fields and mark the DCI as
Accepted. Low-confidence submissions (< 90%) route to the Service Console Human-in-the-Loop workspace, where caseworkers use side-by-side bounding boxes to verify and save wage data in seconds.
Scenario 2: Caseworker HITL Verification of Degraded Driver License Scan
An applicant for a commercial cannabis transport license submits a smartphone photograph of their commercial driver license. The photograph has heavy glare across the driver license expiration date. The Intelligent Document Reader extracts the driver name, address, and license number with 98% confidence, but the expiration date extraction returns a confidence score of 64%.
What happens in Public Sector Solutions, and how does the caseworker resolve it?
- Because the expiration date falls below the agency's 90% STP threshold, the system suspends automated field commitment and flags the
DocumentChecklistItemfor manual verification. - The record routes to a caseworker verification queue in the Public Sector Service Console.
- The caseworker opens the Human-in-the-Loop Verification Workspace. The interface highlights the driver license image on the left and displays the 64% confidence warning on the expiration date field on the right.
- The caseworker inspects the visual image, types the verified expiration date into the input field, and clicks Save & Verify. The system commits the verified date to the application, records the caseworker audit entry, and updates the DCI status to
Accepted.
Scenario 3: Multi-Party Public Grant Agreement eSignature Routing and Archival
A municipal economic development agency awards small business revitalization grants. Once an award is approved, the grant agreement must be signed first by the commercial business owner, and then countersigned by the Municipal Agency Director. Once fully signed, the tamper-evident agreement must be permanently archived on the FundingAward record.
What is the recommended declarative and integration architecture?
- Use OmniStudio Document Generation to assemble the official grant agreement PDF from an approved Microsoft Word template.
- Configure an Integration Procedure that calls the DocuSign eSignature API to instantiate an envelope containing the rendered PDF.
- Set up sequential routing: Signer 1 (Business Owner email) must sign first; upon completion, Signer 2 (Agency Director email) receives the envelope for countersignature.
- Configure an incoming DocuSign Connect webhook listener that monitors envelope status. When the envelope status changes to
Completed, the webhook ingests the executed PDF and its digital certificate into Salesforce as aContentVersionand creates aContentDocumentLinkassociating the file directly with theFundingAwardrecord.
A state agency is scoping automated document data extraction for incoming commercial fishing license applications using Intelligent Document Reader. The agency's cloud governance board asks the architect what external dependencies and procurement items the project introduces. What must the architect tell them?
A county tax assessor office uses Intelligent Document Reader to extract property assessment values and owner names from scanned deeds. When an uploaded deed exhibits water damage over the legal parcel number, the OCR confidence score for that specific field drops to 58%, below the agency's 95% straight-through threshold. What is the expected platform behavior?
A municipal housing authority issues grant award agreements that require legal execution by both the tenant and the agency housing commissioner. Once fully executed, the legally binding contract and audit certificate must be permanently stored against the FundingAward record. How should an architect design the completion architecture for an integrated eSignature solution?