Skip to main content
Skip table of contents

Dispatch Queue Record Sort Order Update

The Dispatch Queue Record Sort Order Update program will prioritize dispatches at schools that have the most unfilled dispatches.


As some districts are having trouble finding replacing employees to fill their dispatches, districts were finding that schools that started earlier in the day were consistently getting more calls/dispatches because ADS (correctly and by design) sorts unfilled dispatches by date and time - so the earlier a school started, the earlier unfilled dispatches for those schools would be called out. 

This program attempts to rectify this concern by prioritizing unfilled dispatches by the number of unfilled dispatches at each school – that is to say that dispatches from schools with more unfilled dispatches would be called before dispatches from schools with fewer unfilled dispatches.

So, if school A had 10 unfilled dispatches, and school B only had 3, the dispatches from school A would be called before the dispatches from school B.

Note: Unfilled dispatches will be totaled for a dispatch group and location.  Further, the selection criteria fields that you enter will be used both in the selection of dispatches to process, and in the accumulation of the number of unfilled dispatches.  So, if you select EA dispatches only, only EA dispatches will be processed (and updated if final) and only EA dispatches will be included in the count of unfilled dispatches.

If you choose to only process some of the queue records, and leave others with their original sort order containing the start time, the ones you process in this program will always be dispatched before the unprocessed ones.


Here are the prompts you will see when you run this program:

DISPATCH START DATE AND TIME (FROM AND TO)

This field lets you select dispatch queue records by date and time.  It is expected that you would only be processing one date at a time, and as a result, you will be warned if your start date isn’t the same as your end date.  The time portion of the from/to fields has been added so that you can select and update morning dispatch records independent of afternoon.  You are expected to enter date and time in this format YYYYMMDDHHMMSS.  If you enter dates without times (i.e. use the date picker), the time for the FROM date/time will default to 00:00.00, and the time for the TO date/time will default to 23:59.59.


DISPATCH GROUPS

You must select at least one dispatch group.  Only dispatches belonging to the specific dispatch group(s) will be selected and included.


LOCATION TYPES

If you don’t enter any location type codes, dispatch queue records will be selected regardless of location type.


LOCATION AREAS

If you don’t enter any location area codes, dispatch queue records will be selected regardless of location area.


LOCATIONS

If you don’t enter any location codes, dispatch queue records will be selected regardless of location code. 

Note - If specific schools must be filled regardless of how many jobs they have and they need to be pushed to the top of the queue, this can accomplish by running this program manually and select just the dispatch group(s) and location(s) that they want to move to the top.


POSITION CATEGORIES

If you don’t enter any position category codes, dispatch queue records will be selected regardless of position category.


POSITION BARGAINING UNITS

If you don’t enter any position bargaining unit codes, dispatch queue records will be selected regardless of position bargaining unit.


POSITION DEPARTMENTS

If you don’t enter any position department codes, dispatch queue records will be selected regardless of position department.


POSITIONS

If you don’t enter any position codes, dispatch queue records will be selected regardless of position.


SUBJECTS

If you don’t enter any subject codes, dispatch queue records will be selected regardless of subject.


SUBJECT LEVELS

If you don’t enter any subject level codes, dispatch queue records will be selected regardless of subject level.


ONLY UPDATE IF UNFILLED DISPATCHES 

In case you want this program to only move to the top of the queue the dispatches from locations with the most unfilled dispatches you can enter a non-zero number here.  Entering say 5 here will only process (move to the top of the queue) dispatches at locations with more than 5 unfilled dispatches.  The number used in this selection is the number of unfilled dispatches divided by the divisor.  More on the divisor below…


UPDATE ABS CODE/REQ EMP PORTION

The field on the queue records used for sorting is comprised of an ‘A’, the dispatch start date, 2 characters to handle absence code priority and requested employee sorting and 5 characters to handle start time sorting.  By comparison, the manual ‘move to top’ function in the Absence/Dispatch maintenance page changes the date from the start date to ‘19000101’ (which this program won’t do) and clears out the absence code priority and requested employee sorting values as well as the start time.  This program will, by default, also clear out the portion of the sort field used to handle absence code priority and requested employee sorting.  If you choose not to do this, just enter N here.  By entering Y here, you are saying regardless of how ADS is configured to prioritize dispatches based on absence code priority and requested employee priority, move dispatches updated by this program to the very top of the list.  By entering N here, you are allowing absence code and requested employee priority to be preserved, and to be given priority over the number of unfilled dispatches.


PRELIMINARY/FINAL RUN

Enter P to display a report without updating any dispatch queue records. Enter F to display the report AND update the dispatch queue records.


Report

The report shows you enough information to identify each queue record.  Most of it is the same as the info you see when you go into the Custom Functions > View Dispatch Queue Recs option from the Absence/Dispatch maintenance page.

The column headings are self-explanatory, except for P which stands for In Process.  Records that are in process will have a * or a P in it.  A blank value means not in process i.e. not currently being processed/called by the ADS system. 

The other new column is the UNFIL column.  It shows the number of unfilled dispatches per dispatch group and location (remember that all selection criteria applies to this unfilled count as well).

After each record, you will see the current and proposed (if preliminary) or updated (if final) sort order field values.  

As mentioned above, the queue record sort field is comprised of A YYYYMMDD |Abs|Req| HH:MM, where:

  • A is a hard-coded value
  • YYYYMMDD Is the start date of the dispatch
  • |Abs|Req| is the absence code priority/requested employee sort values – one character each – the report displays the ASCII value of each of the 2 characters
  • HH:MM is the start time of the dispatch.

