Skip to main content

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:

  • Activate your preferred AI model
  • Data Context Mapping should be configured

alt text


Step 1: Create a New Prompt

  • Navigate to the Prompt Builder tab and select New Prompt

  • 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
  • Click Save

  • A unique Prompt Request ID will be generated

alt text

Key Fields (pre-filled):

  • Object
  • Type: Text / JSON / Canvas
  • Prompt Version
  • AI Model
  • Status: Draft / Active
  • Last Modified

alt text


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

alt text

Prompt Availability Settings Section

  • Visibility Condition: Add filter logic to control where prompts should be enabled/disabled
  • Visibility Exception Message: Custom message when prompt can't be run
  • Profile Access: Limit prompt access by Salesforce user profile

alt text

Note: Errors during prompt execution now appear as a banner at the top for better visibility

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

System Information Section

  • View details such as Prompt Version, Message, Owner ID, Created By, Created Date, Last Modified By, and Last Modified Date

alt text

Quick Tip: Press Ctrl+S (or Cmd+S on Mac) to save your prompt quickly.


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

alt text

Locale Configuration Section

Ensures prompts respond based on user or automation locale:

Use CaseOptionDescription
AutomationCompany DefaultUses standard org-wide locale
AutomationRecord OwnerUses locale of record owner
GPTfy Console UseActive UserUses logged-in user's locale
GPTfy Console UseCompany DefaultMaintains uniform experience across users

alt text


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

alt text

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

alt text


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.

alt text


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

alt text


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

alt text

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

alt text

Security Audits

  • Logs include record ID, user, timestamp, and inputs/outputs
  • View execution history under the Audit tab for compliance

alt text


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

alt text


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.