--- title: ClassificationSolution - Global description: The ClassificationSolution API is a scriptable object used in Predictive Intelligence stores.Creates a classification solution.Cancels a job for a solution object that has been submitted for training.Gets the active ClassificationSolutionVersion object.Gets all versions of a classification solution.Gets the latest version of a solution.Gets the name of the object to use for interaction with the store.Gets solution object properties.Gets a solution by provided version number.Activates a specified version of a solution in the store.Submits a training job. locale: en-US canonical_url: https://www.servicenow.com/docs/r/australia/api-reference/server-api-reference/ClassificationSolutionAPI.html release: australia product: Server API Reference classification: server-api-reference topic_type: concept last_updated: "2026-03-12" reading_time_minutes: 10 breadcrumb: [Server API reference, API reference, API implementation and reference] --- # ClassificationSolution- Global The ClassificationSolution API is a scriptable object used in Predictive Intelligence stores. This API requires the Predictive Intelligence plugin \(com.glide.platform\_ml\) and is provided within the `sn_ml` namespace. The solution setup-to-training flow is as follows: 1. Create a dataset using the [DatasetDefinition](https://raw.githubusercontent.com/ServiceNow/ServiceNowDocs/australia/markdown/australia/api-reference/server-api-reference/DatasetDefinitionAPI.md) API. 2. Optional. Build an encoder using the [Encoder](https://raw.githubusercontent.com/ServiceNow/ServiceNowDocs/australia/markdown/australia/api-reference/server-api-reference/EncoderAPI.md) API. 3. Use the [constructor](https://raw.githubusercontent.com/ServiceNow/ServiceNowDocs/australia/markdown/australia/api-reference/server-api-reference/ClassificationSolutionAPI.md) to create a classification solution object. 4. Add the solution object to the classification solution store using the [ClassificationSolutionStore - add\(\)](https://raw.githubusercontent.com/ServiceNow/ServiceNowDocs/australia/markdown/australia/api-reference/server-api-reference/ClassificationSolutionStoreAPI.md) method. 5. Train the solution using the [submitTrainingJob\(\)](https://raw.githubusercontent.com/ServiceNow/ServiceNowDocs/australia/markdown/australia/api-reference/server-api-reference/ClassificationSolutionAPI.md) method. This creates a version of the object that you can manage using the [ClassificationSolutionVersion](https://raw.githubusercontent.com/ServiceNow/ServiceNowDocs/australia/markdown/australia/api-reference/server-api-reference/ClassificationSolutionVersionAPI.md) API. 6. Get predictions using the [ClassificationSolutionVersion – predict\(\)](https://raw.githubusercontent.com/ServiceNow/ServiceNowDocs/australia/markdown/australia/api-reference/server-api-reference/ClassificationSolutionVersionAPI.md) method. **Note:** This API runs with full privileges before the Vancouver Patch 7 Hotfix 2b and Washington DC Patch 7 releases. With later releases, grant access using ACLs. For more information see [Query ACLs](https://raw.githubusercontent.com/ServiceNow/ServiceNowDocs/australia/markdown/platform-security/query-acl-rule.md). For usage guidelines, refer to [Using ML APIs](https://raw.githubusercontent.com/ServiceNow/ServiceNowDocs/australia/markdown/intelligent-experiences/using-ml-apis.md). **Parent Topic:**[Server API reference](https://raw.githubusercontent.com/ServiceNow/ServiceNowDocs/australia/markdown/australia/api-reference/server-api-reference/api-server.md) ## ClassificationSolution - ClassificationSolution\(Object config\) Creates a classification solution.
| Name | Type | Description |
|---|---|---|
| config | Object | JavaScript object containing configuration properties of thesolution.``` { "algorithmConfig": {Object}, "dataset": {Object}, "domainName": "String", "encoder": {Object}, "groupByFieldName": "String", "inputFieldNames": [Array], "label": "String", "minRowCount": "String", "predictedFieldName": "String", "processingLanguage": "String", "stopwords": [Array], "trainingFrequency": "String" } ``` |
| config.algorithmConfig | Object | JavaScript object containing algorithm configuration properties. ``` 'algorithmConfig' : { "algorithm": "String", "targetClassRecall": "String" } ``` |
| config.algorithmConfig.algorithm | String | Method for encoding your solution. Possible values: - **xgboost**: XGBoost encoding to optimize the training. - **logisticRegression**: Method using the logistic regression model for categorical targets such as nominal or ordinal. |
| config.algorithmConfig.targetClassRecall | String |
Applies a class recall parameter to steer a solution's training to bias a specific class. Format is `" |
| config.dataset | Object | [DatasetDefinition](https://raw.githubusercontent.com/ServiceNow/ServiceNowDocs/australia/markdown/australia/api-reference/server-api-reference/DatasetDefinitionAPI.md) name. |
| config.domainName | String | Optional. Domain name associated with this dataset. Default: Current domain, for example, `"global"`. |
| config.encoder | Object | Optional. Trained encoder object to assign to this solution. See [Encoder - Encoder\(Object config\)](https://raw.githubusercontent.com/ServiceNow/ServiceNowDocs/australia/markdown/australia/api-reference/server-api-reference/EncoderAPI.md). |
| config.explainability | Boolean | Flag that indicates whether to provide model explainability. Use model explainability to identify the importance of each input field to your model's predictions.Valid values: - true: The Classification model includes explainability details. Information can be viewed on the **Feature Importance** tab of the model's solution form. - false: The Classification model does not include explainability details. Default: false See also: [Model Explainability](https://raw.githubusercontent.com/ServiceNow/ServiceNowDocs/australia/markdown/intelligent-experiences/predictive-intel-explainability.md) |
| config.groupByFieldName | String | Optional. Field name by which the system groups records to build classification solutions. For usage information, see [Using group by for classification](https://raw.githubusercontent.com/ServiceNow/ServiceNowDocs/australia/markdown/intelligent-experiences/using-group-by-for-classification.md). |
| config.inputFieldNames | Array | List of input field names as strings. The model uses these fields used to make predictions. |
| config.label | String | Identifies the prediction task. |
| config.minRowCount | String | Optional. Minimum number of records required in the dataset for training.Default: 10000 |
| config.predictedFieldName | String | Identifies a field to be trained for predictability. |
| config.processingLanguage | String | Optional. Processing language in two-letter ISO 639-1 language code format. Default: "en" |
| config.stopwords | Array | Optional. Preset list of strings that the system automatically generates based on the **language** property setting. For details, see [Create a custom stopwords list](https://raw.githubusercontent.com/ServiceNow/ServiceNowDocs/australia/markdown/intelligent-experiences/create-custom-stopwords-list.md). Default: English Stopwords |
| config.trainingFrequency | String | The frequency to retrain the model. Possible values: - every\_30\_days - every\_60\_days - every\_90\_days - every\_120\_days - every\_180\_days - run\_once Default: run\_once |
| Type | Description |
|---|---|
| Object | Contents of the Dataset and [ClassificationSolution\(\)](https://raw.githubusercontent.com/ServiceNow/ServiceNowDocs/australia/markdown/australia/api-reference/server-api-reference/ClassificationSolutionAPI.md) object details in the [ClassificationSolutionStore](https://raw.githubusercontent.com/ServiceNow/ServiceNowDocs/australia/markdown/australia/api-reference/server-api-reference/ClassificationSolutionStoreAPI.md).``` { "algorithmConfig": { "algorithm": "String", "targetClassRecall": "String" }, "datasetProperties": {Object}, "domainName": "String", "encoder": {Object}, "groupByFieldName": "String", "inputFieldNames": [Array], "label": "String", "name": "String", "predictedFieldName": "String", "processingLanguage": "String", "scope": "String", "stopwords": [Array], "trainingFrequency": "String" } ``` |
| <Object>.algorithmConfig | Method for encoding the solution. Data type: Object. |
| <Object>.algorithmConfig.algorithm | Name of the encoding algorithm for training this solution. Possible values: - **xgboost**: XGBoost encoding to optimize the training. - **logisticRegression**: Method using the logistic regression model for categorical targets such as nominal or ordinal. Data type: String. |
| <Object>.algorithmConfig.targetClassRecall | Class recall parameter to steer a solution's training to bias a specific class. The recall value is a number between 0 and 100 representing a percentage.Data type: String |
| <Object>.datasetProperties | Lists the properties of the [DatasetDefinition\(\)](https://raw.githubusercontent.com/ServiceNow/ServiceNowDocs/australia/markdown/australia/api-reference/server-api-reference/DatasetDefinitionAPI.md) object associated with the solution. ``` { "encodedQuery": "String", "fieldDetails": [Array], "fieldNames": [Array], "tableName": "String" } ``` Data type: Object. |
| <Object>.datasetProperties.tableName | Name of the table for the dataset. For example, `"tableName" : "Incident"`. Data type: String. |
| <Object>.datasetProperties.fieldNames | List of field names from the specified table as strings. For example, `"fieldNames" : ["short_description", "priority"]`. Data type: Array. |
| <Object>.datasetProperties.fieldNames.fieldDetails | List of JavaScript objects that specify field properties. ``` [ { "name": "String", "type": "String" } ] ``` Data type: Array. |
| <Object>.datasetProperties.fieldNames.fieldDetails.<object>.name | Name of the field defining the type of information to restrict this dataset to. Data type: String. |
| <Object>.datasetProperties.fieldDetails.<object>.type | Machine-learning field type. Data type: String. |
| <Object>.datasetProperties.fieldDetails.encodedQuery | Encoded query string in the standard platform format. See [Encoded query strings](https://raw.githubusercontent.com/ServiceNow/ServiceNowDocs/australia/markdown/platform-user-interface/c_EncodedQueryStrings.md).Data type: String. |
| <Object>.domainName | Domain name associated with this dataset. See [Domain separation and Predictive Intelligence](https://raw.githubusercontent.com/ServiceNow/ServiceNowDocs/australia/markdown/intelligent-experiences/domain-separation-predictive-intelligence.md).Type: String |
| <Object>.encoder | Encoder object assigned to this solution. See [Encoder - Encoder\(Object config\)](https://raw.githubusercontent.com/ServiceNow/ServiceNowDocs/australia/markdown/australia/api-reference/server-api-reference/EncoderAPI.md).Data type: Object. |
| <Object>.groupByFieldName | Field name by which the system groups records to build classification solutions. Data type: String |
| <Object>.inputFieldNames | List of input field names as strings. The model uses these fields used to make predictions. Data type: String. |
| <Object>.label | Identifies the prediction task. ``` { "label": "my first prediction" } ``` Data type: String. |
| <Object>.name | System-assigned name. Data type: String. |
| <Object>.predictedFieldName | Identifies a field to be trained for predictability. Data type: String. |
| <Object>.processingLanguage | Processing language in two-letter ISO 639-1 language code format. Data type: String. |
| <Object>.scope | Object scope. Currently the only valid value is `global`.Data type: String |
| <Object>.stopwords | Optional. Preset list of strings that the system automatically generates based on the **language** property setting. For details, see [Create a custom stopwords list](https://raw.githubusercontent.com/ServiceNow/ServiceNowDocs/australia/markdown/intelligent-experiences/create-custom-stopwords-list.md). Data type: Array. |
| <Object>.trainingFrequency | The frequency to retrain the model. Possible values: - every\_30\_days - every\_60\_days - every\_90\_days - every\_120\_days - every\_180\_days - run\_once Default: run\_once Data type: String. |
| Name | Type | Description |
|---|---|---|
| version | String | Name of the [ClassificationSolution\(\)](https://raw.githubusercontent.com/ServiceNow/ServiceNowDocs/australia/markdown/australia/api-reference/server-api-reference/ClassificationSolutionAPI.md) object version to activate.Activating this version deactivates any other version. |