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
          AI Agent Actions

          AI Agent Actions

          Create an AI agent response for the specified user message. The agent must be active.

          Required Editions

          Available in: Lightning Experience
          Available in: Enterprise, Performance, Unlimited, and Developer Editions. Required add-on licenses vary by agent type.
          View licenses for integrated features.

          In Flow Builder, add an Action element to your flow. Select the AI Agent Actions category. Then, select the name of the agent to create a response with.

          The API name for each action is prefixed with generateAIAgentResponse.

          Set Input Values

          Input Parameter Description
          Agent Request A question or request to send to the agent that generates the output for this action. This field is available in version 1.1.0 and later.
          User Message A question or request to send to the agent that generates the output for this action. This field is available in version 1.0.0 and earlier.
          Session ID The ID of the conversation session to send agent responses in.

          Configure Structured Output

          To configure structured output, use the action version 1.1.0 and later.

          Field Description
          Field Name Required. The unique alphanumeric name for the structured output field. The name can’t contain special characters or spaces.
          Description A brief description used with the field name to increase large language model (LLM) accuracy.
          Data Type

          Required. The data type of the field. Valid values:

          • String
          • Number
          • Boolean
          Required Indicates that the LLM must generate a response for this output field. Requiring output rows can result in inaccurate or harmful responses by the LLM.

          Store Output Values

          Field Description
          Agent Response The unstructured response from the agent. Returns null if structured output is configured.
          Session ID The ID of the conversation session that the agent response is in.
          Structured Agent Response The structured output from the agent. Returns null if no structured output is configured. This field is available in version 1.1.0 and later.

          Usage

          This action is available only if these criteria are met. Otherwise, the action fails.

          • Agentforce is enabled.
          • The user who runs the flow has the Manage AI Agents permission.
          • The specified agent has an active version.

          Inputs specific to the selected custom agent action are listed after the Configure Structured Output section.

          Structured Output Usage

          Before you configure structured output, enter a label and API name for the Action element, and then save the flow.

          When you configure structured output, define at least 1 structured output field before you save.

          When a custom agent action has configured structured output, Current Structured Output shows the associated structured data type.

          For each defined structured output field, two fields are created: one with the defined name and a related, Boolean _set field. For example, if you defined a structured output field named summary, then a Boolean field named summary_set is also created.

          Variable Value Description
          True The field was included in the structured agent response, but it had no set value.
          False The field wasn’t included in the structured agent response.

          When a defined structured output returns null, use its related _set field later in the flow to determine why the field is null.

           
          Loading
          Salesforce Help | Article