Loading
Prepare for Email to Become the Default Login ExperienceRead More
Intermittent freezing when using using certain browser versionsRead More
Automate Your Business Processes with Salesforce Flow
Creating Flow Formulas with Agentforce (Beta)

Creating Flow Formulas with Agentforce (Beta)

Save time by using generative AI to build formulas in Flow Builder. Simply describe your formula and let Agentforce 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.
Note
Note Drafting a Flow and Formula with Agentforce is a pilot or beta service that is subject to the Beta Services Terms at Agreements - Salesforce.com or a written Unified Pilot Agreement if executed by Customer, and applicable terms in the Product Terms Directory. Use of this pilot or beta service is at the Customer's sole discretion.
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
Note
Note You don't need to be an admin to have the Manage Flow permission. Ask your admin to add it to your profile or permission set.

Guidelines and Considerations for Creating Formulas with Agentforce (Beta)

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 Agentforce with a detailed description. Review these example descriptions to get an idea of what type of information Agentforce 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

Agentforce 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

Agentforce 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 Agentforce 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 Agentforce (Beta)

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

Turn on Einstein generative AI in Setup. Then find and select Process Automation Settings, and enable formulas created by Einstein, and Agentforce flow automation (Beta).

  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 Agentforce 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 Agentforce (Beta)

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

Turn on Einstein generative AI in Setup. Then go to Process Automation Settings, and enable formulas created by Einstein and Agentforce flow automation (Beta).

  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