Schedule Optimization > Pre-Calculation Overview
Pre-Calculation Overview
The pre-calculation flow starts whenever a work order is created or updated. If Schedule Optimization is enabled in the org, the pre-calculation flow works towards preparing the work order for possible scheduling by the Schedule Optimization engine. This flow is part of the Work Order Trigger.
The following events occur as part of the pre-calculation whenever a work order is created or updated:
The following checks are performed:
Is SET002 (Module: OptiMax, Submodule: Dispatch Calculations) set to True in the org?
Is the Schedule Optimization Error Occurred checkbox in the work order checked?
Is the Dispatch Process field in the work order blank?
Is the Locked By DC field in the work order blank?
If any of the above is true, the following field values in the work order are updated:
Work Order Field
How is it Updated?
Notes
Primary Territory
Updated based on work order field values matching the selected territory attributes in the matching territory match rule.
If more than one territory match rule’s entry criteria match a work order’s field values, the first territory match rule in the rule sequence is selected.
If a matching territory is not found, other Schedule optimization parameters are not calculated. This means that the work order is not considered for optimized scheduling.
Territory is updated only if the Locked By DC field in the work order is blank.
Dispatch Process
The Dispatch Process for the work order is calculated based on work order field values matching dispatch process entry criteria, for the primary territory.
If a work order does not match any dispatch process, the Schedule Optimization Error Occurred field is set to TRUE. The Schedule Optimization Error Text field value indicates the error.
If there is no Dispatch Process attached to a work order at this phase, the work order is not considered for optimized scheduling.
Dispatch Priority
Dispatch Priority is calculated based on work order field values matching any of the Dispatch Priority Rules defined in the matched dispatch process.
Dispatch priority is set to 5, 4, 3, or 2 if the work order matches the priority rules Critical, High, Medium, or Low (P1, P2, P3, or P4) respectively.
If the work order does not match any of the priority rules, dispatch priority is set to the default value of 1, which is the configuration setting Default Dispatch Priority.
If matching criteria are not defined for any priority rules, all the work orders will match the first such rule with undefined criteria.
For example, if the criteria is defined for the P1 priority, but not P2, except for work orders that match the P1 rule criteria, all the other work orders will match the P2 rule.
Service Duration
Service Duration is calculated based on work order field values matching any of the MTTS Rules.
If more than one MTTS rule's entry criteria matches a work order’s field values, the first MTTS rule in the rule sequence is selected.
If the work order does not match any MTTS rule, Service Duration is set to the default value of 60 minutes, which is the configuration setting Default Service Duration.
The value is defined in minutes in the MTTS and configuration setting but saved in seconds in the work order field.
Skill
Skills Required are calculated based on work order field values matching any of the Skill Matching Rules.
If more than one skill matching rule matches a work order’s field values, the first skill rule in the rule sequence is selected.
Skill is updated only if the Locked By DC field in the work order is blank.
The value is stored in a JSON string in the skill set field.
Eligibility Requirements
Eligibility Requirements are calculated based on the Eligibility rules defined.
If more than one eligibility matching rule matches a work order’s field values, the first eligibility rule in the rule sequence is selected.
Preferred Technician
Preferred Technician is calculated if the matching dispatch process has the setting ‘consider preferred technician’ set to Yes.
There will be a higher chance of a Preferred Technician getting assigned, the higher the Sending the preferred technician value is relative to the other Cost Factors in the matching dispatch process.
Qualified Technicians
Qualified Technicians are a result of Skills, Eligibility, Product Expertise, and Preferred Technician.
Qualified Technicians is a JSON string, and is a list of technicians based on Skills, Eligibility, Product Expertise, and Preferred Technician.
Preferred Business Hours
With Preferred Business Hours, if a Booking Window is not applicable and the SLA Terms field is not null, this is set to the matching SLA timestamp’s business hour.
The matching SLA timestamp depends on the configuration setting SLA Timestamp for Work Order Scheduling.
Whether the timestamp is applicable for a given work order depends on the work order’s priority and order type matching one of the defined records for that timestamp.
Or else, if the SLA Terms field is null, this is set to the access hours from the component or account in that order, if they are not null.
Preferred Start and End Time
With Preferred Start and End Time, if the booking window is applicable to the work order’s case, then those values are taken.
Or, if an SLA is applicable, then set the Preferred Start Time equal to System.now(), and the Preferred End Time equal to the SLA Timestamp field value, based on the configuration setting, whose default is Onsite Response Customer By.
If either is not available, the manually entered value in the work order is persisted.
With all these field updates, the work order is ready to be consumed by the Schedule Optimization engine.
Was this helpful?