<aside>
Description
SimpleT AI Service provides AI powered text processing for Salesforce Flows and Apex. It supports content analysis, generation, data extraction, and context aware processing with synchronous and asynchronous execution modes.
</aside>
Setup
Use these guides before you start using the AI Service in Flows:
What you can do
AI processing capabilities
- Intelligent content analysis – analyze text for sentiment, themes, and key information.
- Content generation – create personalized responses, summaries, and documentation.
- Data extraction – pull structured information out of unstructured text.
- Context-aware processing – AI can use Salesforce record context automatically.
- Custom response formats – get AI output in the exact structure you need.
- Async processing – handle complex AI operations without blocking Flows.
When to use AI services
- Customer service – generate responses and analyze customer messages.
- Content creation – write marketing copy, product descriptions, and help text.
- Data processing – extract and structure information from documents and forms.
- Decision support – get AI insights for recommendations and next steps.
- Quality enhancement – improve existing content with AI suggestions and corrections.
AI processing parameters explained
Required fields
AI instructions / prompt
- What it is: The instructions telling the AI what to do.
- Format: Natural language description of the task.
- Examples:
- "Summarize this case and identify the main issues."
- "Generate a professional email response to this customer inquiry."
- "Extract contact information from this document."
- "Analyze the sentiment of this survey response."
- Prompt references: Use
?PROMPTAPINAME to reference a saved prompt from Prompt Builder.
- Example:
?EMAIL_RESPONSE_PROMPT.
Execute asynchronously
- What it is: Whether the AI processing should run in the background.
- Values:
true – runs asynchronously.
false – runs synchronously and returns results immediately.
Optional fields
User message / data
- What it is: The main content for the AI to process.
- Examples:
- Customer email text:
{!$Record.Description}.
- Survey response text:
{!$Record.Response_Text__c}.
- Document content:
{!documentText}.
Record ID
- What it is: The Salesforce record ID used as context.
- Format: Standard 15- or 18-character record ID.
- Benefits:
- AI can use record fields as context.
- Supports automatic response schema generation.
- Provides business context.
- Example:
{!$[Record.Id](<http://Record.Id>)} or {!caseId}.

Response schema options
You can control the AI response format in two main ways.
Option 1: Object field API names (recommended)
- What it is: A comma-separated list of Salesforce field API names.
- Format:
Field1__c,Field2__c,Field3__c.
- Examples:
- Case fields:
Subject,Priority,Description.
- Contact fields:
FirstName,LastName,Email,Phone.
- Custom fields:
Sentiment__c,Key_Issues__c,Recommended_Actions__c.
- Benefit: AI response can be mapped directly to your object fields.
Option 2: Custom response schema
- What it is: A custom JSON schema that defines the response structure.
- When to use: When you need a structure that does not directly match a Salesforce object.
- Example schema:
{
"schema": {
"additionalProperties": false,
"properties": {
"contract_type": {
"description": "Type of contract being analyzed",
"readOnly": true,
"type": "string"
},
"key_terms": {
"description": "Important contract terms identified",
"readOnly": true,
"type": "string"
},
"risk_level": {
"description": "Overall risk assessment",
"readOnly": true,
"type": "string"
},
"missing_clauses": {
"description": "Important clauses that are missing",
"readOnly": true,
"type": "string"
},
"recommendations": {
"description": "Recommended actions or improvements",
"readOnly": true,
"type": "string"
}
},
"type": "object"
},
"strict": false,
"name": "contract_analysis"
}
Use Case API Name
- What it is: An identifier for tracking a specific AI use case.
- Examples:
"customer_support", "lead_qualification", "content_analysis".
- Benefit: Enables analytics and use-case specific configuration.
Understanding AI results
Synchronous processing results
When Execute Async = false, you receive results immediately:
- AI response message:
{!aiResults[0].finalResponseMessage}.
Asynchronous processing results
When Execute Async = true, the action returns tracking information:
- Run ID:
{!aiResults[0].id}.
- Thread ID:
{!aiResults[0].thread_id}.
You then use the SimpleT AI Async Response Awaiter action to fetch the final result.
Working with asynchronous processing
Setting up async processing in a Flow
- Start AI processing – SimpleT AI Service action:
- Wait for processing – Wait element:
- Check for results – SimpleT AI Async Response Awaiter action:
- Handle results – Decision element:
