AI File Parser

AI File Parser

The AI File Parser turns unstructured file attachments, such as CVs, certificates and licences, into structured Salesforce data. An administrator defines a Parsing Template that describes which fields to extract. Users then parse a file from a record page, review the proposed values beside the current values and choose what to save.

The parser uses the AI configuration in Onboarding Default Settings, shared with Smart Sessions and Record Files AI parsing. If you previously configured the parser through 3B Forms, enter the provider settings and supplier key in Onboarding Default Settings after upgrading to 11.12.0.

Prerequisites

AI settings

The parser reads the org default from Setup > Custom Settings > Onboarding Default Settings > Manage.

Setting Purpose
AI Provider The AI provider. Supported values are openai (the default), azure, gemini and claude.
AI Endpoint The AI service endpoint. The default is https://ai.3bapi.com/ai.
AI Vision Model The model used to read files. The default is gpt-4o-mini.
AI Supplier Key Your OpenAI, Azure, Gemini or Claude API key.
Azure AI Endpoint The Azure OpenAI endpoint when the provider is azure.
Azure AI Version The Azure OpenAI API version when the provider is azure.

Trusted URL

The AI request is made from the browser, so the host in AI Endpoint must be allowed as a Salesforce Trusted URL with Connect-src enabled. Version 11 includes a Trusted URL for https://ai.3bapi.com. If you use a different host, add a Trusted URL for it in Setup.

Permissions

Assign Onboarding Admin Full Permission to administrators who configure Parsing Templates or use the packaged parsing components. Users also need the appropriate access to the records, fields and files they will parse or update.

Create a parsing template

Open the Parsing Templates tab in the 3B Onboarding app, create a record and give it a name. The packaged Parsing Template record page opens the Template Builder, which contains the Parsing Template Manager.

Configure the template:

  1. Select the Context Object, which is the Salesforce object the template extracts data into, such as Contact or Certificate. Each template targets one object.
  2. Enter a System Prompt with general instructions for the extraction. For example, ask the parser to apply correct capitalisation to names, locations and companies.
  3. Under Field Mappings, select the writable fields to extract. Fields that Salesforce requires at the database level are selected automatically for a new template.
  4. For each selected field, enter a field-level prompt describing the value and choose a return type: Text, Date, Date-Time, Time, Boolean, Picklist or Multi-Picklist. The parser adds strict formatting instructions for the selected type. For a Picklist or Multi-Picklist, it reads the field's active values at parse time and asks the AI to return only those values. A Multi-Picklist result uses Salesforce's semicolon-separated format, such as Option 1;Option 2. If no option applies, the parser returns no value. If the mapped field has no picklist values, it falls back to plain text.
  5. If the file can contain repeated related data, add a Child Related Object. Enter an instruction that identifies the relevant section and map its child fields. For example, a Contact template can extract multiple Employment History rows from a CV.
  6. Save the template and leave Active selected so it is available to users. Deactivate a template to hide it from the parser without deleting it.

The manager stores parent and child mappings as JSON on the Parsing Template record. Use the Template Builder to maintain these values instead of editing the JSON fields directly.

Add the parser to a record page

In Lightning App Builder, add the 3B AI File Parser component to a Lightning record page and activate the page. The component is available when at least one active Parsing Template targets that record's object.

Add the component separately to each record page where users need document extraction.

Parse and review a file

  1. Choose a file. Select a file already attached to the record or upload a new one. An uploaded file is attached to the record immediately. Use the preview action to inspect it before parsing.
  2. Choose a template. If one active template matches the record's object, it is selected automatically. If several match, choose one from the list.
  3. Parse. Select Parse with AI. The parser sends the file and the extraction schema to the configured AI service. The request runs in the browser so longer extractions are not limited by an Apex callout timeout.
  4. Review. Start with What the AI sees, a one-sentence description that helps confirm the correct document was parsed. The component lists any concerns the AI detects, including poor scan quality, unreadable content, unexpected format or document type, and signs of possible tampering. Compare each current database value with the proposed value and its confidence score. Scores below 60% are highlighted in red. Accept or reject individual fields, or edit a proposed value. Child records have a confidence score for each row; edit their cells and exclude any rows that should not be created.
  5. Save. Select Save to Database to update the accepted parent fields and insert the accepted child rows.

Supported file types are PDF, PNG, JPG, JPEG, GIF and WebP.

How data is saved

Troubleshooting

Symptom Cause and fix
AI is not configured AI Supplier Key is empty in the Onboarding Default Settings org default.
The AI request failed with status 401 The supplier key is invalid for the selected AI provider.
File type not supported Select a supported PDF or image file.
No parsing templates are shown Create or activate a Parsing Template whose Object Name matches the record's object.
The parse fails immediately with a browser network error Add the host from AI Endpoint as a Salesforce Trusted URL with Connect-src enabled.