Primary Resource Appointment Reassignment Configuration
By default, when dispatchers update the last Primary Resource Appointment of a Multiple-Resource Job to a final status, all related non-primary Multiple-Resource Appointments that are not yet completed are also updated to the same status. In cases where Long-Term Jobs are assigned to many Resources on many different dates, this behavior is problematic, becsuse only users who are assigned the System Administrator role can manually update all related unfinished non-primary Multiple-Resource Appointments to non-final status. To avoid this, dispatchers must manually update a non-primary Multiple-Resource Appointment to a Primary Resource Appointment before they update a completed Primary Resource Appointment to a final status. To save time and effort for users, you can configure Service Board to automatically update existing non-primary Multiple-Resource Appointments to Primary Resource Appointments.
To override this default behavior, you configure two settings. The Enable Primary Resource Handoff setting is used to override the behavior, and the Primary Resource Handoff Rule is used to configure which non-primary Multiple-Resource Appointment is updated to the new Primary Resource Appointment.
Rules are JSON objects that contain the following elements:
Element
Description
condition
Contains SMQL filtering logic that is used to select the Multiple-Resource Appointment to be updated.
ordering
Can be configured to specify which Multiple-Resource Appointment to update in cases where more than one Multiple-Resource Appointment matches the filtering criteria defined in the condition element.
Example Rule
To select the earliest Multiple-Resource Appointment in non-final status:
{"condition":"svmx_related_to = :job and svmx_workflow_final = false and io_uuid <> :appointment", "ordering":"svmx_start_datetime asc"}
Logic Flow
If the condition element is not specified, the default value shown in the previous example is applied, and the job and appointment parameters are automatically populated with the record IDs of the related Job and the previous Primary Resource Appointment.
If the condition element is specified, the default shown in the previous example is appended to the configured condition with an AND operator.
If the ordering element is not specified, the default ordering value shown in the previous example is applied.
If the specified condition and ordering values are invalid, the default condition and ordering values shown in the previous example are applied.
If the specified condition or ordering values do not match any Multiple-Resource Appointments, the default condition and ordering values shown in the previous example are applied.
Additional Example Rules
To select the earliest Multiple-Resource Appointment in Pending status:
{"condition":"svmx_workflow = 'Pending'", "ordering":"svmx_start_datetime asc"}
To select a Multiple-Resource Appointment in Accepted status with Start and End field values that fall within the current day:
{"condition":"svmx_workflow = 'Accepted' and (svmx_start_datetime = today() or svmx_end_datetime = today())","ordering":"svmx_start_datetime asc"}
After you configure this behavior override, the following field values of the related Job are updated to align with the new Primary Resource Appointment:
Status
Order Status
Resource
Service Team
Scheduled Time
* 
In cases where multiple non-primary Multiple Resource Appointments related to a Job are assigned to the new Primary Resource, all such Appointments that are not in an aborted status are updated to Primary Resource Appointments. However, only the non-primary Multiple-Resource Appointment that matches the condition and ordering logic specified in the Primary Resource Handoff Rule setting affect the Status and Order Status field values of the related Job.
For details about SMQL filtering and ordering logic, see SMQL Statement Syntax and SMQL Filtering Support by Data Type in Max for Developers.
For more information:
Was this helpful?