ExternalAIModel

Represents the state of a given model for an Einstein for Service feature, such as Einstein Reply Recommendations.

Parent Type 

This type extends Metadata and inherits its fields.

File Suffix and Directory Location 

ExternalAIModel components have the suffix .externalAIModel and are stored in the externalAIModels folder.

Version 

Introduced in API version 51.0.

Special Access Rules 

This type is available only when an org is configured to access the application in the applicationSourceType field. For example, if applicationSourceType is set to ARTICLE_RECOMMENDATION, this type is available only if Einstein Article Recommendations is enabled in the org and the Main Services Agreement has been accepted.

Fields 

applicationSourceType 

  • Type: ApplicationSourceType (enumeration of type string)
  • Required: Yes
  • Description: Required. The target application for the configuration.
  • Possible values:
    • REPLY_RECOMMENDATION — Einstein Reply Recommendations
    • ARTICLE_RECOMMENDATION — Einstein Article Recommendations
    • UTTERANCE_RECOMMENDATION — Einstein Bot utterances
    • FAQ — Einstein Bot frequently asked questions

externalModelKey 

  • Type: string
  • Required: Yes
  • Description: - Required. Unique key which identifies external model corresponding this applicationType

externalModelStatus 

  • Type: ExternalModelStatus (enumeration of type string)
  • Required: Yes
  • Description: Required. The current state of a given model.
  • Possible values:
    • DISABLED
    • ENABLED
    • PAUSED

name 

  • Type: string
  • Required: Yes
  • Description: - Required. A reference to the configuration.

threshold 

  • Type: double
  • Required: No
  • Description: - Threshold override value for this model. Nillable.

trainingJobName 

  • Type: string
  • Required: No
  • Description: - Training job path corresponding to the given model. Nillable.

Declarative Metadata Sample Definition 

The following is an example of an ExternalAIModel component.

1<?xml version="1.0" encoding="UTF-8"?>
2<ExternalAIModel xmlns="http://soap.sforce.com/2006/04/metadata">
3    <applicationSourceType>REPLY_RECOMMENDATION</applicationSourceType>
4    <externalModelKey>0f16dea6-b886-44df-9cfa-4d96b51d6594</externalModelKey>
5    <externalModelStatus>ENABLED</externalModelStatus>
6    <name>SR1601228426202</name>
7    <threshold>0.9</threshold>
8    <trainingJobName>TestJob</trainingJobName>
9</ExternalAIModel>

The following is an example package.xml that references the previous definition.

1<?xml version="1.0" encoding="UTF-8"?>
2<Package xmlns="http://soap.sforce.com/2006/04/metadata">
3    <types>
4        <members>*</members>
5        <name>ExternalAIModel</name>
6    </types>
7</Package>

Wildcard Support in the Manifest File 

This metadata type doesn’t support 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.