---
schema_version: "1"
id: 8eb94dddd8607c35b03cf24ccbb2fe7b2cee1dfec2ba1e173c804a12119c6c4d
title: AIScoringModelDefinition
collection: legacydeveloper
version: current
locale: en-us
portal_url: https://docs.salesforce.com/legacydeveloper/current/en-us/api_meta/meta_aiscoringmodeldefinition.md
canonical_url: https://developer.salesforce.com/docs/atlas.en-us.api_meta.meta/api_meta/meta_aiscoringmodeldefinition.htm
source_site: developer.salesforce.com
content_type: documentation
content_hash: 6dfaf2df4d654057bc6673ef28379b0e4901af3d8a3f228c2c4499a36e845403
description: 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.
---
# 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.

![Important](https://developer.salesforce.com/docs/atlas.en-us.api_meta.meta/api_meta/images/icon_note_important.png)

#### Important

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.

## Parent Type

This type extends the [Metadata](https://developer.salesforce.com/docs/atlas.en-us.api_meta.meta/api_meta/metadata.htm "The base class for all metadata types. You can’t edit this object. A component is an instance of a metadata type.") 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\[\]](#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\[\]](#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\>68.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](https://developer.salesforce.com/docs/atlas.en-us.api_meta.meta/api_meta/file_based_zip_file.htm "The deploy() and retrieve() calls are used to deploy and retrieve a .zip file. Within the .zip file is a project manifest (package.xml) that lists what to retrieve or deploy, and one or more XML components that are organized into folders.").