Einstein for Flow: Using Generative AI to Assist Your Flows.

Einstein for Flow: Using Generative AI to Assist Your Flows

By

Editor’s note: This article was updated on July 24, 2024, with the latest information and resources.

As part of Salesforce’s continuous evolution of Einstein, it’s time we take a moment to provide an update on how Einstein is impacting one of your favorite tools in your admin toolbox: Salesforce Flow. Flow has many powerful capabilities and has helped Salesforce Admins like you streamline and automate your work, all while providing value to end users in your organizations.

To help you get ready for Einstein for Flow, I worked on creating this article with Connor Turco, Einstein for Flow Product Manager, and Vera Vetter, Director of Product Management, AI Research. Together with Vera and Connor, we are the product managers working on Einstein for Flow.

If you’re interested in learning more after reading this blog post, you’re in luck! Check out our “Automate This!” episode to dive deeper into Einstein for Flow and hear firsthand experiences from one of our pilot customers.

Introducing Einstein for Flow, the generative AI product for Flow 🎉

So, what’s Einstein for Flow? Einstein for Flow is Salesforce’s brand new feature that leverages large language models (LLMs) to build flows. Simply type in a prompt describing the flow you want to build, and watch as Einstein builds it in seconds!

For new admins, Einstein for Flow can help you learn and adopt this powerful new capability. For experienced admins, it’s your assistant, providing a valuable starting point when building complex flows.

Einstein for Flow is currently in beta (as of Summer ’24) and is available to customers who have purchased the Einstein 1 Editions or the Einstein for Sales, Service, or Platform add-ons. While the product is in beta, it will not consume AI credits.

What can I build with Einstein for Flow?

Einstein for Flow currently provides support for:

  • Flows with both standard and custom objects
  • Screen, record-triggered, schedule-triggered, and autolaunched flows
  • Flows with four to six elements
  • Basic formulas, email text templates, record variables, collections, loops, Decision elements, and Get/Create/Update records

What's supported in Einstein for FlowAfter generating a starter flow with Einstein, you can edit, save, test, and activate it just like any other flow you create in Salesforce. Notice we said “starter flow.” Like with anything created by AI, you should review the flow, putting that human in the loop to ensure its accuracy, and make any needed changes to the flow prior to testing, activation, and deployment.

How do I write a good prompt?

Crafting the perfect prompt is the key to unlocking the full potential of Einstein for Flow! Detailed and clear prompts lead to accurate and powerful outputs, while vague prompts can lead to poor results. Here’s how you can make sure your prompts are spot on.

For every prompt, it’s important to define:

  • The type of flow, and the object(s) and field(s) involved in the entry condition
    • For example: “Create a record-triggered flow that looks for all cases with the status escalated.”
  • The action needed: CRUD (create/read/update/delete) of records, notifications, or something else
    • For example: “Then create a task for the case owner to follow up.”

To really drive home the importance of good prompt writing, let’s look at an example.

Good and bad prompt examples

Bad Prompt: “Create a flow that looks up all open opportunities.”
Imagine you wrote a prompt like, “Create a flow that looks up all open opportunities.” Not great, right? This prompt is too vague and incomplete—it doesn’t specify what action is needed once the opportunities have been looked up. Additionally, for the Opportunity standard object, there is no status of “open”. Using unclear terminology can confuse Einstein, leading to inaccurate flows.

Good Prompt: “Create a flow that looks up all opportunities that have not closed and creates a task for the opportunity owner to update their opportunity.”
Now this improves on the previous prompt. By specifying “opportunities that have not closed” instead of “open”, we ensure clarity and avoid confusion. Plus, including a specific action (create a task) gives Einstein clear instructions on what to do with the records it finds.

See the difference? By being detailed and specific, you can make sure Einstein for Flow delivers exactly what you need.

How do I use Einstein for Flow?

To get started with Einstein for Flow, you’ll need to opt-in from the Einstein for Flow setup page. After agreeing to the terms, you’ll be able to select the Let Einstein Help You Build option when creating a new flow. Then, simply enter a prompt describing what you want to build, and watch as Einstein generates the flow for you. From there, you can edit, save, and activate the flow, giving you full control and flexibility.

