Analyze Image
Add Analyze Image to let an Agent examine one org-owned Salesforce ContentVersion. Unlike a fixed OCR pipeline, the prompt can request visible text, document classification, visual description, business-field extraction, or a combined analysis. The result remains readable free-form text: Markdown, prose, tables, or prompt-requested JSON.
Supported files and routing
PNG, JPEG/JPG, WebP, and nonanimated GIF are analyzed directly. HEIC/HEIF images use iDialogue's native conversion and reuse a cached JPEG derivative for later prompts. PDFs and other documents are out of scope: route them through the existing document or Textract workflow. Analyze Image does not replace Textract or create words.txt.
Inputs
| Input | Admin guidance |
|---|---|
contentVersionId |
Required exact Salesforce image version. |
contentDocumentId |
Optional matching Salesforce File ID. |
prompt |
Optional task-specific instruction; otherwise general analysis. |
detail |
auto by default; low, high, or original when needed. |
background |
false by default; controls the nested OpenAI request only. |
The running Agent supplies its configured model, reasoning, verbosity, and output limit. End users cannot override those boundaries through this skill.
Transactional and background use
Keep background=false for normal use, even when the Agent itself runs in Background context. The Lambda waits for one OpenAI request; Analyze Image performs no OpenAI polling. If background=true returns queued or in-progress status, the result is only a provider response-ID/status receipt. This version has no retrieval owner and must not claim completion.
OpenAI documents that Responses background mode temporarily stores response data to disk for roughly ten minutes even when store=false. Do not use nested background=true where Zero Data Retention compatibility is required. Review the OpenAI data-controls guidance for the current policy and image-input exceptions.
Prompt and detail guidance
- For OCR: “Extract all visible text in readable Markdown. Preserve tables and report uncertain text.”
- For classification: name the categories and ask for visible evidence and uncertainty.
- For field or aviation photos: request objects, parts, condition, markings, damage, and relevant context.
- Use
lowfor broad inspection andoriginalfor dense scans, small text, or spatially sensitive work.
For GPT-5.6, OpenAI currently treats auto like original: original image dimensions are preserved, so large images can consume more input tokens and increase latency. See GPT-5.6 model guidance.
Cache, records, and cost
Completed results are cached by source, prompt, detail, effective model, and material Agent settings. Identical calls may reuse the Markdown result; changed prompts create separate immutable analyses. Tool transcripts and artifacts retain sanitized provenance such as the source IDs, cache status, effective settings, checksums, and provider status. Signed S3 URLs are internal and are not returned.
Each call costs 5 iDialogue skill credits. A provider cache miss also incurs the selected model's image-input and output-token charges; an iDialogue result-cache hit avoids a new model call but still incurs the skill credits.
Analyze Image is read-only. Have the Agent review extracted values and uncertainty before using a separate governed dml_sobjects call to create or update Salesforce records.