Loading
Salesforce now sends email only from verified domains. Read More
Automate Your Business Processes
Table of Contents
Select Filters

          No results
          No results
          Here are some search tips

          Check the spelling of your keywords.
          Use more general search terms.
          Select fewer filters to broaden your search.

          Search all of Salesforce Help
          Creating Flow Formulas with Einstein

          Creating Flow Formulas with Einstein

          Save time by using generative AI to build formulas in Flow Builder. Simply describe your formula and let Einstein figure out the functions and operators.

          Required Editions

          Available in: Lightning Experience
          View supported editions.
          This feature requires the Einstein for Sales, Einstein for Service, or Einstein Platform add-on. To purchase, contact your Salesforce account executive.
          User Permissions Needed
          To open, edit, create, activate or deactivate a flow using all flow types, elements, and features available in Flow Builder, including Einstein and Agentforce for Flow: Manage Flow

          Guidelines and Considerations for Creating Formulas with Einstein

          Review our guidelines and considerations to get the best results when you’re using generative AI to create formulas.

          Write a Clear Description of Your Formula

          To get an accurate formula, provide Einstein with a detailed description. Review these example descriptions to get an idea of what type of information Einstein is looking for.

          Description Formula
          Check to see if the {!NumberOfEmployees} field is set to zero. BLANKVALUE(NumberOfEmployees, 0)..
          Check if {!$Event.EndDateTime} is earlier than the current time {!$Event.EndDateTime} < NOW()
          Check if {!$Opportunity.IsClosed} is open and {!$Opportunity.Amount} is over $50,000. AND({!Opportunity.Amount} > 50000, {!Opportunity.IsClosed} = false)

          To get the most accurate formula, when including a resource in your description, use the resource menu to select the resource instead of writing it in manually. To select a resource from the resource menu, click Insert a resource….

          Check Your Formula for Accuracy and Safety

          Einstein needs a human in the loop to make sure a formula is set up correctly and doesn’t output problematic language. After your formula is created, review it for accuracy and safety, and check the syntax. Then, test it in your flow to make sure it works as expected.

          If Your Formula Doesn’t Work, Try Again

          Einstein can give a different result each time you click Create to create a formula. So, if your formula isn’t what you expect, try your description again to see if you can get a valid result. Otherwise, modify the formula, or start over with a new description.

          Consideration

          Formulas created by Einstein are available only in Flow Formula Builder. For example, they are not supported in Screen element input validation formulas.

          Create a Start Element Criteria Formula with Einstein

          Quickly add formula entry criteria to a Start element with Einstein generative AI.

          Turn on Einstein generative AI in Setup. Then find and select Process Automation Settings, and enable formulas created by Einstein.

          1. In a flow, open the Start element.
          2. In the Set Entry Conditions section, for Condition Requirements, select Formula Evaluates to True.
          3. In the formula builder, click Einstein button.
          4. Describe the formula you want to create and click Create.
            The formula appears in the area where you build a formula from scratch.
          5. Check the syntax and test the formula before activating the flow.

          Create a Formula Resource with Einstein

          Create a formula resource with ease by using Einstein generative AI to create the formula.

          Turn on Einstein generative AI in Setup. ThenProcess Automation Settings, and enable formulas created by Einstein.

          1. In a flow, open the Toolbox and click New Resource.
          2. For Resource Type, select Formula.
          3. In the formula builder, click Einstein button.
          4. Describe the formula you want to create and click Create.
            The formula appears in the area where you build a formula from scratch.
          5. Check the syntax and test the formula before activating the flow.
           
          Loading
          Salesforce Help | Article