<aside>
The Prompt Builder is a visual tool for creating and managing AI prompts without code. It supports data connections from Salesforce via SOQL, JavaScript data transformation, response schema configuration, and prompt testing.
</aside>


When your prompt is called from Salesforce, these system parameters are available automatically:
data – Contains all the data sent from Salesforce.recordId – The ID of the current record (when sent from a Record page).objectApiName – The API name of the current object (when sent from a Record page).You can use these in your prompts like $data, $recordId, or $objectApiName.
For testing, you can fill in these parameters manually in the Prompt Builder. When the prompt is called from Salesforce, your manual values are overwritten with the actual Salesforce data.

Variables let you insert extra dynamic information into your prompts.
customer_name or recent_cases).https://www.simpletranslate.io/dashboard/credentials):
SELECT Name, Status FROM Case WHERE AccountId = '$recordId'
JavaScript scripts let you transform and enhance data before it reaches the AI.
Note: Only synchronous functions are supported.
execute() function that will be called.execute():
data to access Salesforce data.recordId and objectApiName for record context.accounts, recent_cases).Simple example script
function execute() {
// Get just the account names from the accounts variable
const accountNames = accounts.map((acc) => acc.Name);
// Count total cases
const totalCases = recent_cases.length;
// Return the processed data
return {
names: accountNames,
caseCount: totalCases,
};
}
Use script results in your prompts like script_name.names or script_name.caseCount.

$variable_name.$customer_name, I see you have $case_count open cases.”$data.”myScript.names.”
{
"name": "salesforce_account",
"strict": false,
"schema": {
"type": "object",
"properties": {
"Salutation": {
"type": "string",
"readOnly": true
},
"FirstName": {
"type": "string",
"description": "html",
"readOnly": true
},
"LastName": {
"type": "string",
"readOnly": true
}
},
"required": []
}
}
To learn more about JSON Schema, see <https://json-schema.org/overview/what-is-jsonschema>.
<aside>
</aside>
