---
sourceDocument: Australia API Reference
sourceDocumentLink: https://www.servicenow.com/docs/r/api-reference

 Release :

    - australia

ft:locale :

    - en-US

ft:publication_title :

    - Australia API Reference

ft:clusterId :

    - crapiref

bundleId :

    - crapiref

workflow :

    - Creator


---

# MLSolutionFactory - Global

# MLSolutionFactory - Global {#ariaid-title1}

* Release version: Australia
* 
* Updated March 12, 2026
* 
* ![](https://www.servicenow.com/docs/portal-asset/ico-clock) 1 minute to read

The MLSolutionFactory API is a factory class to get an MLSolution
scriptable object.

This API requires the Predictive Intelligence plugin (com.glide.platform_ml) and is provided within the `sn_ml` namespace. For more information, see [Predictive Intelligence](https://www.servicenow.com/docs/access?context=predictive-intelligence&version=australia&pubname=australia-intelligent-experiences&ft:locale=en-US).

For usage guidelines, refer to [MLSolutionFactory scriptable
objects](https://www.servicenow.com/docs/access?context=using-ml-apis-mlsolutionfactory&version=australia&pubname=australia-intelligent-experiences&ft:locale=en-US).
**Related concepts**   

* [MLSolution](https://www.servicenow.com/docs/qzx_eZxDz9RcViGSujEqLQ#MLSolutionAPI "The MLSolution API provides methods for handling Predictive Intelligence predictions and retrieving solution objects for all capabilities: similarity, classification, and clustering).")
* [MLSolutionUtil](https://www.servicenow.com/docs/GH1ZJffBlqmytqjXP_i~~Q#MLSolutionUtilAPI "The MLSolutionUtil script include provides methods for getting Predictive Intelligence predictions.")
* [REST API: Get predictions for multiple solutions](https://www.servicenow.com/docs/HY9oSUJNATHitwcsVEcrKA#agent-intelligence-api "The Predictive Intelligence API provides endpoints that predict a field value based on one or more input fields and a trained solution.")

## MLSolutionFactory - getSolution(String solutionName, Object options) {#ariaid-title2}

Gets an MLSolution object for a specified solution name.
{#MLSolutionFactory-getSolution_S_O__table_hqw_pbm_yfb__entry__3}

| Name | Type | Description |
|-|-|-|
| solutionName | String | Name of the solution. |
| options | Object | Optional. options.version: If provided, creates MLSolution instance for provided version of solutionName. |
[Table 1. Parameters]

{#MLSolutionFactory-getSolution_S_O__table_hqw_pbm_yfb} {#MLSolutionFactory-getSolution_S_O__table_iqw_pbm_yfb__entry__2}

| Type | Description |
|-|-|
| Object | [MLSolution](https://www.servicenow.com/docs/qzx_eZxDz9RcViGSujEqLQ#MLSolutionAPI "The MLSolution API provides methods for handling Predictive Intelligence predictions and retrieving solution objects for all capabilities: similarity, classification, and clustering).") object of the specified solution. |
[Table 2. Returns]

{#MLSolutionFactory-getSolution_S_O__table_iqw_pbm_yfb}  

    // basic usage
    var mlSolution = sn_ml.MLSolutionFactory.getSolution("ml_incident_categorization");
            
    // using options.version parameter
    var options = {};
    options.version = 1;
    var mlSolution = sn_ml.MLSolutionFactory.getSolution("ml_incident_categorization", options);


