Note: 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.
GenAiPromptTemplate
Parent Type
File Suffix and Directory Location
GenAiPromptTemplate components have the suffix .genAiPromptTemplate and are stored in the genAiPromptTemplates folder.
Version
GenAiPromptTemplate components are available in API version 60.0 and later.
Special Access Rules
GenAiPromptTemplate is available only if Prompt Builder is enabled in your org and you have the Prompt Template Manager permission.
Fields
| Field Name | Description |
|---|---|
| activeVersion |
|
| activeVersionIdentifier |
|
| description |
|
| masterLabel |
|
| overridable |
|
| relatedEntity |
|
| relatedField |
|
| templateVersions |
|
| type |
|
| visibility |
|
GenAiPromptTemplateVersion
Represents a version of a prompt template.
| Field Name | Description |
|---|---|
| content |
|
| description |
|
| fileDroppingStrategy |
|
| generationTemplateConfigs |
|
| inputs |
|
| isCitationEnabled |
|
| outputSchema |
|
| primaryModel |
|
| responseFormat |
|
| status |
|
| templateDataProviders |
|
| versionNumber |
|
| versionIdentifier |
|
GenAiPromptTemplateGenerationConfig
References the policies for this prompt template version. A policy describes high-level behavior for the prompt template, such as the allowed languages, conversation style, or desired response length. Currently, a policy is defined in a configuration file.
GenAiPromptTemplateInput
Represents an input for a prompt template, such as a Salesforce record, field, or Apex primitive data type.
| Field Name | Description |
|---|---|
| apiName |
|
| definition |
|
| description |
|
| masterLabel |
|
| referenceName |
|
| required |
|
GenAiPromptTemplateDataProvider
Represents a source of data for a prompt template version, such as an invocable action, flow, or Apex method.
| Field Name | Description |
|---|---|
| definition |
|
| description |
|
| label |
|
| parameters |
|
| referenceName |
|
GenAiPromptTemplateDataProviderParam
Represents a parameter that a data provider uses to retrieve information.
| Field Name | Description |
|---|---|
| definition |
|
| isRequired |
|
| parameterName |
|
| valueExpression |
|
Declarative Metadata Sample Definition
The following is an example of a GenAiPromptTemplate component.
The following is an example package.xml that references the previous definition.
Wildcard Support in the Manifest File
This metadata type supports the wildcard character * (asterisk) in the package.xml manifest file. For information about using the manifest file, see Deploying and Retrieving Metadata with the Zip File.