Everything to know about Prompt Builder in Salesforce

Everything to know about Prompt Builder in Salesforce

Prompt Builder enables Salesforce professionals to create AI-driven prompts that utilize Salesforce data for automatic content generation, improving workflows and enhancing engagement.

With features like the Einstein Trust layer for data security and customizable templates for various applications, Prompt Builder helps organizations effectively optimize communication strategies.

Why Use Prompt Builder in Salesforce?

  • Automate Content Creation: With Prompt Builder, admins can set up AI-powered tools that generate content automatically, reducing manual work.
  • Personalize Using Salesforce Data: The tool uses Salesforce data, such as customer information, to create tailored content that meets specific business goals.
  • Reuse Prompts Across Multiple Tools: You can use a single prompt in various Salesforce AI tools, such as Einstein Copilot, Lightning pages, and custom flows, maximizing its utility.

Prompts are directives that inform the LLM about the desired output. The quality and specificity of these prompts significantly affect the relevance and accuracy of the model’s responses, making well-structured prompts needed for optimal results.

Grounding involves adding relevant data to prompts to enhance response quality. Einstein generative AI uses Salesforce data for personalization, improving output. The Prompt Builder simplifies the inclusion of merge fields for record fields, flows, and Apex code.

The Einstein Trust layer protects sensitive data by masking it with placeholders. Users can view the masked text in the prompt resolution and see how it is reintegrated into the final response. All masked data is summarised in the Data Masking Details dialogue.

Overview of Prompt Template Types

  • Field Generation: This template auto-fills record fields with AI-generated content directly in Lightning Experience. Users can populate fields instantly with relevant data with a simple click.
  • Flex: Flex templates are customizable and ideal for unique business needs not addressed by other template types. They provide a flexible option for setting up tailored resources.
  • Sales Emails: This template generates customized emails based on data within records, allowing for more effective, personalized communication with customers.
  • Record Prioritization: This template ranks records using data or user input, which is instrumental in prioritizing tasks like opportunity management with Einstein Copilot.
  • Record Summary: Offering a snapshot of record details, this template type quickly compiles essential information, making it easier for users to review records through Einstein Copilot.

Managing Prompt Templates:

Managing Prompt Templates in Salesforce enables users to create, customize, and control AI-driven responses for specific business needs

Types of Templates: 

  • Pilot Templates: Limited to Prompt Builder pilot program participants, their text can be reused in new templates.
  • Custom Templates: Fully customizable templates created from scratch using the New Prompt Template button.
  • Standard Templates: Pre-configured templates available to all users. While you can’t modify them directly, you can copy and personalize them. The new version is saved as a custom template.

Activate and Deactivate Prompt Templates:

In Salesforce, you can activate or deactivate specific versions of prompt templates to manage user access effectively. This ensures that users interact only with the most relevant template version.

When creating prompt templates, it’s common to draft multiple versions to find the best combination of template content, grounding data, and large language models (LLMs). Templates remain inaccessible to users until they are activated.

Changing LLM Configurations in Prompt Builder:

Salesforce’s Prompt Builder enables users to modify large language model (LLM) configurations to customize AI-generated responses. You can choose from standard configurations or bring your own LLM (BYO-LLM). Modifying a standard configuration automatically creates a custom version, ensuring flexibility while preserving the original model.

Each prompt template version can have its own LLM configuration, but only the activated version is used. Once activated, a version becomes immutable, requiring creating a new version for any changes.

The “View this model” link in the configuration panel allows access to Einstein Studio for further model adjustments. It is available only to users with Data Cloud Admin permissions.

Prompt Builder in Salesforce
Source: Salesforce

Also Read: What is Agentforce in Salesforce?

Creating a Sales Email Prompt Template

Designing a sales email prompt template helps you connect with customers through personalized emails that leverage customer history and insights. This Template allows you to generate targeted emails at scale, reusing content for different products and customers, saving time, and simplifying workflows.

This feature is available in Lightning Experience and requires the Einstein for Sales add-on, which comes at an additional cost for Performance and Unlimited Editions. Users must have the Einstein Sales Emails permission set assigned. Additionally, make sure that Sales Emails are enabled in Setup and that all necessary permissions are correctly assigned.

Pre-requisite:

  • Open Setup: Click the gear icon in your Einstein-enabled org and select Setup.
  • Enable Einstein Setup: Search “Einstein Setup” in Quick Find, then click it. Toggle On to activate Einstein, and refresh your browser to update settings.

  • Enable Einstein for Sales: In Setup, search “Einstein for Sales” in Quick Find. Click it, then toggle Sales Emails to On to enable AI insights for sales.

Steps to Create a Sales Email Prompt Template

Access Prompt Builder: In Setup, search for Prompt Builder. Click New Prompt Template, select Sales Email in the Template Type dropdown, and enter a name and recipient type.

Define Content: Add a description and select related data, like Account if needed.

