AIScoringModelDefinition

Represents information about a machine learning model that’s used by the Scoring Framework for Industries Cloud Einstein. The machine learning model is used for scoring, including its configuration.

Where possible, we changed noninclusive terms to align with our company value of Equality. We maintained certain terms to avoid any effect on customer implementations.

Important

Parent Type

This type extends the Metadata metadata type and inherits its fullName field.

File Suffix and Directory Location

AIScoringModelDefinition components have the suffix .aiScoringModelDefinition and are stored in the aiScoringModelDefinitions folder.

Version

AIScoringModelDefinition components are available in API version 58.0 and later.

Special Access Rules

To access this metadata type, you must have the AI Accelerator User permission set with Scoring Framework enabled for Industries Cloud Einstein from Salesforce Setup. The Salesforce org must have the CRM Plus license and the product’s CRM license.

Fields

Field Name Description
aiModelConfig
Field Type
string
Description

Required.

ID of an AI model configuration related to the AI scoring model record.
aiScoringModelDefVersions
Field Type
AIScoringModelDefVersion[]
Description
Represents information of various versions of a model.
description
Field Type
string
Description
Description for an AIScoringModelDefinition record.
masterLabel
Field Type
string
Description

Required.

A user-friendly name for the AIScoringModelDefinition metadata component, which is defined when the AIScoringModelDefinition metadata component is created.

AIScoringModelDefVersion

Represents information about a version of an AI scoring model.

Field Name Description
aiScoringModelDefinition
Field Type
string
Description

Required.

Parent AIScoringModelDefinition record that’s related to an AIScoringModelDefVersion record.
aiScoringSteps
Field Type
AIScoringStep[]
Description
Represents information about a step associated with an AI scoring model version.
developerName
Field Type
string
Description

Required.

The unique name of the object in the API. 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. In managed packages, this field prevents naming conflicts on package installations. With this field, a developer can change the object’s name in a managed package and the changes are reflected in a subscriber’s organization. Label is Record Type Name.
masterLabel
Field Type
string
Description

Required.

A user-friendly name for the AIScoringModelDefVersion component name, which is defined when the AIScoringModelDefVersion component name is created.
modelMode
Field Type
AIScoringModelDefVersionMode (enumeration of type string)
Description

Required.

Mode of an AI scoring model.

Values are:

  • DEPLOY
  • TRAIN
  • TRAIN_AND_DEPLOY

AIScoringStep

Represents information about a step associated with an AI scoring model version. For example, an AI scoring step can include steps, such as propensity to purchase products or prediction scores for accounts.

Field Name Description
aiModelConfigStep
Field Type
string
Description

Required.

ID of the AI model config step that’s related to the AIScoringStep record.
stepDetail
Field Type
string
Description
Scoring step details in JSON format.

Declarative Metadata Sample Definition

Here’s an example of an AIScoringModelDefinition component.

<?xml version="1.0" encoding="UTF-8"?>
<AIScoringModelDefinition xmlns="http://soap.sforce.com/2006/04/metadata">
    <aiModelConfig>Prediction_Scores_for_Accounts</aiModelConfig>
    <aiScoringModelDefVersions>
        <fullName>V1</fullName>
        <aiScoringModelDefinition>Test</aiScoringModelDefinition>
        <aiScoringSteps>
            <aiModelConfigStep>Prediction_Scores_for_Accounts.GrainSelector</aiModelConfigStep>
            <stepDetail>{label:Account,name:Account}</stepDetail>
        </aiScoringSteps>
        <aiScoringSteps>
            <aiModelConfigStep>Prediction_Scores_for_Accounts.AugmentedDataset</aiModelConfigStep>
        </aiScoringSteps>
        <aiScoringSteps>
            <aiModelConfigStep>Prediction_Scores_for_Accounts.TargetConditionBuilder</aiModelConfigStep>
            <stepDetail>{specificOutcomeDefined:Yes,label:Financial accounts are associated with an account,name:FA_Target}</stepDetail>
        </aiScoringSteps>
        <aiScoringSteps>
            <aiModelConfigStep>Prediction_Scores_for_Accounts.InputVariableSelector</aiModelConfigStep>
        </aiScoringSteps>
        <aiScoringSteps>
            <aiModelConfigStep>Prediction_Scores_for_Accounts.CustomFilter</aiModelConfigStep>
        </aiScoringSteps>
        <aiScoringSteps>
            <aiModelConfigStep>Prediction_Scores_for_Accounts.WriteBackConnector</aiModelConfigStep>
        </aiScoringSteps>
        <developerName>V1</developerName>
        <masterLabel>V1</masterLabel>
        <modelMode>TRAIN_AND_DEPLOY</modelMode>
    </aiScoringModelDefVersions>
    <description>Test for metadata</description>
    <masterLabel>Test</masterLabel>
</AIScoringModelDefinition>

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

<?xml version="1.0" encoding="UTF-8"?>
<Package xmlns="http://soap.sforce.com/2006/04/metadata">
    <types>
        <members>*</members>
        <name>AIScoringModelDefVersion</name>
    </types>
    <types>
        <members>*</members>
        <name>AIScoringModelDefinition</name>
    </types>
    <version>64.0</version>
</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.