Citations Apex Classes
This page contains the reference material for citations in Apex. For a guide on using these classes, see Get Started with Citations Apex. To generate inline citations via the Agent API, see Agent API Examples.
This class contains the data that an action returns to the Agentforce reasoning engine. The reasoning engine can then use this data if the citations service is called.
Property | Type | Description |
---|---|---|
inputText | string | The data from the action. |
sources | GenAiSourceReference | The source information. |
Represents a source of information for generating citations.
Property | Type | Description |
---|---|---|
id | string | The ID of the source information. |
contents | GenAiSourceContentInfo | The content of the source information |
metadata | GenAiSourceReferenceInfo | Metadata on the source information. |
Represents specific content from a source that's being cited.
Property | Type | Description |
---|---|---|
fieldName | string | Not required. The name of the field from the source. |
objectName | string | Not required. The object that the source data originates from. |
content | string | The data from the source. |
Represents metadata for a source reference.
Property | Type | Description |
---|---|---|
link | string | A link to the source content. |
source_object_record_id | string | The ID for the source object. |
source_object_api_name | string | The API name for the source. |
label | string | The custom label for the source. |
This class enables actions to directly provide citations for responses without calling the citations service through the Agentforce reasoning engine. This class closely resembles the output of the citations service.
Property | Type | Description |
---|---|---|
references | GenAiCitedReference | The reference to a source. |
Represents a citation or reference to a source.
Property | Type | Description |
---|---|---|
metadata | GenAiCitedReferenceInfo | The metadata for a source. |
Represents metadata for a cited reference.
Property | Type | Description |
---|---|---|
link | string | A link to the cited source content. |
source_object_record_id | string | The ID for the source object. |
source_object_api_name | string | The API name for the source. |
label | string | The custom label for the source. |