Step-by-Step Guide to Field Generation Prompt Template

This guide is part of our series on “Mastering Agentforce”.

To explore the complete series, please click here.

Prompt Builder, introduced in the Spring ’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:

  1. Field Generation: Generate values for record fields. For example, generate a product description based on the product model.
  2. Record Summary: Summarize record data for a comprehensive view of a record.
  3. Sales Emails: Generate a personalized customer email based on customer data.
  4. 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:

Detect case sentiment on case subject

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.

Einstein Copilot & Prompt Builder Flow Overview - Field Generation

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.

NOTE: Certain sections of the guide will appear as locked in the free preview. You can download the unlocked version of the guide in PDF format by subscribing to our “All Access” Pass through the link below.

Not an “All Access” Pass Member Yet?

Get Download Access to this & 150+ More Step-by-Step Guides with “All Access” Pass. A simple and single plan to access our entire library of courses, guides, workshops & masterclasses on Salesforce.

Unlock the Power of Salesforce Generative AI: Master Agentforce!

Discover how to leverage Salesforce’s cutting-edge Generative AI tools to streamline your workflows and boost productivity.

Our comprehensive guides and hands-on workshops will take you from beginner to expert in no time. Learn the ins and outs of Agentforce, Agents, Topics, Actions and Prompt Builder with step-by-step tutorials, best practices, and real-world examples.

We also offer live onsite/online training for Salesforce partners, as well as consulting and implementation services for Salesforce customers.

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.

References & Useful URLs

Scroll to Top