This guide is part of our series on “Mastering Einstein Copilot & Prompt Builder”.
To explore the complete series, please click here.
To enhance the effectiveness of prompt templates in Salesforce, it’s important to make them context-aware, allowing AI models to deliver better results. One way to do this is by using merge fields to pull relevant data from your Salesforce org. This gives the AI the necessary context to generate more accurate and meaningful responses.
Salesforce Prompt Builder lets you use merge fields from different sources, including:
- Record Merge Fileds
- Related List Merge Fields
- Flow Merge Fields
- Apex Merge Fields
- Data Cloud DMO Merge Fields
- Record Snapshot Merge Fields
In this guide, we’ll focus on using Flow Merge Fields in a prompt template.
Business Use Case: Proactively Managing Opportunity Risks with AI
Imagine you’re a sales rep managing multiple accounts, each with its own open opportunities and ongoing cases. Keeping track of everything can be challenging. Now, what if you had an AI assistant that could analyze these cases and opportunities, flagging any risks that might affect your deals?
That’s exactly what we aim to do here. By using Flow, we can filter down to only the open cases and opportunities related to a specific account. This data is then fed into the AI, prompting it to assess whether any open cases could negatively impact ongoing opportunities.
For instance, let’s say you’re about to close a deal with a customer for a large order of mobile generators. But there’s also a high-priority case open from the same customer regarding issues with a generator they previously purchased. This could signal a potential risk – the customer might be hesitant to make another purchase if they’re not satisfied with their existing product and/or your service.
Benefits for Sales Reps and the Business:
- Proactive Risk Management: Spot potential deal-breakers early, allowing you to address concerns and increase your chances of closing deals.
- Improved Customer Relationships: Show customers that you’re aware of their concerns, building trust and loyalty.
- Increased Sales Efficiency: Focus on the most promising opportunities, saving time and resources.
- Enhanced Decision-Making: Gain insights into account health, leading to more informed sales strategies and forecasts.
Where to Use Flow Merge Fields?
- Flow Merge Fields are ideal when you need to retrieve specific data based on filter conditions. In situations where using “Related List” merge fields would pull in too many records (creating unnecessary noise for the AI), Flow is a better option.
- It’s also useful for retrieving data from multiple objects based on complex logic or
- When pulling data from external systems using an HTTP Callout action in Flows.
Step-by-Step Guide: Using Flow Merge Fields in Prompt Template
In this guide, we will walk through how to use Flow Merge Fields to analyze open Cases and Opportunities for an Account, focusing on how open cases may impact opportunities. We will make use of Template-Triggered Prompt Flow, a new type of Flow that Salesforce has introduced specifically for this purpose.
This process is simple and should take 20-30 minutes to configure and test. Here’s what the guide covers:
- Sign Up & Set Up Einstein Generative AI Trial Org
- Create Flows to Get Open Cases & Opportunities
- Create Prompt Template
- Create Agent Custom Action
- Assign Custom Action to Copilot
- Test Prompt Template with Einstein Copilot
The following diagram highlights the key components we will cover in this guide within the overall flow of Einstein Copilot & Prompt Builder:
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.
Unlock the Power of Salesforce Generative AI: Master Einstein Copilot & Prompt Builder!
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 Einstein Copilot 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.
Conclusion
Incorporating Flow Merge Fields into your prompt templates is a powerful way to enhance the relevance and actionability of AI-driven insights. By tailoring data inputs based on specific conditions, you improve the accuracy of the AI’s recommendations, ultimately empowering your users.
References & Useful URLs
- Salesforce help article – Ground with Flow Merge Fields