Step-by-Step Guide to Calling Prompt Template from Flow

This guide is part of our series on “Mastering Agentforce”.

To explore the complete series, please click here.

In today’s fast-paced business world, automation and artificial intelligence (AI) are no longer luxuries—they’re essential. Salesforce continues to empower organizations with cutting-edge tools like Agentforce, Prompt Templates, and Flows. These tools, when used together, unlock the true potential of Generative AI, enabling businesses to automate complex tasks seamlessly.

One powerful combination is calling a Prompt Template from a Flow. This allows you to infuse AI-driven insights directly into your business processes, enhancing efficiency and productivity.

Here’s how it works:

  1. Prompt Templates define specific AI tasks. For example, you can instruct the AI to analyze a contact’s job title and determine their management level.
  2. Flows serve as the engine that triggers and processes these AI instructions automatically, based on predefined events or conditions.

A Simple Analogy

Think of a Prompt Template as a “chef” who knows how to make specific dishes (e.g., determining management level). Flows are the “waitstaff” who deliver the ingredients (job title) to the chef and return the finished dish (management level). Together, they provide seamless service to your business!

Benefits of Calling Prompt Template from Flow

  • Saves Time: Automates repetitive tasks, reducing manual input and saving time for sales representatives.
  • Improves Accuracy: With AI at the helm, you can trust that outputs like “Management Level” are consistent and error-free.
  • Enhances Productivity: Teams can prioritize their work better when critical fields are populated instantly.
  • Scalable Across Use Cases: This functionality isn’t just for Sales. It can be applied in Support, Marketing, and HR processes too.

Business Use Case: Identify the Seniority of a Contact

Imagine your sales team needing to prioritize outreach based on a contact’s seniority. Manually analyzing job titles to determine a “Management Level” is time-consuming and prone to errors. With a Flow calling a Prompt Template, this process becomes seamless.

For example:

  1. A contact is added or updated in Salesforce.
  2. The Flow triggers the Prompt Template to analyze the job title.
  3. The AI analyzes the job title and determines ‘Management Level’ of the contact and returns it to the Flow.
  4. The Flow updates the value in the record.

This automation ensures that sales representatives can focus on high-priority contacts, improving the efficiency of their outreach and leading to more successful outcomes.

Business Use Case for Calling Prompt Template from Flow

Step-by-Step Guide: Calling Prompt Template from Flow

In this guide, we will walk through how to call a prompt template from a record-triggered flow to automatically generate & populate values in a field on the record.

This process is simple and should take 15-20 minutes to configure and test. Here’s what the guide covers:

  1. Sign Up & Set Up Agentforce Trial Org
  2. Create a Custom Field on Contact object to store the ‘Management Level’ of the contact
  3. Create a Prompt Template to analyze job titles and determine management levels
  4. Build a Record-Triggered Flow that calls the Prompt Template
  5. Test the Flow and Prompt Template to ensure functionality

In the overall flow of Agentforce, the following diagram highlights the key components that we will cover in this guide.

Agentforce Flow Overview - Calling Prompt Template from Flow

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.

Not an “All Access” Pass Member Yet?

Get Download Access to this & 150+ More Step-by-Step Guides with “All Access” Pass. A simple and single plan to access our entire library of courses, guides, workshops & masterclasses on Salesforce.

Unlock the Power of Salesforce Generative AI: Master Agentforce!

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 Agentforce, Agents, Topics, Actions 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.

Other Real-World Business Use Cases

The combination of Prompt Templates and Flows offers versatility across the business operations, and here are some other scenarios where this powerful duo can drive significant impact:

  • Customer Support Case Prioritization: Use AI to analyze case descriptions and automatically assign a priority level, helping agents focus on the most urgent issues.
  • Marketing Campaign Segmentation: Categorize leads or contacts into groups based on AI analysis of their roles or industries for tailored campaigns.
  • Recruitment Automation: Classify job applications by experience or skill levels to speed up candidate shortlisting.
  • Opportunity Qualification: Analyze opportunity descriptions to identify and flag high-value deals for focused attention.

Conclusion

Calling Prompt Template from Flow is more than a feature—it’s a transformative way to leverage AI and automation in Salesforce. By combining the intelligent decision-making of Generative AI with the power of Flows, you can streamline processes, enhance productivity, and ensure consistency across your organization.

References & Useful URLs

Scroll to Top