MlDomain

Represents an Einstein Intent Set.

Parent Type 

This type extends Metadata and inherits its fields.

File Suffix and Directory Location 

MlDomain components have the suffix .mlDomain and are stored in the mlDomains folder.

Version 

Introduced in API version 43.0.

Special Access Rules 

This object is available only if Chat and Einstein Bots are enabled in your org.

Fields 

description 

  • Type: string
  • Required: No
  • Description: Einstein Intent Set description.

label 

  • Type: string
  • Required: Yes
  • Description: Einstein Intent Set name.

mlIntents 

  • Type: MlIntent[]
  • Required: No
  • Description: List of intents under this Einstein Intent Set.

mlSlotClasses 

  • Type: MlSlotClass[]
  • Required: No
  • Description: List of entities under this Einstein Intent Set.

MlIntent Type 

An intent in an Einstein Intent Set.

Fields 

description 

  • Type: string
  • Required: No
  • Description: Einstein Intent Set description.

developerName 

  • Type: string

  • Required: Yes

  • Description: Required. This unique name prevents conflicts with other Einstein Intent Sets associated with the same bot version. This name can contain only underscores and alphanumeric characters and must be unique in your org. It must begin with a letter, not include spaces, not end with an underscore, and not contain two consecutive underscores.

    Only users with View DeveloperName OR View Setup and Configuration permission can view, group, sort, and filter this field.

label 

  • Type: string
  • Required: Yes
  • Description: Einstein Intent Set name.

mlIntentUtterances 

relatedMlIntents 

  • Type: MlRelatedIntent[]
  • Required: No
  • Description: List of intents within an Einstein Intent Set used to expand customer inputs for this intent. Only intents within local Einstein Intent Sets have related intents.

MlIntentUtterance Type 

A customer input for this intent.

Fields 

language 

  • Type: Language (enumeration of type string)
  • Required: No

utterance 

  • Type: string
  • Required: Yes
  • Description: A customer input or natural language query that triggers the parent intent.

MlRelatedIntent Type 

An intent in an Einstein Intent Set used to expand customer inputs for this intent. Only intents within local Einstein Intent Sets have related intents.

Fields 

relatedMlIntent 

  • Type: string
  • Required: Yes
  • Description: Name of the intent that is used to extend the customer inputs of the current parent intent.

MlSlotClass Type 

An entity in this Einstein Intent Set.

Fields 

dataType 

  • Type: MlSlotClassDataType (enumeration of type string)
  • Required: Yes
  • Description: A list of the data types available for the MISlotClass.
  • Possible values:
    • Text
    • Number
    • Boolean
    • Date
    • DateTime
    • Currency

description 

  • Type: string
  • Required: No
  • Description: A description of an Einstein Bot entity.

developerName 

  • Type: string

  • Required: Yes

  • Description: Required. This unique name prevents conflicts with other entities in an Einstein Intent Set. This name can contain only underscores and alphanumeric characters, and must be unique in your org. It must begin with a letter, not include spaces, not end with an underscore, and not contain two consecutive underscores.

    Only users with View DeveloperName OR View Setup and Configuration permission can view, group, sort, and filter this field.

extractionRegex 

  • Type: string
  • Required: No
  • Description: Regular expression used to extract an entity when the type is set to Pattern.

extractionType 

  • Type: MlSlotClassExtractionType (enumeration of type string)
  • Required: No
  • Description: Required.
  • Possible values:
    • Pattern
    • Value

label 

  • Type: string
  • Required: Yes
  • Description: Label that identifies an entity throughout the Salesforce user interface.

mlSlotClassValues 

  • Type: MlSlotClassValue[]
  • Required: No
  • Description: List of entity values associated with an entity of type Value.

MlSlotClassValue Type 

An entity value associated with an entity of type Value.

Fields 

synonymGroup 

  • Type: SynonymGroup
  • Required: No
  • Description: Represents a list of terms or synonyms for the current entity value.

synonymGroups 

value 

  • Type: string
  • Required: Yes
  • Description: Single value used to extract an entity of type Value.

SynonymGroup Type 

Represents a group of synonymous words or phrases.

Fields 

languages 

  • Type: Language (enumeration of type string)[]
  • Required: No
  • Description: Required. Specifies the languages the value list applies to. If value list items are specific to a single language, specify only that language. If the value list items apply to multiple languages, specify multiple languages for one value list.

terms 

  • Type: string[]
  • Required: No
  • Description: Required. A word or phrase synonymous with other terms in the value list.

Declarative Metadata Sample Definition 

The following is an example of an MlDomain.

1<?xml version="1.0" encoding="UTF-8"?>
2<MlDomain xmlns="http://soap.sforce.com/2006/04/metadata">
3    <label>TestDomainMetadata</label>
4    <description>This is domain 2 for metadata testing</description>
5    <mlIntents>
6        <developerName>Test_Intent_New</developerName>
7        <label>Test Intent New</label>
8        <mlIntentUtterances>
9            <utterance>Utterance Hello</utterance>
10        </mlIntentUtterances>
11        <mlIntentUtterances>
12            <utterance>Utterance Hi</utterance>
13        </mlIntentUtterances>
14        <mlIntentUtterances>
15            <utterance>Utterance What</utterance>
16        </mlIntentUtterances>
17    </mlIntents>
18    <mlIntents>
19        <developerName>Test_Intent_New2</developerName>
20        <label>Test Intent New 2</label>
21    </mlIntents>
22    <mlSlotClasses>
23        <developerName>Test_Entity1</developerName>
24        <label>Test Entity 1</label>
25        <extractionType>Value</extractionType>
26        <mlSlotClassValues>
27                <value>Choice value 1</value>
28            </mlSlotClassValues>
29            <mlSlotClassValues>
30                <value>Choice value 2</value>
31            </mlSlotClassValues>
32    </mlSlotClasses>
33    <mlSlotClasses>
34        <developerName>Test_Entity2</developerName>
35        <label>Test Entity 2</label>
36        <extractionType>Pattern</extractionType>
37    </mlSlotClasses>
38    <mlSlotClasses>
39            <dataType>Text</dataType>
40            <description>Valid Email Address</description>
41            <developerName>Email</developerName>
42            <extractionRegex>\b[A-Z0-9._%+-]+@[A-Z0-9.-]+\.[A-Z]{2,}\b</extractionRegex>
43            <extractionType>Pattern</extractionType>
44            <label>Email</label>
45    </mlSlotClasses>
46    <mlSlotClasses>
47        <developerName>airport</developerName>
48        <extractionType>Value</extractionType>
49        <label>airport</label>
50        <mlSlotClassValues>
51            <synonymGroup>
52                <languages>en_US</languages>
53                <terms>San Francisco</terms>
54                <terms>The City</terms>
55            </synonymGroup>
56            <value>SFO</value>
57        </mlSlotClassValues>
58        <mlSlotClassValues>
59            <synonymGroup>
60                <languages>en_US</languages>
61                <terms>Oakland</terms>
62                <terms>The Town</terms>
63            </synonymGroup>
64            <value>OAK</value>
65        </mlSlotClassValues>
66    </mlSlotClasses>
67</MlDomain>

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>TestDomainMetadata</members>
5        <name>MlDomain</name>
6    </types>
7    <version>43.0</version>
8</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.