3D image of eBook with header A Guide to Agentforce and Einstein for Marketers
Free ResourceDownload now

When Agentforce launched, Salesforce customers were excited. Generative AI’s ability to handle repetitive marketing tasks and respond to prospect behavior in real time unlocks smarter strategies and greater efficiency. Now, Marketing Cloud and Sales Cloud users can drive better ROI with less effort - even with tight budgets or limited resources.

But the first step is getting familiar with ‘prompt engineering’.

(Don’t be intimidated by the term ‘engineering’, it essentially means how to write prompts!)

And the second step is knowing where in Agentforce to enter your prompts.

Before we look at how to use Salesforce Prompt Builder, let’s cover some basics.

What is an AI prompt?

Put simply, prompts are detailed instructions that guide the large language model (LLM) behind AI technology. 

Effective prompts contain your business data, contextual information, and restraints, so Agentforce can generate the most meaningful results. The better formulated and detailed your prompts, the more accurate and scalable your Agentforce Agents will be. 

Without unique prompts, every business using AI would be creating the same content or relying on Agents to follow the same process. As consumers, we’d be having the same experiences and reading generic emails from every brand - it wouldn’t be effective!

Mastering prompt engineering aka how to write prompts that apply to your specific business, processes, branding, and use cases, is how you truly tap into Agentforce for next-level marketing.

A Guide to Agentforce & Einstein for Marketers

Learn what each tool does, how it fits into your existing processes, and why adopting Agentforce now is key to staying ahead.

  • Benefits for marketing teams
  • The Einstein Trust Layer
  • Overview of Salesforce AI
  • In-depth look: Einstein
  • In-depth look: Agentforce
  • Best practices for adoption
Guide to Agentforce & Einstein for Marketers
3D image of eBook with header A Guide to Agentforce and Einstein for Marketers

What is Salesforce Prompt Builder?

Prompt Builder is a component of Agentforce that allows you to create reusable prompt templates that power Agent Actions and workflows. It’s a single place to manage and apply all of your prompts across your Agents.

Prompt templates work hand-in-hand with Agent Actions, describing jobs for Agents when executing a task. Templates and Actions are based on the data in your Salesforce org, such as automatically sending sales development emails to hot leads, creating marketing content, or assessing customer sentiment.

Screenshot of Agentforce Prompt Builder Template workspace

Importantly, Prompt Builder enables businesses to scale their AI solution, because prompt templates are reusable. Rather than each user creating a prompt for their Agent and desired interaction, a single template can be applied to multiple Actions.

Other benefits include:

  • Personalise prompts with Salesforce data - making them more relevant and avoiding generic output.

  • Test and tweak prompts - to protect customer data and ensure sensitive information is secure (the Einstein Trust Layer takes care of this), and to limit bias.

  • Deliver generative experiences faster - across record pages, Flows, and Agentforce Actions.

Screenshot of Agentforce Agent Topics settings

How to use Prompt Builder

The process for using Salesforce Prompt Builder is very straightforward. To access it, follow these steps:

1. Assign the necessary permission set:

  • Ensure your Salesforce administrator assigns you the Prompt Template Manager permission set. This permission is required to create and manage prompt templates in Prompt Builder. 

2. Access Prompt Builder via Setup:

  • Navigate to Setup in Salesforce.

  • In the Quick Find box, type “Prompt Builder.”

  • Select Prompt Builder from the search results to open the tool.  

Next, you need to create prompt templates using your Salesforce, Data Cloud, or even external data. You can do this using natural language and by retrieving data using dynamically using Retrieval-Augmented Generation (RAG) methods or logic built in Flows. 

Screenshot of Prompt Builder resources

According to Salesforce, every effective Agentforce prompt should contain:

  • Who is involved, and how are they related? i.e. participants, relationships, data.

  • For example: ‘You are a marketer named {!user.firstname} {!user.lastname} from a company named MarCloud. You are writing an email to {!account.name} who has been identified as a potential customer.

  • What is the context? i.e. setting, tone and style, language.

  • For example: Write an email in the style of a one-to-one communication, written in British English. The email should be conversational yet professional, with short sentences and a positive tone.

  • What are you trying to accomplish? i.e. goal, instructions

  • For example: You are attempting to persuade {!account.name} to schedule a fifteen-minute introductory call. Describe the business value of the call in the context of other MarCloud clients who are {!account.status}.

  • What are the constraints? i.e. limits, instructions

  • For example: Limit the email to about 300 words, and do not address any content or generate answers that you don’t have complete data on. Avoid jargon and complex language.