Edit Template: In Prompt Template Workspace, create or paste your email template along with instructions on how you want the LLM to draft the email.

For Example:

Greet {!$Input:Recipient.FirstName}warmly and introduce the potential of solar solutions.
Emphasize how solar panels can help {!$Input:Recipient.Account.Name} achieve sustainability goals.
Mention the energy cost savings associated with adopting solar power.
Call to Action: Invite {!$Input:Recipient.FirstName} to connect for further details or to discuss how solar solutions can benefit {!$Input:Recipient.Account.Name} specifically.
The sender’s Name would be {!$Input:Sender.Name}

Instructions:
“””

Use clear and concise language while maintaining an active voice. Avoid filler words, phrases, and redundancy.

Create a compelling subject line that enhances the likelihood of opening the email by incorporating relevant keywords related to the email content.

Encourage the prospect to respond indirectly by expressing your readiness to address any questions they may have.

Conclude the email with a direct call to action, inviting the prospect to a brief meeting.

“””

Now generate the introduction email to your prospect.

Prompt Builder in Salesforce

Generate & Preview: Select a recipient, and click Save & Preview to see the LLM’s email response.

You can also change the LLM model type and see which model works best for you. Testing multiple model types can provide insights into which LLM responds most accurately to your prompts. It aligns output with your intended tone and complexity, ensuring that generated responses are precise, and aligned with business language.

Prompt Builder in Salesforce

Want to Learn Salesforce Flows? Checkout our Salesforce Flow Course

How Can You Build Effective Prompt Templates?

Keep It Simple and Clear

Aim for clarity in your templates using straightforward language and avoiding technical terms. Natural, conversational language is easier for users to understand, so make your prompts feel approachable and concise.

Use Role-Playing to Add Context

To make responses more useful, set up scenarios where the AI takes on a specific role, like a sales or support representative. For instance, start with a prompt like, “You are a marketing executive planning an event for key clients,” which gives the model a clear perspective to generate a context-relevant response.

Iterate and Test for Improvement

Experiment with different versions of your templates to see which ones work best. Try achieving the same goal with slightly different prompts and gather user feedback on which formats generate the most valuable responses. This will allow you to refine the templates over time.

Separate Instructions from Context

Use an instruction section within your prompt template to help the model understand what’s happening. Start with Instructions and place these in triple quotes (“””) so the model knows exactly where the instructions are. This approach separates the context from specific actions.

Direct the Model for Targeted Outputs

Make sure the AI knows what output you need. For example, if you need it to draft an email, include instructions like, “Follow these instructions strictly to generate only the email content.” This makes the output more accurate and focused, so the model doesn’t add unnecessary details.

Use Example Templates as a Starting Point

Salesforce’s Example Prompt Template Library can be a helpful place to start. Look at the templates available to understand the structure and wording, then customize them to meet your needs.

FAQs

What are the Limitations of Prompt Builder in Salesforce?

The Prompt Builder in Salesforce provides valuable functionalities but has several limitations that can affect usability. Here’s a concise overview of these constraints:

Audit Trail Limitations: Changes made to prompt templates are not tracked in the Setup Audit Trail, making it difficult to monitor modifications.

Availability of Custom Objects and Fields: New custom objects and fields are not immediately accessible in the Prompt Builder after creation. Users must log out and log back in to use them, which can disrupt workflows.

Record Selector Limitations: Records without a name or encrypted name fields cannot be previewed in the record selector, limiting testing options for prompt templates.

Supported Object Types: The Prompt Builder supports specific object and field types, including:

  • Standard objects and fields
  • Custom objects (__c) and fields
  • Histories (__history)
  • Related lists (__r)

Note that the KnowledgeArticleVersion object is only supported for Flex Template types.

Object Preview Limitations: Objects lacking a Name field or an encrypted Name field cannot be previewed, further restricting testing capabilities.

Limitations for Field Generation Templates: Field Generation templates cannot populate rich text areas in knowledge entities. Users must use Flex templates, Flow, or Apex instead.

Limitations for Flex Templates: Metadata related to Flex templates, including references in Apex classes and flows, cannot be imported or exported. Deleting Flex templates requires first removing all associated flows and Apex resources.

Limitations for Einstein Search: Change sets do not include retrievers or search index metadata for Einstein Search prompts. Users must manually create these in the destination org before deployment.

To know the numeric Limits, please refer: Prompt Builder Limits

Conclusion:

Adding Prompt Builder to Salesforce improves content creation by offering flexibility, security, and accuracy. Its clear design helps users connect AI-generated content with their business goals while keeping data safe.

With customizable templates and options for large language models, Prompt Builder is a key tool for organizations looking to enhance their AI workflows and provide relevant, personalized content to their customers.

Get a complete Roadmap To Learn Salesforce Admin And Development

Share Now

Similar Posts

Leave a Reply

Your email address will not be published. Required fields are marked *