Einstein 1 Studio: Transforming customer engagement with Prompt Builder

At its core, Prompt Builder is your ticket to crafting personalized prompts that guide large language models (LLMs) in generating content tailored to your needs. These prompts provide detailed instructions, ensuring the AI understands the context and accurately responds.

  • Published 02 May 2024
  • 8 mins read
Einstein 1 Studio: Transforming customer engagement with Prompt Builder
Table of contents

Hutte expert panel

Here are the experts we collaborated with to bring you unique insights.

Article Summary Box

Article highlights

  • Prompt Builder allows users to craft personalized prompts for guiding large language models (LLMs) in generating content tailored to specific needs, enhancing workflow efficiency by integrating with CRM data.
  • Effective prompts consist of ingredients (context like sender and receiver information and objectives), clear instructions (directives for content generation), and additional information (constraints on language, style, and tone) to ensure accurate AI responses.
  • Prompt templates are reusable, connecting to CRM data for personalized outputs. Eliminating repetitive prompt creation improves efficiency and enables targeted engagement with hyper-customized content.

With Einstein 1 Studio's Prompt Builder, you can create, test, revise, customize, and manage Prompt Templates while leveraging your CRM data. By embedding generative AI experiences into your workflows, Prompt Builder empowers users with assistive features across desktop and mobile platforms.

So, let's dive into this article by first discovering how to create prompts.

Crafting the perfect prompt

To create effective prompts, you need the right ingredients and clear instructions. The key components of a prompt include:

  • Ingredients: These set the stage for the AI, providing context such as sender and receiver information, user objectives, and relevant data.
  • Instructions: Clear directives tell the LLM what type of content to generate and what parameters to adhere to, enhancing response accuracy.
  • Additional information: Constraints such as language, style, and tone guide the AI within defined guardrails, ensuring customized and accurate responses.

Prompt Templates

Prompt Templates are reusable prompts personalized with real data to create customized responses. Connect your Prompt Templates to your CRM data to target and personalize the output.

Once you've filled in placeholders with relevant information from your CRM, the template becomes a personalized prompt.

Keep reviewing and revising templates until the AI produces the desired response.

Advantages of prompts

  • Reusability: Create a Prompt Template once and generate countless versions of personalized content for different audiences.
  • Enhanced efficiency: By eliminating the need to build individual prompts repeatedly, Prompt Builder frees up valuable time for your teams to focus on completing essential tasks.
  • Targeted engagement: Prompt Builder enables you to deliver hyper-targeted content that speaks directly to your audience's needs and preferences by connecting prompt templates to CRM data.

An example use case

Sophie understands that her company's sales team is often unaware of ongoing issues during customer calls, particularly with escalated cases. Though management has suggested that support provide real-time summaries of customer cases to the sales team before calls, this has yet to be feasible.

Recognizing a potential solution, Sophie sees that Field Generation Templates can integrate with Flow Builder to access case data, allowing an LLM to generate summaries.


  • Go to "Setup," the "Quick Find" box, and "Einstein Setup." You will then turn on Einstein.
Image source: Salesforce 
  • Create a new custom field on "Account" to store the response generated by the Prompt Builder.
  • Label: Open Cases Summary.
  • Data type: Long Text Area.
Before creating your Field Generation Prompt Template, create a Flow that retrieves a list of open customer cases.

Step 1: Set up a Template-Triggered Prompt Flow

  1. Go to "Setup," the "Quick Find" box, and "Flows."
  2. Click "New Flow" and "Template-Triggered Prompt Flow."
  3. You will select "Prompt Template Type: Field Generation Template."
  4. You will then go to "Object: Account."

After adding and configuring the elements, the final Flow should look like the image below.

Image source: Salesforce 

In this Flow, two "add prompt instructions" elements are configured as follows:

Add the prompt instructions element

  • Label: Add Case Details to Prompt Template.
  • Prompt instructions: Case details: {!Get_Each_Case.Subject}, {!Get_Each_Case.Description}.

Add a note about no open cases

  • Label: Add Note About No Open Cases.
  • Prompt instructions: There are no open cases.
  • Save the Flow as "Get Open Cases for Account."

After the Flow is done, create a Field Generation Prompt Template in Prompt Builder.

Step 2: Create a Prompt Template

To create a Field Generation Prompt Template, you will:

  1. Go to "Setup," the "Quick Find" box, "Prompt Builder," and "New Prompt Template."
  2. Prompt Template Type: Field Generation.
  3. Prompt Template Name: Summarize Open Cases.
  4. Object: Account.
  5. Object field: Open Case Summary.
  6. Click "Next," and you will be redirected to the Prompt Template workspace.
Image source: Salesforce 

Enter the prompt

You’re a support representative, and you need to create a short summary of all open cases for account "<account.Id__Merge_Field.>" When asked to summarize the open cases, strictly follow the instructions below.


  1. Summarize the open cases in one paragraph no longer than 500 characters. Mention how many open cases there are and what the case issues are.
  2. Use clear, concise, and straightforward language using the active voice and strictly avoiding the use of filler words and phrases and redundant language.
  3. Use the following information to write the summary: "<Get_Open_Cases_for_Account__Prompt_Flow.>"
  4. Avoid any positive or negative traits in the summary.
  5. Now create the summary.
Author's note: There are two merge fields in the prompt above. 

They are configured as follows:

  • <account.Id__Merge_Field:> Go to the "Resource" search bar, "Account," and "Account Id."
  • <Get_Open_Cases_for_Account__Prompt_Flow:> Go to the "Resource" search bar, "Flows," and "Get Open Cases for Account."

The Prompt Template should look like this:

Image source: Salesforce 

Step 3: Enable dynamic forms and apply the template to the field

  • Click the gear icon and "Edit Page."
  • Select the contents of the "Details" section, click "Upgrade Now," "Next," "Account Layout," and "Finish."
Image source: Salesforce
  • In the "Details" section, click the "Open Cases Summary" field.
  • Prompt Template: Summarize Open Cases.
Image source: Salesforce
  • Click "Save," "Activate," "Assign as Org Default," "Next," and "Save."
  • Click the back arrow in the upper left corner to leave the Lightning App Builder.
  • The field is now ready to use Einstein Generative AI and will have a little star next to it.
Image source: Salesforce


  • Click the pencil icon on the "Open Cases Summary" field.
  • Click the 'sparkle' icon on the right of the field.
  • This automatically opens up the Einstein overlay, using the Prompt Template to start a new conversation.
Image source: Salesforce
  1. Click "Use" and "X" to close the Einstein overlay.
  2. You will notice that the "Open Cases Summary" field is filled in.
  3. Click "Save."
Image source: Salesforce
Author's note: Check out the Prompt Builder help article from Salesforce for more information.

Evaluating the efficacy of Prompt Builder

Based on the output generated by the prompt, it is evident that the model understands the data provided by the CRM and generates an output after analyzing the request specified by the user in the prompt. This makes the generated response very reliable.

It's important to remember that the response generated by the Prompt Builder should not be used without human oversight. This 'human-in-the-loop' practice is a necessary step for trusted generative AI. As AI is still in its early stages, we can look forward to ongoing improvements to the Prompt Builder, which will further enhance its reliability and usability.

What's next?

Are you looking to add an expert human touch to your Git-based Salesforce development?

Last updated: 11 Jun 2024