ServiceAISetupField

Represents a field on cases or knowledge articles that Einstein uses to identify relevant articles in Einstein Article Recommendations.

Parent Type 

This type extends Metadata and inherits its fields.

File Suffix and Directory Location 

ServiceAISetupField components have the suffix .serviceAiSetupField and are stored in the serviceAiSetupFields folder.

Version 

Introduced in API version 51.0.

Special Access Rules 

This type is available only if Einstein Article Recommendations is enabled in your org and the Main Services Agreement has been accepted.

Fields 

entity 

  • Type: string
  • Required: Yes
  • Description: Required. The Case or KnowledgeArticle object for the field.

field 

  • Type: string
  • Required: Yes
  • Description: Required. The API name of the field.

fieldMappingType 

  • Type: ServiceAISetupFieldType (enumeration of type string)
  • Required: Yes
  • Description: Required. The field type.
  • Possible values:
    • CASE_DESC
    • CASE_SUBJ
    • ARTICLE_TITLE
    • ARTICLE_CONTENT
    • ARTICLE_SUMMARY

fieldPosition 

  • Type: int
  • Required: Yes
  • Description: Required. A positive number used to rank the field’s importance. The value 1 is most important; higher numbers indicate less important fields. Einstein considers fields in the order of importance.

name 

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

setupDefinition 

Declarative Metadata Sample Definition 

The following is an example of a ServiceAISetupField component.

1<?xml version="1.0" encoding="UTF-8"?>
2<ServiceAISetupField xmlns="http://soap.sforce.com/2006/04/metadata">
3    <entity>Case</entity>
4    <field>Subject</field>
5    <fieldMappingType>CASE_SUBJ</fieldMappingType>
6    <fieldPosition>1</fieldPosition>
7    <name>SF16039900475920</name>
8    <setupDefinition>4hQRM0000004CDK</setupDefinition>
9</ServiceAISetupField>

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>ServiceAISetupField</name>
6    </types>
7</Package>

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.