Configures the component for different targets and defines component properties. For agent actions, lightning__AgentforceInput and lightning__AgentforceOutput are supported targets. The targetConfigs tag contains at least one targetConfig tag.
targetConfig
Configures a component for action input with this attribute.
Attribute
Description
Required
targets
Specify one or more targets in the targets attribute, such as <targetConfig targets="lightning__AgentforceInput"> or <targetConfig targets="lightning__AgentforceInput,lightning__AgentforceOutput">.
Yes
targetType (Optional)
Specifies the data type that an agent action input expects from the component. To create a component that takes in one type of data and expects to return a different type of data, include both sourceType and targetType. For example, a component can let you select a single record from a set of records. The lightning__AgentforceInput target can have both sourceType and targetType, or up to one targetType tag.
Attribute
Description
Required
name
Name of the Lightning type that the agent action input expects from the component. This can be a standard Lightning type or a custom Lightning type. When you specify a custom Lightning type, you restrict the component to that type. This restriction means the component can only be used with that specific custom Lightning type and can’t be reused with any other. To use this component with a different custom Lightning type, create another <targetConfig> entry and specify the new type in its targetType attribute.
Note
Yes
itemTypeName
Name of the Lightning type that the agent action input expects from the component. This can be a standard Lightning type or a custom Lightning type. This attribute can only exist when the name attribute is a list or a similar type.
No
sourceType (Optional)
Specifies the data type that the agent action input provides to the component.
Attribute
Description
Required
name
Name of the Lightning type that the agent action input provides to the component. This can be a standard Lightning type or a custom Lightning type. When you specify a custom Lightning type, you restrict the component to that type. This restriction means the component can only be used with that specific custom Lightning type and can’t be reused with any other. To use this component with a different custom Lightning type, create another <targetConfig> entry and specify the new type in its targetType attribute.
Note
Yes
itemTypeName
Name of the Lightning type that the agent action input provides to the component. This can be a standard Lightning type or a custom Lightning type. This attribute can only exist when the name attribute is a list or a similar type.
No
property
Specifies a public property of a component. The component author defines the property in the component’s JavaScript class by using the @api decorator. See the Usage section.
Use the property tag with these attributes.
Attribute
Type
Description
Required
name
String
The property name. The component’s JavaScript class must have an @api property with the same name as the property name value.
Yes
type
String
The property’s data type. Make sure that this value matches the type assigned to the property in the component’s JavaScript module. If the types don’t match, the value in the configuration file takes precedence. Supports standard Lightning types and custom Lightning types.
Yes
Usage
To expose a component property in an agent action, define the property in the component’s JavaScript class using the @api decorator.
This release is in preview. Features described here don't become generally available until the latest general availability date that Salesforce announces for this release. Before then, and where features are noted as beta, pilot, or developer preview, we can't guarantee general availability within any particular time frame or at all. Make your purchase decisions only on the basis of generally available products and features.