Getting Started
Installation
Permissions
Widget & Inline Page
Classic - Distribution Engine Inline Page
Lightning - Distribution Engine Record Detail
Widget - Introduction
Adding Widget to a Lightning App
Adding Widget to a Lightning Page
Adding Widget to Salesforce Mobile
Adding Widget to a Classic Console
Adding Widget to Classic Homepage
Changing the Widget logout reason list
Before you Begin
Installation Overview
Whats in the Package
Triggers
Installation Process
Managed Package Licences
Page Layouts
Leaving A Review
Uninstall
Upgrading Distribution Engine
Configure Distribution Engine
Distribution Classifier
Territories
Territories Introduction
Create a Map
Import Territories
Territory Map Zoom Levels
Object Settings
Detecting Territories
Settings
Territories - Technical Details
Territory Distributor
Lead Matching
Lead Matching - Introduction
Duplicate Rule Setup
Related Owner - Lead Matching
Lead matching vs lookup owner
Classifier Lead Matching Setup
Lead to Account/Contact/Lead Settings
Custom Classification
Custom Classification - Introduction
Stamp Groups
Stamps
Custom Classification - Synchronized Tag Collections
Lead Auto-Conversion
Lead Auto-Conversion - Introduction
Lead De-Duplication
Lead Conversion
Configuring Auto-Conversion
Auto-Conversion Rules
Distribution Classifier - Introduction
Backfill
Delay Filters
Distribution Teams
Distributors
Distribution Methods
Distribution Methods - Introduction
Lookup Owner
Load Balancing
Round Robin
Related Owner
Sticky Assignment
Distributors Introduction
Distributor Types
Standard Distributor Settings
Pull Distributor Settings
Trigger Distributor Settings
Manual Distributor Settings
Distributor Sources
Distributing from a Designated User
Distributor Filters
Distributor Team Member Filters
Distributor Sort Order
Advanced Filter Mode
Distributor Test Tool
Weighting and Caps
Distribution Hours
Tracking & SLAs
Team Settings
Distribution Teams Introduction
Distribution Assignment Process view
Team Summary
Team Members
Team Availability
Team Performance
Assignment Rejection
Post Assignment
Stamp Rejection
Distribution Tags
Distribution Availability
Distribution Availability
Shift Hours
Out of Office
Distribution Holidays
Holiday Regions
Regional Holidays
User Availability Toggle
Distribution Settings
Distribution Settings
Calendar Integration
Advanced Settings
Distribution Engine Running User
Licensed users list
Export & Import
Import Errors
Trigger Settings
Email Notifications
Email Notifications - Introduction
Custom Email Notifications
Disabling Standard Email Notifications
Customising the Email Template
Disabling Custom Email Notifications
From Email Address
Email Notification as Flow
Assignment Simulator
Assignment Simulator - Introduction
Configure Assignment Simulation
Assignment Simulator Result Explorer
Advanced
Q2Q teams
Integrating InsideSales.com power dialer
Pardot
Auto archive feature
Uploading tags via dataloader
Salesforce Mobile
Tuning Distribution Engine
Setup Introduction
Queue Basics
Queues
Distribution Sync
Monitoring
Distribution Console
Console Introduction
Application Monitoring
Today's Distributions
Sources Console
Availability Calendar
Distribution Logs
Distribution Logs
Distribution Logs List
Territories Logs List
Lead Matching Logs List
Custom Classification Log List
Auto-Conversion Logs List
Object Sync Logs List
Scheduler Logs List
Archive Logs List
Exporting Log Data
Distribution Analytics
Distribution Engine Details Object
Distribution Engine Dashboard
Salesforce Reports
Reports - Leads and Distribution Logs
Change History
Setup Examples
Skill Based Matching
Assigning Contacts - Pairing SDRs and AEs
Delaying Distribution
Enforce Cap for Manually Assigned Records
Criteria Caps
Salesforce Admins
Workflow Rule Examples
Formula Examples
Domain Formula
Timezone Bucket Formula
Has Activity Formula
Territory Formula
Age Formula
Distribution Engine Details Formula
id Field to Text
Flow Examples
Chatter Notifications
Slack Notifications
Desktop or Mobile Notifications
Custom Assignment Rejection
Classify on Address Change
Assign on Action
Process Builder Examples
Process Builder - Avoiding Clashes
Opportunity Assignment - Updating Related Accounts & Contacts
Rejection API Process
Assign License and Permission Set on Team Member Addition
Assign License on Team Member Addition
Tasks on Record Assignment by Distribution Engine
Information for New Admins
Validation Rules
Developers
Apex API
Availability API
Classifier API
Out of Office API
Tags API
Team Members API
DE Apex API Introduction
Rejection API
System API
Trigger Distribution API
Apex Trigger Examples
Omni-Channel Presence Integration
Salesforce Presence Integration
Invalid Email trigger
Custom Triggers
Visualforce Examples
Troubleshooting
Warnings and Errors
Health Checker Messages
Scheduler Restarted
Distributor Failures - Records on Hold
Assignment Errors
Classifier Errors
Apex CPU time limit exceeded
Timeout when deleting a Team Member or Distributor
Records Stuck / Not Being Assigned
Support
Previous Releases
2.9
3
4
4.12
4.15
Armadillo
Bison
Chameleon
Dragon
Dragon beta release - install guide
Eagle upgrade process
Eagle
Fox
Gorilla
Gorilla Upgrade Process
Hummingbird
Hummingbird Upgrade Process
Impala
Impala Upgrade Process
Jellyfish
Jellyfish Upgrade Process
Koala
Koala Upgrade Process
Llama
Llama Upgrade Process
Meerkat
Meerkat Upgrade Process
Upgrade Links
Frequently Asked Questions
Legacy Widget - New status
Distribution Engine Aborted
Alerts not Firing
Distribution Engine Delayed
Can one Distributor Assign from Multiple Queues / Users?
Can't See Distribution Engine
Distribution Engine Not Running
Manual Shutdown of Distribution Engine
Exclude members from Holidays
Distribution Engine Health Checker Restart
Dashboard Running User Error
Assignments going to wrong user
Contact Support
Grant Login Access
Upgrading Distribution Engine Steps
Purchase
Purchasing Steps
Purchasing FAQs
Support Packages
Legal Agreement Details
GDPR
Policies
Migrating Licences
Contact us
Latest Release
- All Categories
- Developers
- Apex API
- Classifier API
- Classifier API
Classifier API
Updated by Simon Maskell
The DE Apex API includes methods to classify records, useful for when you want to re-classify records at a later point in their lifecycle, as classification will automatically take place on record creation. It could also be used if you don't want to perform classification on initial insert of the record.
Classify Records
global static ClassifierResultDTO classifyRecords(ClassifierRequestDTO request)
Perform the requested classification on a given list of records, the request is of type ClassifierRequestDTO and returns an object of type ClassifierResultDTO. The request can include what classifications are to be performed on the records, those classifications needs to be configured but don't have to be enabled. The result includes whether the request failed validation and why, and if successful, contains the status of individual record classifications.
Example
Perform territory and custom classification on some leads.
List<Id> leadIds = new List<Id>();// List of lead ids to process
List<String> classificationTypes = new List<String>{ 'Territory', 'CustomClassification' };
n2de.ClassifierRequestDTO classifierRequest = new n2de.ClassifierRequestDTO(leadIds, 'Lead', classificationTypes, null);
n2de.ClassifierResultDTO classifierResponse = n2de.GlobalAPIClassifier.classifyRecords(classifierRequest);
if (!classifierResponse.validationSuccess) {
System.debug('Validation failed: ' + classifierResponse.validationError);
} else {
for (n2de.ClassifierIndividualResultDTO result : classifierResponse.recordResults) {
if (result.classificationStatus == 'Missing' || result.classificationStatus == 'Error') {
System.debug('Classification failed: ' + result.classificationError);
}
}
}
- The list of record ids need to be populated
- The object type needs to be populated
- The list of classification types needs to be populated, be configured and be valid for the object type
- The valid types are "Territory", "Match", "CustomClassification" and "AutoConversion"
- If custom classification is included, the optional stamp groups to use can be populated, but must not be empty
Bulk Classify Records
global static List<ClassifierResultDTO> bulkClassifyRecords(List<ClassifierRequestDTO> requests)
Perform the requested groups of classification on the given list of records, the request is a list of type ClassifierRequestDTO and returns a list of type ClassifierResultDTO. The requests can include what classifications are to be performed on the records, those classifications needs to be configured but don't have to be enabled. The result includes whether the request failed validation and why, and if successful, contains the status of individual record classifications. This API allows you to perform different classifications on different objects, at the same time.
Example
Perform territory classification on some leads and custom classification for a stamp group on some accounts.
List<Id> leadIds = new List<Id>();// List of lead ids to process
n2de.ClassifierRequestDTO classifierRequestLead = new n2de.ClassifierRequestDTO(leadIds, 'Lead', new List<String>{ 'Territory' }, null);
List<Id> accountIds = new List<Id>();// List of account ids to process
n2de.ClassifierRequestDTO classifierRequestAccount = new n2de.ClassifierRequestDTO(accountIds, 'Account', new List<String>{ 'CustomClassification' }, new List<String>{ 'Stamp Group A'} );
List<n2de.ClassifierResultDTO> classifierResponses = n2de.GlobalAPIClassifier.bulkClassifyRecords(new List<n2de.ClassifierRequestDTO>{ classifierRequestLead, classifierRequestAccount });
for (n2de.ClassifierResultDTO classifierResponse : classifierResponses) {
if (!classifierResponse.validationSuccess) {
System.debug('Validation failed: ' + classifierResponse.validationError);
} else {
for (n2de.ClassifierIndividualResultDTO result : classifierResponse.recordResults) {
if (result.classificationStatus == 'Missing' || result.classificationStatus == 'Error') {
System.debug('Classification failed: ' + result.classificationError);
}
}
}
}
- The list of record ids need to be populated
- The object type needs to be populated
- The list of classification types needs to be populated, be configured and be valid for the object type
- The valid types are "Territory", "Match", "CustomClassification" and "AutoConversion"
- If custom classification is included, the optional stamp groups to use can be populated, but must not be empty