AI document parsing

What it does

AI document parsing, also called Documents AI, lets a form user upload a document such as an image or a PDF, and have the form fields fill in automatically from the document's content. An admin configures which fields to extract and how, using natural language prompts. It supports both single level fields and repeatable child records.

Requirements

AI must be configured on the org. Set the AI provider and key in 3B Forms General Settings. When no AI endpoint is configured, the feature is unavailable. See Post install setup and Settings reference.

Configuring extraction in the builder

Document parsing is configured on a file question. On a single file image question you enable Use Documents AI, then configure:

Setting Purpose
General prompt The overall instruction to the extractor, for example how to read the document and how to format dates. A sensible default is provided
Fields to extract The list of mappings, each pairing a form field with a prompt describing what to pull for it
Do not store upload Optional. Extract from the document but never save it to Salesforce
AI confidence threshold (0-1) Optional, defaults to 0.85. Extracted values whose reported confidence falls below this threshold are still filled in, but flagged for the user to verify
Redact PII from extracted values Optional, off by default. High risk personal data found in extracted values (card numbers, emails, national identifiers, phone numbers and similar) is masked before the values are written to the form

Each field to extract has a target form field and a natural language prompt. The prompt describes the value in meaning, for example "the invoice total including tax", so the extractor matches by meaning rather than by field name.

When a target field is a repeatable child section, the extraction type becomes child, and you can map the child's sub fields, each with its own prompt. This is how a document with several line items fills a repeatable section: the extractor returns multiple rows, and the form adds one child repeat per row, populating each row's fields.

How it works at runtime

  1. The user uploads a document on the file question.
  2. The file is validated and, unless set not to store, saved against the response.
  3. The document and the configured prompts are sent for extraction. Extraction runs in the background and never blocks the user; if it fails, the user sees a warning and can still complete the form.
  4. Each extracted value is validated and normalized against its target field: dates are converted to ISO format, numbers are cleaned of symbols, and choice answers are matched to the field's available options. A value that cannot be validated (for example a date that cannot be read, or an answer that matches no option) is left blank and reported to the user as not read reliably.
  5. The validated values are written into the mapped form fields. For child mappings, the section is cleared and one repeat is added per returned row. Child row values are filled as returned; confidence scoring applies to single level fields.
  6. Any field filled with low confidence is flagged: a short verification note appears under the question title, and one warning message lists every field the user should double check.

The extractor is asked to return an empty value when a field cannot be found, so unmatched fields are left blank rather than guessed.

Confidence scoring

The extractor reports a confidence score between 0 and 1 for every single level field alongside its value. Values at or above the configured threshold fill in silently. Values below the threshold still fill in, but the question is marked with a verification note and included in the warning shown to the user. Raise the threshold for forms where accuracy matters more than convenience; lower it when documents are clean and consistently formatted.

PII redaction

When Redact PII from extracted values is enabled, extracted text is scanned for high risk personal data and matches are replaced with a redaction marker before the values reach the form and, later, Salesforce. Note the boundary of this protection: the uploaded document itself is still sent to the configured AI provider for reading, so redaction protects what is stored, not what the provider processes.

Provider configuration

All AI calls, whichever provider you choose, route through a managed proxy. You select the provider with the AI Provider setting (openai, azure, deepseek, gemini or claude) and supply your key in AI Supplier Key. Your key is never exposed in plain text in the browser. See Settings reference.

Document parsing uses the model in AI Vision Model, falling back to AI Thinking Model when it is blank, so you can run OCR on a different model from form building. openai, azure, gemini and claude receive an uploaded PDF as is. deepseek reads images only and needs a vision model such as deepseek-flash, so for deepseek a PDF is converted to page images in the user's browser before it is sent, one image per page, which also covers scanned PDFs. Only the first 10 pages are converted; put the pages that carry the data first, or upload them as a separate file. If the AI reads the document but finds nothing to extract, the user sees a warning that no data could be read.

Tips