Step-by-Step Guide to Field Generation Prompt Template
Prompt Builder, introduced in the Spring’s 24 release, is a tool that leverages generative AI in Salesforce (Agentforce) to streamline workflows and boost user productivity in your Salesforce Org.
Using Prompt Builder, admins can create templates with prompts to summarize and generate content relevant to the task at hand using AI.
Prompt Template Types
Currently, you can create the following template types in Prompt Builder:
Field Generation: Generate values for record fields. For example, generate a product description based on the product model.
Record Summary: Summarize record data for a comprehensive view of a record.
Sales Emails: Generate a personalized customer email based on customer data.
Flex: Generate content for any business purpose that other templates don’t cover. Flex prompt templates let you define your own resources.
Where all Prompt Templates Can be Used?
Once created and activated, these templates can then be easily reused across various functionalities. For example, they can be used in:
Email Generation
Lighting Record Pages
Flows
Einstein Copilot
Lightning Web Components
Apex
and more...
Use Case Example
Using the generative AI capabilities of Salesforce (i.e. Agentforce), we have detected and populated the case sentiment as “Unhappy” based on the case subject “Frequent mechanical breakdown”. Here is how this looks like:
Once you can populate the sentiment on a case, you can use this value to route the case to the best agent using native and declarative features of Salesforce like Omni-Channel Routing, Case Assignment Rules, Case Queues, etc.
In the overall flow of Agentforce, the following diagram highlights the key components that we will cover in this guide.
Take a look at the following guide to see how easy it is to build a feature like this. It won't take more than 15-20 minutes for you to configure and test this out.
Expanding Usage
This is just the beginning. Once you know how to use Prompt Builder to create prompt templates, you can use it for a variety of purposes, such as:
Priority & Categorization: For cases based on the case subject and description.
Description: For products based on the product model and name.
Description: For accounts based on the account name and industry.
Management Level: For contacts based on their job title.
These AI-generated values can then drive further automation using Salesforce's declarative capabilities. For instance, you can automatically create a task for the account owner to set up a meeting with a contact at the 'Senior' management level.
The possibilities are endless. It will depend on your creativity and imagination to use this tool to drive productivity and efficiency for your organization.
Agentforce Advisory, Training & Implementation Services
If you’d like help going deeper with Agentforce beyond this guide, I offer the following:
Self-Paced Training – #Mastering Agentforce
A structured, hands-on course covering Agentforce concepts, Prompt Templates, Agents, Actions, and real-world implementation patterns.
Live Online & Onsite Agentforce Training
Instructor-led training for Salesforce teams, partners, and customer organizations, tailored to real use cases and practical scenarios.
Agentforce Advisory & Implementation Services
Strategic advisory and hands-on implementation support to help you design, build, and scale Agentforce solutions with confidence.
For training, advisory, or implementation discussions, please reach out via the Contact page, where you can submit a form or schedule a conversation.
References & Useful URLs
Salesforce help article - Create a Field Generation Prompt Template
Something clicked? Share it with us in the comments below 👇