--- title: MLSolutionResult - Global \(deprecated\) description: The MLSolutionResult API provides methods for managing cluster information and members of a clustering solution. You can embed the results in business logic.Instantiates a new MLSolutionResult object.Returns the solution object.Returns all members of a clustering solution.Returns all outcome information for a clustering solution. locale: en-US canonical_url: https://www.servicenow.com/docs/r/australia/api-reference/server-api-reference/MLSolutionResultAPI.html release: australia product: Server API Reference classification: server-api-reference topic_type: concept last_updated: "2026-03-12" reading_time_minutes: 3 breadcrumb: [Server API reference, API reference, API implementation and reference] --- # MLSolutionResult- Global \(deprecated\) The MLSolutionResult API provides methods for managing cluster information and members of a clustering solution. You can embed the results in business logic. **Note:** This API has been deprecated and is intended to be removed in a future release. Refer to [Using ML APIs](https://raw.githubusercontent.com/ServiceNow/ServiceNowDocs/australia/markdown/intelligent-experiences/using-ml-apis.md) for the most recent guidelines. **Parent Topic:**[Server API reference](https://raw.githubusercontent.com/ServiceNow/ServiceNowDocs/australia/markdown/australia/api-reference/server-api-reference/api-server.md) ## MLSolutionResult - MLSolutionResult\(\) Instantiates a new MLSolutionResult object. |Name|Type|Description| |----|----|-----------| |None| | | ## MLSolutionResult - findActiveSolution\(String solutionName\) Returns the solution object. This method only returns the solutions if the ml\_solution definition and solution are active \(that is, trained\). For information, see [Create and train a clustering solution](https://raw.githubusercontent.com/ServiceNow/ServiceNowDocs/australia/markdown/intelligent-experiences/create-clustering-solution.md). |Name|Type|Description| |----|----|-----------| |solutionName|String|Name of the clustering ml\_solution record.| |Type|Description| |----|-----------| |Object|Clustering solution object for the specified `solutionName` if the ml\_solution definition and solution is active, null otherwise.| ``` var solutionName = 'ml_incident_assignment'; var MLS = new MLSolutionResult(); var solution = MLS.findActiveSolution(solutionName); gs.print(solution); ``` ## MLSolutionResult - getClusterAssignments\(String solutionName, Object options\) Returns all members of a clustering solution.
Name Type Description
solutionName String Name of active cluster solution.
options Object Optional. Narrows down the returned results by group and level within a clustering solution. Default: Return cluster memberships for all clusters.
options.segmentation\_field String Optional. Identifies the segmentation field for which to retrieve cluster memberships, for example, assignment group.This field provides the same grouping as options provided via **Use Group By** check box in **Clustering Solution Definitions** table. Information provided varies by table selected in the **Table** field. For information, see [Create and train a clustering solution](https://raw.githubusercontent.com/ServiceNow/ServiceNowDocs/australia/markdown/intelligent-experiences/create-clustering-solution.md).
options.cluster\_id String Optional. The sys\_id from the ml\_cluster\_summary table.
options.rec\_sys\_id String Optional. The sys\_id from the table record the cluster solution is based on.
Type Description
Array Array of outcome objects including:- segmentation – Field name by which to group data - cluster\_num – Unique cluster number within a solution of clusters \(that is, label\) - rec\_sys\_id – The sys\_id from the table record that the cluster solution is based on - rec\_display\_id – Name of the record associated with the record sys\_id.
The following example shows how to return all cluster members for a solution without setting values for the options object. ``` var solutionName = ""; var solutionResult = new MLSolutionResult(); var outcome_array = solutionResult.getClusterAssignments(solutionName); for (var i = 0; i < outcome_array.length; i++) { gs.print(outcome_array [i].segmentation + ' ' + outcome_array [i].cluster_num + ' ' + outcome_array [i].rec_sys_id + ' ' + outcome_array [i].rec_display_id); } ``` The following example shows how to return all cluster members for one record using options.rec\_sys\_id. ``` var now_GR = new GlideRecord('incident'); now_GR.get('sys_id'); var solutionName = "solution_example"; var solutionResult = new MLSolutionResult(); var options = { "rec_sys_id": now_GR.getUniqueValue() }; var outcome_array = solutionResult.getClusterAssignments(solutionName, options); for (var i = 0; i < outcome_array.length; i++) { gs.print(outcome_array [i].segmentation + ' ' + outcome_array [i].cluster_num + ' ' + outcome_array [i].rec_sys_id + ' ' + outcome_array [i].rec_display_id); } ``` ## MLSolutionResult - getClusterInfo\(String solutionName, Object options\) Returns all outcome information for a clustering solution.
Name Type Description
solutionName String Name of active cluster solution.
options Object Optional. Narrows down the returned results by group and level within a clustering solution. Default: Return cluster memberships for all clusters.
options.segmentation\_field String Optional. Identifies the segmentation field for which to retrieve cluster memberships, for example, assignment group.This field provides the same grouping as options provided via **Use Group By** check box in **Clustering Solution Definitions** table. Information provided varies by table selected in the **Table** field. For information, see [Create and train a clustering solution](https://raw.githubusercontent.com/ServiceNow/ServiceNowDocs/australia/markdown/intelligent-experiences/create-clustering-solution.md).
options.cluster\_id String Optional. The sys\_id from the ml\_cluster\_summary table.
Type Description
Array Array of outcome objects including:- segmentation – Field name by which to group data - cluster\_num – Unique cluster number within a solution of clusters \(that is, label\) - total\_members – Number of records in cluster \(that is, size\) - cluster\_quality – Cluster quality percentile value
``` var solutionName = "solution_example"; var solutionResult = new MLSolutionResult(); var outcome_array = solutionResult.getClusterInfo(solutionName); for (var i = 0; i < outcome_array.length; i++) { gs.print(outcome_array[i].segmentation + ' ' + outcome_array[i].cluster_num + ' ' + outcome_array[i].total_members + ' ' + outcome_array[i].cluster_quality); } ```