PredictabilityEstimateStore - Global

concept brazil Updated Sep 10, 2026 3 min read PredictabilityEstimateStoreAPI.md
Raw file servicenow.com

Enables storing and retrieving predictability estimates.

The PredictabilityEstimateStore API requires the Predictive Intelligence plugin (com.glide.platform_ml) and is provided within the sn_ml namespace.

Parent Topic:Server API reference

PredictabilityEstimateStore - add(Object mlEstimate)

Adds a new predictability estimate object to the store and returns a unique name.

Note: Label values do not need to be unique. For example, if you run this method with the same label 10 times, this method adds 10 different uniquely-named objects to the store.

Name Type Description
mlEstimate PredictabilityEstimate PredictabilityEstimate() object to add to the store.
Type Description
String System-generated predictability estimate name.

The following example shows how to add a predictability estimate to the store. Use PredictabilityEstimate - submitTrainingJob() to run the training job after adding it to the store.

JavaScript
// Create a dataset var myData = new sn_ml.DatasetDefinition({
  'tableName' : 'incident',  'fieldNames' : ['assignment_group', 'short_description', 'description'],  'encodedQuery' : 'activeANYTHING'
});
// Create an estimate var myEstimate = new sn_ml.PredictabilityEstimate({
  'label': "my estimate definition",  'dataset' : myData,  'predictedFieldName' : 'assignment_group',  'inputFieldNames':['short_description']
});
// Add the estimate to the store to later be able to retrieve it.var my_unique_name = sn_ml.PredictabilityEstimateStore.add(myEstimate);

PredictabilityEstimateStore - deleteObject(String name)

Removes a specified predictability estimate object from the store.

Name Type Description
name String Name of the PredictabilityEstimate() object to be deleted.
Type Description
None

The following example shows how to delete a predictability estimate from the store.

JavaScript
sn_ml.PredictabilityEstimateStore.deleteObject("ml_sn_global_global_estimate");

PredictabilityEstimateStore - get(String name)

Gets a predictability estimate object from a store.

Name Type Description
name String Name of a predictability estimate in a store.
Type Description
Object PredictabilityEstimate object. Returns an error if the object does not exist.

The following example shows how to get a predictability estimate object from the store using the get() method and view its training status using the PredictabilityEstimate - getActiveVersion() and PredictabilityEstimateVersion - getStatus() methods.

JavaScript
// Get statusvar mlEstimate = sn_ml.PredictabilityEstimateStore.get('ml_incident_categorization');
gs.print(JSON.stringify(JSON.parse(mlEstimate.getActiveVersion().getStatus(), null, 2)));

Output:

JSON
{ "state":"solution_complete", "percentComplete":"100", "hasJobEnded":"true"}

PredictabilityEstimateStore - getAllNames(Object options)

Gets the names of all predictability estimate definition records in the store.

Name

Type

Description

options

Object

Options for restricting results within the specified properties.``` { "label": "String", "domainName": "String", "scope": "String" };

Text
</td></tr><tr><td>
options.label
</td><td>
String
</td><td>
Optional. Label of your solution object.
</td></tr><tr><td>
options.domainName
</td><td>
String
</td><td>
Optional. Name of the domain for your solution object. Refer to [Domain separation and Predictive Intelligence](https://raw.githubusercontent.com/ServiceNow/ServiceNowDocs/brazil/markdown/intelligent-experiences/domain-separation-predictive-intelligence.md).
</td></tr><tr><td>
options.scope
</td><td>
String
</td><td>
Optional. Name of an [application scope](https://raw.githubusercontent.com/ServiceNow/ServiceNowDocs/brazil/markdown/application-development/c_ApplicationScope.md) for your solution object.
</td></tr></tbody></table>|Type|Description||----|-----------||Array|List of strings representing predictability estimate object names in the store.|
In the following example, the getAllNames\(\) method returns a list of all names in the store.

gs.print(JSON.stringify(JSON.parse(sn_ml.PredictabilityEstimateStore.getAllNames()), null, 2));

Text
Output:

[ "ml_x_snc_global_global_predictability_estimate_1", "ml_x_snc_global_global_predictability_estimate", "ml_x_snc_global_global_predictability_estimate_2", "ml_x_snc_global_global_my_estimate_definition" ]

SQL
In the following example, the getAllNames\(\) method returns only names associated with values set in the **options** parameter.

var options = { 'label' : 'my estimate definition', 'domainName' : 'global', 'scope' : 'global' }; var solNames = sn_ml.PredictabilityEstimateStore.getAllNames(options); gs.print(JSON.stringify(JSON.parse(solNames), null, 2));

Text
Output:

[ "ml_x_snc_global_global_my_estimate_definition" ]

Text
## PredictabilityEstimateStore - update\(String name, Object mlEstimate\)
Updates a predictability estimate object in a store.
|Name|Type|Description||----|----|-----------||name|String|Name of the predictability estimate to update.||mlEstimate|[PredictabilityEstimate](https://raw.githubusercontent.com/ServiceNow/ServiceNowDocs/brazil/markdown/api-reference/server-api-reference/PredictabilityEstimateAPI.md)|[PredictabilityEstimate\(\)](https://raw.githubusercontent.com/ServiceNow/ServiceNowDocs/brazil/markdown/api-reference/server-api-reference/PredictabilityEstimateAPI.md) object properties to update.|
|Type|Description||----|-----------||None| |
The following example shows how to update a predictability estimate object in the store.

var estimateUpdate = new sn_ml.PredictabilityEstimate({ 'label': 'my estimate definition', 'dataset' : myData, 'predictedFieldName' : 'assignment_group', 'inputFieldNames': ['short_description'] });

sn_ml.PredictabilityEstimateStore.update('ml_sn_global_global_incident_service', estimateUpdate);

Text

Search documentation
Search document titles and file paths on the brazil branch