Create a Filter to Control Access to Subagents and Actions in the Legacy Builder

Create filters for subagents and actions to make sure that your agent can use them in a conversation only when certain conditions are met. You can limit access based on any variable you specify. For agents on customer channels, we recommend using filters to require authentication for subagents and actions that perform tasks for a user.

Required Editions

Available in: Lightning Experience
Available in: Enterprise, Performance, Unlimited, and Developer Editions. Required add-on licenses vary by agent type.
User Permissions Needed
To create and manage filters: Manage AI Agents AND the required permissions for your agent type

Before you begin, from the Context panel, add any variables that you want to use in filter conditions to your agent.

  1. From the Agentforce Agents Setup page, launch your agent in Agentforce Builder.
  2. If your agent is active, deactivate it.
  3. From the sidebar, select Context.
  4. From the Context panel, select the Filters tab, and then click New.
  5. Enter a name, API name, and description for your filter.
  6. Specify whether any condition or all conditions must be met for an agent to use a subagent or action with this filter applied.
  7. To create a condition, specify a variable, an operator, and a value.
    You can create multiple conditions. Context, conversation, and custom variables are supported.
  8. Save your changes.
  9. To use your filter, apply it to one or more subagents or actions.
    1. From the Subagents panel, click the name of the subagent that you want to modify.
    2. To add the filter to the subagent, on the subagent's details panel, click Filter icon.
    3. To add the filter to an action in the subagent, select the This Subagent's Actions tab, and then click the name of the action that you want to modify. On the action’s details panel, click Filter icon.
    4. Search for and select the filter that you want to apply, and then save your changes. Your filter is applied to the subagent or action in this agent only.

To test your filter, restart the preview conversation to apply your changes.

To view the filters applied to a subagent or action, or to add or remove a filter, from the Subagents panel, open the details panel for that asset.

To edit or delete a filter, from the Context panel, select the Filters tab, and then open the filter that you want to modify. You can also view all of the assets that are currently using the filter.