Advanced Settings

The advanced settings page contains settings that could drastically impact how Distribution Engine runs. Please proceed with caution.

Processing Mode

In some cases you may want to adjust the processing mode used by Distribution Engine - typically this would be because your Salesforce org is having issues or you have added a large number of records to process.

Distribution Engine can use different types of Salesforce jobs to monitor sources and process the records within them. The processing mode options are detailed at the bottom of this page.

Scheduler Frequency

The scheduler frequency option determines how often Distribution Engine will run and attempt to distribute records. The available options will be limited by the processing mode chosen.

  • "As fast as possible" mode will run several times a minute (depending on org performance).
The org-wide Salesforce default delay for scheduling queueable jobs is only honoured for queueable features (Classifier, Automatic Mode, Queueable Mode and Parallel Mode) when the frequency is set to 'As fast as possible'. For any other frequency, the Distribution Engine setting will override this. This org-wide setting can be useful if running a lot of queueable jobs, whether Distribution Engine or not, that you wish to run more slowly.

Classifier Frequency

The classifier frequency option sets how often the classifier queueable job will run and classify new records. This can be set at any interval up to ten minutes.

Most processing for the classifier is performed in triggers; the queueable job is used to process records when there are too many or to handle the de-duplication and conversion processing.

Health Checker Frequency

The health checker is a scheduled job running parallel to the main Distribution Engine scheduler. It monitors the other Distribution Engine jobs, like the scheduler that performs assignments or the classifier, and can restart them in the event that any issues are found or notify when errors have occurred.

  • Health Checker Frequency - By default the Health Checker runs at the top of each hour. This frequency can be increased to every 15 or 30 minutes. Note that a scheduled job is run for each interval, i.e. every 15 minutes runs four scheduled jobs. 

Processing Mode Options

Queueable (Default) - The scheduler runs approximately every minute in 'As fast as possible', which is the default mode. It is possible to now select a running frequency as slow as every ten minutes. The scheduler spawns a queueable job to perform the Distribution Engine processing. This is the recommended mechanism.

  • Advantages: Runs frequently, meaning records don't wait long before being assigned. Keeps a history of each run (useful for troubleshooting failure reasons). 
  • Disadvantages: Can't set a frequency slower than ten minutes. For 'As fast as possible' on orgs that have a lot of other asynchronous jobs, the number of queueable jobs this creates a day could put you close to Salesforce's limit. 

 

Automatic - This mode will run as Queueable unless a large number of records are available to assign. At that point, it will switch to Batch Processing and process all waiting records. During both processing modes, Distribution Engine will continue to run as fast as possible and will not switch to running hourly as normally happens when running in batch mode.

  • Advantages: Larger volumes of records can be assigned without manual intervention of switching modes. Higher governor limits (can do more processing in a single run). 
  • Disadvantages: Can't set a frequency slower than ten minutes. For 'As fast as possible' on orgs that have a lot of other asynchronous jobs, the number of queueable jobs this creates a day could put you close to Salesforce's limit. 

 

Parallel - Separates the processing of records into two separate processes, one to determine the assignee and one to update the records. The updating process can be run in a number of parallel jobs, reducing run times in some cases. This mode uses Queueable jobs to assign and distribute the records.

  • Advantages:  Assigns faster in complex configurations such as when using processes that are triggered by record updates.
  • Disadvantages: Utilizes more asynchronous jobs than other processing methods, potentially hitting Salesforce daily limits.

 

Asynchronous - The scheduler runs periodically according to the frequency you define. The scheduler spawns a future method to perform the Distribution Engine processing.

  • Advantages: Can control the frequency of jobs based on your scenario. Keeps a history of each run (useful for troubleshooting failure reasons). 
  • Disadvantages: For orgs using future methods heavily, the Distribution Engine jobs will be queued along with other future methods which could cause delays.

 

Synchronous - A single Salesforce scheduled job runs periodically according to the frequency you define. The Distribution processing takes place within the context of this scheduled job.

  • Advantages: Generally runs quickly - no delays where future methods are queued for processing.
  • Disadvantages: If a job fails, it does not maintain a history of the failure reason. Lower governor limits compared to other modes, meaning fewer records can be processed each run.

 

Batch - Batch jobs process batches of records at the same time to allow for long running processes and assignment of large volumes of records. This mode will help in scenarios where a large number of records are added to the system and need to be assigned.

  • Advantages: Standard processing modes have a default limit of 500 records per run, there is no limit for Batch mode.
  • Disadvantages: Batch mode will initially be limited to running hourly to avoid overloading orgs which already use batch jobs heavily. 

 

Which processing mode should I use?

By default, the Distribution Engine scheduler runs in Queueable mode. This provides the fastest processing and uses the higher Salesforce Governors limits. 

If Salesforce is having sustained performance issues and your records are not being assigned, Asynchronous mode is a good fallback option to ensure runs take place every 10 minutes.

Consolidate zero assignment scheduler logs

Each time the scheduler runs it logs the processing it does. If your org has periods of time that no assignments are occurring, you may want to consolidate these logs. This will save storage space wtihin your org but also make it easier to review scheduler logs when needed.

How did we do?

Calendar Integration

Distribution Engine Running User

Contact