This program will update/over-ride what is normally in the HH:MM (start time) portion of the sort field and load it with a numeric value that will cause the updated dispatches to be prioritized (dispatched first) by the number of unfilled dispatches at its location.  It will also (optionally, and by default) change the absence code priority and requested employee portion of the sort field.


Report Details

In addition to displaying the absence/dispatch IDs, start date, end date, start time, end time, absent employee, absence code, location, position, subject/level and number of unfilled dispatches per school, it also displays some detailed information about the SORT ORDER field – both the current and proposed (if preliminary) or updated (if final) values.

In the above example, the current SORT ORDER field has a value of A20210804|254| 32|20:00.  

The main purpose of this program though is to update the start time portion of the SORT ORDER field. 

In the example above, the CURRENT value (pre update) was set to ‘20:00’.  After the update, the UPDATED value was ‘ 9996’.  What looks to be a <space> on the report before the 9996 is actually the smallest character in the ascii table (chr(1)).  This ensures that any records processed by this program will be processed before any that haven’t.  After the chr(1) character, you will see a value of 9996.  This is the ‘inverted’ value of the number of dispatches at the dispatch location.  In order to make an otherwise ascending sort field put the larger number of unfilled dispatches first ahead of the smaller number, the number needs to be inverted. The way the number of dispatches is inverted, is to subtract it from 9999.  This results in values like the below:

Number of unfilled dispatches

Inverted Number (9999 – unfilled dispatches)

0

9999

1

9998

2

9997

3

9996

4

9995

9996

3

9997

2

9998

1

9999

0

As a result of this inversion, large number will be at the top of the list, and small number will be at the bottom, which is what we want in order to sort the unfilled dispatches by the number of unfilled dispatches – most to least.

So, if you look at the unfilled dispatch example, there are 3 unfilled dispatches for its location, and if you find 3 in the table, it inverts to 9996, which is what you find in the proposed/updated sort order field. 

The detail on the report tries to help you with the following detail:  It's telling you that there are 3 unfilled dispatches at the applicable location.  It’s also telling you that the divisor (more on that below) is 1, and that if takes the UNFILLED and divides it by the DIVISOR which in this case equals 3.  It then subtracts 3 from 9999 giving you 9996, which it then puts into the start time portion of the sort order field.


Report Mode Final

A FINAL run will produce the same report as a preliminary, except it will update the dispatch queue records, and provide you with a count of the records that have been updated:

There is also a count of the QUEUE RECORDS NOT UPDATED BECAUSE NO CHANGE which shows you how many records were not changed because the newly calculated sort order value was the same as the previous one, ,so no need to change it.

You will also notice that there is a count of ERRORS, which should always be 0.  If there are errors, the details will show up on the report.

You will also see a count of RECORDS SKIPPED BECAUSE LOC UNFILLED NOT > 0 (or whatever number you entered here). So, if you entered a 5 in ONLY UPDATE IF UNFILLED DISPATCHES > field and there were locations with less than or equal to 5 unfilled dispatches, they would be skipped.



What is a Location Divisor?

Issue: Sometimes, it's not simple as basing on the unfilled positions. For example, a secondary school with 4 fail-to-fill and elementary school with 4 fail-to-fill is not comparable. The secondary school has more resources so the dispatcher will prioritize the elementary school over the secondary.

To accommodate this request, a new field has been added to the Tabbed Profile Maintenance program, on the ADS tab, called:

List of 'Location Divisors' to control dispatch queue record sort order (location_code=divisor,location_code=divisor i.e. 0021=2,0022=2,0023=3) Note: Default is 1, so no need to list locations where divisor is 1

This divisor will be used to reduce the number of unfilled dispatches by dividing it by this divisor. 

Example:

  • You have 0021=2 in the tabbed web profile Location Divisor field
  • Location 0021 has 4 unfilled dispatches
  • Location 0022 has 3 unfilled dispatches

Without the Location Divisor in play, you would expect the dispatches at location 0021 to be dispatched before the dispatches at location 0022, because it has more unfilled dispatches 4 vs 3.

However, because of the Location Divisor specified for location 0021, the program will divide the number of unfilled dispatches (4) by the 0021 divisor (2) and get s result of 2.  It will then compare the 2 unfilled dispatches at location 0021 to the 3 unfilled dispatches at location 0022 and dispatch the 0022 dispatches first, because after factoring in the divisor, it now has more dispatches than location 0021.  As per the note on the new Location Divisor web profile field, all locations not in the profile field, will be treated as though they have a divisor of 1.  This means you only have to enter locations and divisors that don’t have the default 1 value.  Let’s say that you want to give priority to all elementary schools by a factor of 2 i.e. if elementary and secondary schools have the same number of unfilled dispatches, you want to give priority (dispatch first) the elementary school dispatches.  You would only have to enter all non-elementary schools in the profile Location Divisor field with their corresponding divisor.



Automation

This program can be automated to run a couple of times during the evening dispatch (the day before), and at least once (if not more) on the day of, by using vms command files to run and auto-submit this program to run at the times requested.

In order to accommodate this, the program will accept 00000000 and 11111111 as the YYYYMMDD portion of the timestamp field.  It will convert 00000000 to the system date when run, and 11111111 to tomorrow’s date so you can run it for unfilled dispatches that start the next day, if necessary.  

If this automation is required, please reach out to Atrieve Support.










 


JavaScript errors detected

Please note, these errors can depend on your browser setup.

If this problem persists, please contact our support.