Merge Fields in GPTfy let you bring live Salesforce data, like Account.Name, Owner.Email, or Contact.Title—into your prompt commands. This makes your AI outputs more relevant, personalized, and grounded in real CRM context.
Why Use Merge Fields?
- Ensure AI receives the most accurate and up-to-date CRM data.
- Prevents AI hallucination by explicitly providing important context.
- Helps personalize outputs based on record-specific information.
To get the most out of this feature, ensure your Related Fields are properly mapped in the Data Context Mapping section.
GPTfy supports relationships up to 5 levels deep
(e.g., Opportunity → Account → Owner → Manager → Email)
Here’s how to do it:
Step-by-Step: How to Use Merge Fields
1. Open Field Mapping
Go to your Salesforce environment
Open a Data Context Mapping record
Click to open the Field Mapping window
2. Add a Related Field (Optional)
In the Field Mapping window, click Add Related Field.
This helps you easily pick fields from related objects up to 5 levels deep.
3. Select the Object
Click Select Fields
You’ll see a list of related objects connected to your parent object
4. Choose Your Fields
Pick the related fields you need
5. Copy the Merge Field Format
Click the copy icon next to the field name
This copies the relationship-formatted field path
6. Insert It Into Your Prompt
Paste the field name into your prompt command
Wrap it in triple curly braces: {{{Account.Owner.Name}}}
Note- Triple curly braces ensure Salesforce merge field formatting is applied correctly.
7. Add More Fields (Optional)
- Use multiple fields from the same or different related objects to enrich your prompt
8. Save and Activate
Save the Text Prompt
Click Activate
Run the prompt on a record to test if the data from the merge field is properly extracted
Best Practices
Use clear field names to keep prompts easy to read.
Test on multiple records to ensure data is consistently extracted across variations.
Avoid overloading prompts with too many fields unless necessary.
If a field might be blank, configure the Blank Replacement Value setting under GPTfy Settings to ensure smooth outputs.
Important Notes
Merge Fields can be used in prompts of Text type only (not JSON).
If a field is mapped but not selected through “Add Related Field”, you can still manually use its path if you know it.
Salesforce dynamic formula fields (introduced in GPTfy 1.10) can also be leveraged via the “Add Formula Field” option in Field Mapping
Step 5: Copy the Field Name
Next to the picklist, there is a Copy icon.
Click on it to copy the field name in the required relationship format.
Step 6: Paste the Merge Field
Paste the copied field name inside your command prompt.
Ensure it is enclosed within three curly braces to format it correctly as a Salesforce merge field.
Step 7: Add More Fields for a Comprehensive Prompt
Consider adding more fields from the same or other objects for a more robust and meaningful prompt command.
Once you’ve added the necessary fields, save the Text prompt.
Step 8: Activate the Prompt and Test
- Use the process before applying your text prompt in a real situation.
- Run the prompt on a Salesforce record to test how the data context mapping and merge fields generate the desired response.