lightning__AgentforceInput
Target
Enables a component to be used in agent actions. Use this target to configure your component to accept input data from a user in any agent action.
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.
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 |
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. | 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. | No |
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. | 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. name attribute is a list or a similar type. | No |
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 |
To expose a component property in an agent action, define the property in the component’s JavaScript class using the @api
decorator.
See Also