At the time of writing, there are three types of prompt templates available:

  1. Sales Email - build a custom prompt to automatically create emails for users.

  2. Field Generation - enables your users to populate a single field on a single record with a summary or description created by an LLM.

  3. Flex - create a customised prompt template that incorporates records from multiple objects simultaneously.

Screenshot of Salesforce infographic showing Lifecycle of a Prompt Template
Source: Salesforce

It’s a good idea to write your prompt in a separate document, and then copy and paste it into Prompt Builder. This will allow you to see previous versions and record changes as you move on to the next step: testing.

Testing in Prompt Builder

Even the most well-defined prompt needs testing. Using a Sandbox environment, use Prompt Builder to check and refine your template, ensuring you’re seeing the intended response using real data and version control.

Screenshot of a Prompt Preview and Response
Source: Salesforce

You should be checking for things like:

  • Does the response meet the intended goal for the action?

  • Does the tone, style, vocabulary, and so on meet brand style guidelines?

  • Is the response free from toxic (offensive or disrespectful) language and bias?

  • Is the response directly relevant and consistent when regenerated?

  • Is the response factually correct and without errors?

If you’re not happy with the result, finetune by revising your prompt to add more ‘grounding’ data aka specific domain knowledge and context, rephrasing, or enhancing.

Once you’re confident your prompt is working as intended, you can activate it.

In Agentforce, you can select a prompt template when building Agents and assigning custom Actions. You can also embed prompt templates in record pages using Lightning App Builder, Flows, or Apex.

Use case: How MarCloud uses Prompt Builder

There are many use cases for Agentforce. In the short time Agentforce has been available, MarCloud has integrated it into our sales process and successfully generated leads using Agents.

Alongside Account Engagement (Pardot), our Sales Development Representative Agent sends outreach emails to highly engaged prospects. 

For context, here are some snippets of our prompt, created in Salesforce Prompt Builder.

Screenshot of MarCloud prompt template
Screenshot of MarCloud prompt template

And here’s exactly what happens:

1. A prospect downloads some of our content and meets a scoring threshold.

2. MCAE assigns the prospect to a Salesforce queue.

3. Agentforce SDR is activated and proactively sends an email.

4. The prospect replies.

5. A MarCloud sales rep steps in to take things from there.

Screenshot of AI Agent generated email to MarCloud lead

The proof is in the pudding. 

With experience and knowledge in all things Salesforce marketing, we’re well placed to support clients with adopting Agentforce - including strategy, creating Agents, and crafting meaningful prompts in Salesforce Prompt Builder. 

To explore what’s possible with Agentforce for your business, book a call - our certified Salesforce specialists would love to talk about your marketing goals and challenges.

Tom Ryan headshot

Tom Ryan

Founder & CEO of MarCloud, Tom has been on both sides of the fence, client-side and agency, working with Salesforce platforms for the best part of a decade. He's a Salesforce Marketing Champion and certified consultant who loves to co-host webinars and pen original guides and articles. A regular contributor to online business and marketing publications, he's passionate about marketing automation and, along with the team, is rapidly making MarCloud the go-to place for Marketing Cloud and Salesforce expertise. He unapologetically uses the terms Pardot, Account Engagement and MCAE interchangeably.

More by Tom Ryan

Featured resource

3D image of eBook with header A Guide to Agentforce and Einstein for Marketers

A Guide to Agentforce & Einstein for Marketers

By the end of the free guide, you’ll know what each tool does, how it fits into your existing processes, and why adopting Agentforce now is key to staying ahead. If you’re ready to see how AI can save you time and deliver a stronger ROI, you need this eBook.

Download now
View all resources

More recent posts

View all articles
Illustrated characters holding a MarCloud banner

Sign up to the MarCloud Newsletter

MarCloud is a team of certified Pardot, Marketing Cloud, and Salesforce specialists. We help businesses to unlock the potential of marketing automation. Sign up to receive regular Marketing Cloud content to help you align your technology with your business goals.

Sign up to the newsletter

A Guide to Agentforce & Einstein for Marketers

Learn what each tool does, how it fits into your existing processes, and why adopting Agentforce now is key to staying ahead.

Download now