Technical deep dive

Which LLM powers Einstein for Flow?

Generative AI is an incredibly dynamic field, and we’ve been helping our customers stay at the forefront of this important shift and maximize the value LLMs can bring to their businesses. For nearly a decade, Salesforce has spearheaded innovation in AI.

The investment and evolution of Einstein at Salesforce, starting back in 2014.

Salesforce AI Research’s CodeGen, our in-house LLM, was one such innovation created to help transform how we approach software development.

And speaking of CodeGen, guess what? It’s the powerhouse behind Einstein for Flow! Dreamforce ’23 was the first time we publicly spoke about the secret sauce of Einstein for Flow. By leveraging our own custom model, we can tailor an AI solution specific to the needs of Salesforce users.

How does CodeGen work?

Here’s how it works: You simply describe your flow requirement in plain words, via a natural language prompt. Einstein calls upon code to interpret and generate the natural flow data.

Since flows can be intricate, we introduce the concept called a chain of thought. With that, we decompose the flow into manageable steps. Then, each part is sequentially created and, finally, the segments are merged together into the final flow. This methodology ensures the output accurately mirrors your automation needs.

As you can see, a lot is going on behind the scenes powering Einstein for Flow!

Chart demonstrating how AI powers Einstein for Flow.

What’s next on the roadmap?

We have many upcoming features on our roadmap to help admins realize the full potential of Einstein for Flow.

In Winter ’25, we’re introducing the “Edit a Prompt” feature. You’ll be able to tweak your prompt wording and experiment with different phrasings to generate a better flow. Prompt writing is often an iterative process where some experimentation is needed to get your desired output. This new feature makes that process easier and more efficient for you.

Not sure what some of your org’s flows actually do? You’re not alone! Many customers have hundreds, sometimes even thousands, of flows in their orgs, and they often don’t know the purpose of half of them. In a future release, you’ll be able to summarize existing flows in your org with Einstein. This feature will be especially helpful for admins new to an organization or for orgs with a large number of flows.

We aim to make Einstein for Flow easy by default and advanced by choice. That’s why we plan to provide support for editing flows with natural language. Simply tell Einstein what updates you want, and watch as Einstein makes those adjustments for you. As changes are made, you’ll see a step-by-step list of all modifications on the canvas and in the conversation history. This allows you to quickly approve or undo changes, giving you confidence in the accuracy of your org’s flows.

This is just the beginning

We’re just getting started with Einstein for Flow. There are many more use cases and capabilities we plan to address in the future.

Curious to know more about how Salesforce is embracing AI across our products? Dive into the 360 Blog. And for all things Flow, check out the resources below. Get ready to ride the Einstein for Flow wave–it’s a game-changer! 🚀

Resources

Unleashing productivity: Master prompt templates with flow tools

Unleashing Productivity: Master Prompt Templates with Flow Tools

Prompt Builder became generally available on February 29, just over two months ago. Since then, we’ve seen a lot of Salesforce Admins start to experiment and come up with a wide variety of use cases to leverage it. From summarizing records to generating points of view and even creating business-context rich emails, there are a […]

READ MORE
A Salesforce Admin's Guide to TrailblazerDX 2024.

A Salesforce Admin’s Guide to TrailblazerDX 2024

The Trailblazer community is coming back together on March 6-7, 2024, in San Francisco and on Salesforce+ for TrailblazerDX 2024—join us! Generative artificial intelligence (AI) is revolutionizing application development, creating the most significant shift and opportunities for both admins and developers in decades. At TDX, you’ll learn to supercharge user productivity, automate business processes, and […]

READ MORE
Be Release Ready Spring '24 | The Ultimate Guide to Prompt Builder.

The Ultimate Guide to Prompt Builder | Spring ’24

Artificial intelligence (AI) is not a new concept to Salesforce or to Salesforce Admins. Over the years, Salesforce has empowered admins with a user-friendly interface for the setup and configuration of predictive AI features such as Opportunity Scoring, Lead Scoring, Einstein Bots, and more. The introduction of generative AI in Salesforce brings even more possibilities […]

READ MORE