Classifier API Parameters

Simon Maskell Updated by Simon Maskell

ClassifierRequestDTO

The ClassifierRequestDTO contains the information needed to request classification for records.

global with sharing class ClassifierRequestDTO {

/**
* The ids of the records to classify
* Required
*/
global List<Id> recordIds;

/**
* The type of records to classify, eg "Lead"
* Required
*/
global String objectType;

/**
* The types of classifications to perform for the given records.
* Valid types are: "Territory", "Match", "CustomClassification" and "AutoConversion"
* Required
*/
global List<String> classificationTypes;

/**
* The stamp groups to use for a custom classification
* Optional, when the CustomClassification type is included
*/
global List<String> customClassificationStampGroupsToUse;

/**
* Constructor
*/
global ClassifierRequestDTO();

/**
* Constructor
*
* @param recordIds The ids of the records to classify
* @param objectType The type of records to classify, eg "Lead"
* @param classificationTypes The types of classifications to perform for the given records
* @param customClassificationStampGroupsToUse The stamp groups to use for a custom classification
*/
global ClassifierRequestDTO(List<Id> recordIds, String objectType, List<String> classificationTypes, List<String> customClassificationStampGroupsToUse);
}

ClassifierResultDTO

The ClassifierResultDTO contains the results from a classification request.

global with sharing class ClassifierResultDTO {

/**
* The results of record classifications
* Required
*/
@AuraEnabled global List<n2de.ClassifierIndividualResultDTO> recordResults;

/**
* True if the request passed the validation
* Required
*/
@AuraEnabled global Boolean validationSuccess;

/**
* If the validation failed, specific error
* Required
*/
@AuraEnabled global String validationError;
}

ClassifierIndividualResultDTO

The ClassifierIndividualResultDTO contains the classification results for an individual record.

global with sharing class ClassifierIndividualResultDTO {

/**
* The id of the record which was sent for classification
* Required
*/
@AuraEnabled global Id recordId;

/**
* The result of the classification of a record.
* Valid statuses are:
* - "Missing": Record could not be found
* - "Error": Classification has failed
* - "Async": Classification will be completed by a queueable job due to resource limits
* - "Done": Classification has completed successfully
* Required
*/
@AuraEnabled global String classificationStatus;

/**
* If the classification resulted in an error, contains the error message
* Required
*/
@AuraEnabled global String classificationError;
}

How did we do?

Classifier API

Contact