Agentforce Prompt Builder Whitepaper
Agentforce Prompt Builder Whitepaper
Augment Your
Agentforce with
Prompt Builder
Contents
Yet many companies still struggle with putting it into practice. 6150%
% Improve customer
experience
They’re unable to create AI-powered experiences quickly, have
difficulty embedding generative AI into existing processes
or scaling new AI agents, and lack trust in the results. 5050 %
% Increase Revenue
Salesforce is solving these challenges with Agentforce: a new layer on the Salesforce Platform that
enables companies to build and deploy your Agentforce to autonomously take action across any
business function. Along with its suite of pre-built agents, Agentforce comes with a set of low-
code builders that helps businesses customize agents and create powerful actions tailored to their
workflow and data. While Agentforce Builder allows customers to define new jobs to be done for
agents, Prompt Builder is another key component of Agentforce.
This guide will walk you through how to create these prompt-driven actions using Prompt Builder.
Build solutions that can scale, instead Build generative experiences with ease.
of each user recreating the same LLM Streamline building prompts by empowering Salesforce admins to create
interaction manually. prompt templates that summarize and generate content with clicks.
Get Started with Prompt Builder | Best Practices for Writing Effective Prompts | 05
1 Design reusable and effective
prompts that are grounded in
Prompt Flows
Email Field
Activate prompts in
the flow of work Flow Apex
3 Call prompt templates to
supercharge productivity within the LWC C360
flow of work including Agentforce.
Agentforce
Writing Effective Prompts for Every
Experience
1 Create effective prompt templates.
Good prompts start with good grounding data. Grounding is the process of providing the LLM your
specific domain knowledge and context, such as Salesforce data, to get your desired response.
Without grounding, a model’s response may contain generic, irrelevant, or hallucinated details.
With Prompt Builder, you can ground prompt templates with Salesforce, Data Cloud data, and
even external data. This connection helps the LLM understand context to generate personalized
responses with current and precise information. You can even retrieve data dynamically using
Retrieval-Augmented Generation (RAG) methods or logic built in Flows. Confidential data and PII
Get Started with Prompt Builder | Writing Effective Prompts for Every Experience | 06
remains within Salesforce. The zero-retention agreement within the Einstein Trust Layer guarantees
that any information shared with the LLM is neither stored nor used for training purposes.
Who is involved, and how are they related? What is the context?
Key Ingredients: Participants, relationships, data Key Ingredients: Setting, tone & style, language
Example: Example:
You are a banker named {!user.firstname} Write the message in the form of an email directed
{!user.lastname} from a company named Sample Bank. toward a single individual, written in English.
You are writing to {!account.name}, who has been a The message should evoke enthusiasm with intensifiers,
customer of yours since {!account.creationdate} but limit the use of exclamation points. Express
casualness using contractions, referring to the recipient
in second person, and using discourse markers.
Example: Example:
You are attempting to persuade {!account. Limit the message to about 500 words, and do
name} to sign up for {!product.name}, which not address any content or generate answers
is described as {!product.description}. that you don’t have complete data on.
Describe the business value of {!product.name} in the Follow these instructions strictly to generate only
context of banking clients who are {!account.status}. the message to be sent to the customer.
Writing Effective Prompts for Every
Experience
2 Test and iterate on prompt templates.
Generative AI uses LLMs to produce responses. Unless you have the resources
to train your own models, third-party LLMs are not tuned to achieve great
results for unique business needs, even if your prompt is well-defined.
Prompt Builder makes it easy to refine your prompts without needing to finetune the model.
Refine your prompts by either adding additional grounding data or selecting a different
LLM. For example, you may choose different LLMs for creating marketing copy than a legal
Get Started with Prompt Builder | Writing Effective Prompts for Every Experience | 07
document. The results from your prior attempts are not retained and the new output takes
its place, but a version of the previous prompt template is saved should you need it.
The final step of a generative AI experience is to deploy the experience right in the flow of work.
This can be enhancing existing workflows by embedding prompt templates in record pages using
Lightning App Builder, Flows, or Apex. You can also invoke prompt templates within Agentforce
Builder and leverage the same prompt you built as a prompt action within Agentforce.
“
Prompt Builder allows our team at Carnegie
Learning to bring our CRM data into our
prompts easily with no code! This helps
us augment our business processes to
cut down on service rep response, email
outreach, and content generation time”
Marissa Scalercio
VP of Sales Operations,
Carnegie Learning
Common Use Cases
of Prompt Builder
Now that you know the basics of writing effective prompts, let’s take a look at a few common
use case patterns of Prompt Builder that will help you put AI to work more effectively.
Because LLMs are designed to recognize the connection Prompt Builder allows you to easily and safely
between natural language words, they excel at provide grounding data — specific domain
Get Started with Prompt Builder | Common Use Cases of Prompt Builder | 08
inferring a text output based on some text input. Some knowledge and context, such as CRM data — to
general examples of prompt capabilities include: perform summarization and content generation
tasks with the most relevant business context.
Solution: Solution:
Build a prompt to automatically create personalized, Build a prompt to auto-generate summaries,
relevant emails grounded on your private data. descriptions, and other field values grounded
Incorporate all the ingredients that make a on opportunity and case data. Without needing
prompt template great: instructions, participants, to open every record page and review contact
conditions, goals, relationships, constraints, and and opportunity details across every related
most importantly, context from your CRM data record, generative summaries can equip
about you, your product focus and your customer. agents with valuable insights in seconds.
Common Use Cases
of Prompt Builder
Agentforce takes generative experiences to the next level with autonomous agents that can act on your team’s behalf. The Atlas
Reasoning Engine understands the user request and plots a course of action based on the user intent. Agentforce supports
all types of actions built as part of the Salesforce Platform, including Flow, Apex, and now prompt template-driven actions.
Because agents adapt based on the conversation, it’s especially good at multi-step workflows where a solution
requires multiple actions, such as troubleshooting a support case and resolving the root issue for the customer.
Get Started with Prompt Builder | Common Use Cases of Prompt Builder | 09
Use Case Use Case
Solution: Solution:
A customer can ask Agentforce to process a A sales rep can ask Agentforce to identify
complex return without needing a representative top opportunities by leveraging the record
approval. Once it looks up the customer’s purchase summary prompt action. Once top accounts
history, it calls a custom prompt template that are identified, the next action is to create sales
reviews the customer’s purchase records and pitches to them. Agentforce can also generate
delivers a return approval recommendation. a sales pitch using a prompt template designed
Then Agentforce can start the return process to help craft the right messaging based on
with the help of a Flow custom action. previous conversations and case history.
Common Use Cases
of Prompt Builder
Automation helps companies streamline processes and free up valuable employee time from working on
repetitive manual tasks. Prompt Builder takes it a step further, enabling you to combine generative AI with
automated workflows. For instance, using a record-triggered flow, you can trigger a prompt template to run
automatically when a record is created or updated. Another way where generative AI can enhance automation
is by embedding it directly in a screen flow to help generate the desired output when called upon.
Get Started with Prompt Builder | Common Use Cases of Prompt Builder | 10
Use Case Use Case
Solution: Solution:
Start by building a case summary prompt template Start by building a prompt template that
that provides a snapshot of all the open cases generates a product recommendation based
associated with an account. Using a record- on a customer’s purchase and case history data.
triggered flow, run the case summary prompt Using a widget powered by a screen flow that
template to automatically update generated launched off an Account record page, a Service
summaries whenever new case detail is submitted. agent can select a customer using a lookup field
and get tailored product recommendations
served up by the prompt template.
Andrew Russo
Salesforce Architect,
BACA Systems
Common Use Cases
of Prompt Builder
You can also use Prompt Builder to create and deploy custom AI-powered apps across your organization. Because
prompt templates can be invoked in Lightning Pages, Flows, Apex and even custom UI using Lightning Web
Component, you can create an app for any scenario – even beyond your CRM users. IT, admins, and developers
can collaborate with business teams to build productivity applications that natively embeds Salesforce AI.
The Salesforce Platform provides you with the low-code tools to build, test, and optimize custom
Get Started with Prompt Builder | Common Use Cases of Prompt Builder | 11
AI experiences that are grounded in your data. And Salesforce keeps you and your customers
secure and compliant with leading security, governance, and privacy tools.
Solution: Solution:
Create an HR recruiting portal with Prompt Builder Develop an AI-powered project management
and Experience Cloud. First, use Prompt Builder application featuring App Builder, Prompt
to build a prompt template that summarizes Builder and Flows. Automatically initiate a new
job applications into a brief overview of the project, upon opportunity close, using Flow
candidate’s background. Second, create a prompt Builder. Leverage Prompt Builder to extract
template that generates specific interview contract requirements from Sales Cloud
questions based on candidate applications, objects, like Accounts and Opportunities, and
job requirements, and company values. Last, integrate these details into your new project
create a prompt template that summarizes all management application. Use Prompt Builder
the interviewer feedback to define next steps. templates to formulate a summarized resource
plan. As the project progresses, employ Prompt
Finally, surface all of these generated outputs in a Builder templates to automatically generate
custom Lightning Web Component that embeds in change requests, notify the relevant team
the recruiting portal, powered by Experience Cloud. members, and compile milestone summaries
to ensure everyone is informed and aligned.
CONCLUSION
Talk to an Expert