Click or drag to resize
ShiftPattern table
Print this page

Use the ShiftPattern table to specify the the daily work shifts for multiple days, up to a maximum of 31.

Note Note

This table supports Response integrations for Fleet accounts.

For each day in the shift pattern, you assign one or more predefined Shifts that specify the work hours for that day.

The following example shows a JSON input file for a StandardForty shift pattern that represents a 7-day schedule with five days working standard shift (8 AM - 5 PM), followed by two days off:

JSON
[{
    "Name": "StandardForty",
    "ShiftAssignments": [
      ["Standard"],
      ["Standard"],
      ["Standard"],
      ["Standard"],
      ["Standard"],
      [],
      []
    ]
}]
Note Note

In the ShiftAssignments array, use an empty value [] to represent a day off.

The following example shows a BiWeeklyFlex shift pattern that specifies the shifts for a 14 day period:

  • Week 1: Four 10-hour workdays followed by three days off.
  • Week 2: Five 8-hour workdays followed by two days off.
JSON
[{
   "Name": "BiWeeklyFlex",
   "ShiftAssignments": [
     ["TenHour"],
     ["TenHour"],
     ["TenHour"],
     ["TenHour"],
     [],
     [],
     [],
     ["Standard"],
     ["Standard"],
     ["Standard"],
     ["Standard"],
     ["Standard"],
     [],
     []
   ]
}]

In a given day, you can assign more than one shift, up to a maximum of 5. For example, to include morning, afternoon, and evening shifts in the same day, use the following shift assignment: ["Morning","Afternoon","Evening"]

In these examples, the Standard, TenHour, Morning, and Afternoon, Evening shifts were previously defined using the Shift table.

This topic contains the following sections:

Requirements

To Create a new ShiftPattern, at a minimum the following columns must be provided:

  • Name (unique)
  • ShiftAssignments (Nested array that specifies the shift assigned to each day included in the ShiftPattern.)

To Update a ShiftPattern, you must supply the id and the ShiftPattern name or shift assignment array that you want to change.

To Delete a shift, only the ShiftPattern Id is required.

When you write templates that access this table, follow these requirements:

  1. Specify the Symbolic Name for the table version to use:

    TableID = ShiftPattern-1.0

  2. Specify an Intent that this table supports:

    • Retrieve
    • Create
    • Update
    • CreateOrUpdate
    • Delete

  3. Input templates: In your [Output] section, be sure to map an input value to every table column that is flagged as being a primary key or required.

  4. Retrieve templates: This table does not require the use of a fetcher.
ShiftPattern column descriptions

This list includes each column's name, which you use in expressions to retrieve or create data, and data type, which defines how the data is retrieved and set.

Note Note
If a column of data type Id is a primary key OR if it refers to other tables (Id <OtherTable>), then you can map it to an external key or, in some cases, a Telogis key.
Column Data Type Description
Id Id (primary key) The ID of the shift pattern.
Name Text (Telogis key) The name of the shift pattern.
ShiftAssignments Array<Array<Id<Shift>>> A nested array that specifies each day of the shift pattern and the shifts associated with each. The array can include a maximum of 31 days. A single day can include up to 5 shifts.

Additional columns:

Column Data Type Description
CustomerId Id (read-only, all Fleet tables) The ID of the customer/owner.
CustomerFullName Text (read-only, all Fleet tables) The human-readable full name of the customer/owner.
Custom columns
Column Data Type Description
Custom.name Text Specifies a user-defined custom column name to store additional information in the table. If the column name contains non-alphanumeric characters, enclose the value in brackets, for example Custom.[Special column].