Build and Test Prompts
Design business-ready prompts with full control and clarity
Creating prompts is at the core of using AI effectively in Salesforce. GPTfy offers a purpose built Prompt Builder that simplifies prompt creation, testing, and deployment—all in one structured interface. With intuitive controls, minimal clicks, and smart defaults, teams can quickly create, test, and deploy business-specific prompts that align with both operational needs and AI best practices.
Before You Start
Make sure the following prerequisites are completed:
Step 1: Create a New Prompt
To begin, navigate to the Prompt Builder tab and select New Prompt.
- The Prompt Builder window will open, allowing you to add your use case for a prompt and a few examples.
- On clicking those examples, the text will get automatically updated in the text box.
- Once the Send button is clicked, the following will be created automatically:
- A prompt with minimum required parameters
- A prompt record with prompt command
- A data context mapping with few standard related objects
Note:
- Make sure the use case given while creating a prompt mentions the target object, so that the system creates the prompt under the correct target object.
- This agentic prompt builder works only with Text type prompts.
Creating Other Prompt Types
For prompts other than text, there will be a Build your own button on the Prompt Builder. Clicking that will take you to the prompt creation window.
Note: This method also allows you to create text prompts manually.
-
Provide the required fields:
- Prompt Name: Enter a clear, descriptive title
- Target Object: Choose the Salesforce object (e.g., Account, Opportunity)
- Data Context Mapping: Select the appropriate mapping configuration
- AI Model: Choose the AI model (e.g., OpenAI, Claude, etc.)
- Prompt Type:
- Text Prompt – Use your own custom-written prompt command
- JSON Prompt – Use structured prompt components for advanced workflows
- Canvas Prompt – Enables display and interaction with AI responses with flexible customization
- Agentic Prompt - Act as a skill to the agent to perform various operations according to the user's conversations if defined in the related apex class.
-
Click Save
-
A unique Prompt Request ID will be generated
Step 2: Configure the Prompt
Prompt Configuration Section
- AI Prompt Name (pre-filled, but editable)
- Description: Provide a concise summary of the prompt's purpose
- Prompt Request ID: Unique backend identifier
- Allow User Input: Enable users to add manual inputs at runtime
- Include Files: Allow file attachments to be processed with the prompt (requires specific AI model support). If enabled, you have to select a file model to process attached PDFs, Excel, or Word documents.
- Purpose: Multi-select business purposes
- How It Works: Rich-text explanation of the prompt's logic and behavior
Prompt Availability Settings Section
- Profile Access: Limit prompt access by Salesforce user profile
- Permission Set: Limit prompt access by permission sets provided for the user.
- Visibility Condition: Add filter logic to control on which records prompts should be enabled/disabled based on the target record’s field value.
- Visibility Exception Message: Custom message when prompt won't be available for running, hovering on the Greyed out ‘Run GPTfy’ button will show this.
AI Model Section
- AI Model: The engine powering the prompt
- Temperature: Controls response creativity (0–1)
- Top P: Influences the diversity of considered responses
- Max Output Tokens: Sets the limit on the AI's response length
Loopback Section
When you enable the Enable Loopback checkbox, a Loopback Message text field appears where you can input custom values.
How it works:
- This feature bypasses the AI callout entirely
- Instead of sending data to the AI model, GPTfy uses the content in the Loopback Message field as the simulated AI response
- The response is displayed on the console as if it came from the AI
Use cases:
- Save API callouts during testing
- Validate features that don't require actual AI responses
- Test data aggregation and rollup functionality
Important: The Loopback Message must contain valid JSON format. GPTfy parses this JSON as an AI response, so proper formatting is essential for correct display.
Agentic Section
When the prompt type is set to Agentic, this field allows you to specify the API name of the Apex class that implements the agentic skill functionality. This Apex class must implement the AIAgenticInterface to execute the agent's actions.
System Information Section
- View details such as Prompt Version, Message, Owner ID, Created By, Created Date, Last Modified By, and Last Modified Date
Quick Tip: Press
Ctrl+S(orCmd+Son Mac) to save your prompt quickly.
Note: Errors during prompt activation now appear as a banner at the top for better visibility
Step 3: Set Grounding Rules and Locale
Grounding Rules Section
Predefined ethical and content guidelines to ensure safety and brand alignment:
Ethical Grounding Examples:
- Prioritize safety and ethics
- Avoid using scare tactics
- Base responses solely on provided prompt information
- Reference linked JSON records correctly
Context Grounding Examples:
- Only answer what is asked
- Refrain from using first-person pronouns
- Ensure all related records are shown accurately
Locale Configuration Section
Ensures prompts respond based on user or automation locale:
| Use Case | Option | Description |
|---|---|---|
| Automation | Company Default | Uses standard org-wide locale |
| Automation | Record Owner | Uses locale of record owner |
| GPTfy Console Use | Active User | Uses logged-in user's locale |
| GPTfy Console Use | Company Default | Maintains uniform experience across users |
Step 4: Define the Prompt Command
For Text Prompts:
- Use the Prompt Command text box for free-form instructions
- Update: Command box size increased for easier editing
- Insert merge fields to dynamically pull Salesforce field values
For JSON Prompts:
- Define modular sub-components for structured prompting
Additional Capabilities:
- Record Lookup: Search and select records from the target object
- Quick Test: Instantly validate prompts on selected records
- New Test Tab: Test prompts and view recently tested records
For Agentic Prompts:
- Use the Prompt Command text box for free-form instructions and merge fields to dynamically pull Salesforce field values
Step 5: Add Post-Prompt Actions
Define automation triggered after a prompt runs:
Supported Post-Prompt Actions:
- Update Field: Modify a field value on the current record
- Create Record: Create a new Salesforce record
- Invoke Flow: Trigger an autolaunched Salesforce Flow
- Invoke Apex: Execute an Apex class
- Open Form: Display a pre-filled form based on AI output
Each action supports hardcoded values, field references, or AI-generated content and can be sequenced for complex workflows.
Enhancement: Prompt Action Validation ensures only active flows and valid Apex classes are selectable.
Step 6: Save, Activate, and Manage
- Click Save to register the prompt
- Click Activate to publish the prompt for end-user access
Note: Prompt must pass validations before activation
Editing Prompts:
- Deactivate (moves to Draft status) to enable editing
- Use Clone with Related to duplicate prompts and their configurations
Step 7: Version Control, Testing, and Security Audits
Test Prompt
- Test on live Salesforce data (here the record on which the latest prompt was run will be selected automatically)
- Receive instant validation feedback
Version Control
- Ensure that the prompt versioning toggle is on in AI settings
- Every activation creates a new version
- Use Reinstate to revert to a previous version
Security Audits
- Logs include record ID, user, timestamp, and inputs/outputs
- View execution history under the Audit tab for compliance
Step 8: Canvas Prompt Experience
GPTfy Canvas (Prompt Type: Canvas) enables the creation of AI dashboards with multiple prompt elements:
- Auto-refresh at configured intervals
- Responsive layout with options for modal zoom, email, PDF export, and copy
- Drilldowns with summary and full response views
Tip: Only active prompts with matching object contexts can be added as prompt elements.
In Console and Canvas Component:
- View all responses on one screen
- Click an element for detailed modal view
- Access security audits per element and parent
With GPTfy's Prompt Builder, you can build, test, and deploy powerful prompts with speed and confidence, without relying on multiple tools or developer hand-holding. The intuitive design ensures alignment between intent and results while giving you full control over visibility, grounding, and AI behavior.