Click or drag to resize
Route table
Print this page

The Route table provides information about scheduled routes containing jobs.

Note Note

This table supports Response integrations for Fleet accounts. Contact your account manager for additional information.

This topic contains the following sections:

Requirements

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

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

    TableID = Route-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 requires the use of a fetcher. The following fetchers are available and are listed from most efficient to least:
    1. Id (Equals/In)
      [Filter]
      Id(ExtId) = Equals(Id1)   # You can filter on literals or on variables from the [User] or [Calculated] sections.
      [Filter]
      Id(ExtId) = In(["Id1","Id2","Id3"])
    2. StartTime (Between/GreaterThan)

      You can improve the performance of the StartTime fetcher by adding one or more of the optional filter parameters.

      [Filter]
      StartTime = GreaterThan(StartTime)      # You can use either a GreaterThan or Between function
                                              # such as Between(TimeStart,TimeEnd)
      # Optional filter parameters:
      
      # TerritoryId(ExtId)=  In("Id1", "Id2", Id3")          # Or use Telogis Id: TerritoryId = Equals("123456...")
      # DriverId(ExternalIdName) = In("Id1", "Id2", Id3")    # Or use Telogis Id: DriverId = Equals("123456...")
      # UnitId(ExternalIdName) = In("Id1", "Id2", Id3")      # Or use Telogis Id: UnitId = Equals("123456...")  
      # LastUpdateTime = GreaterThan ("UpdateStartTime")     # You can use either a GreaterThan or Between function
                                                             # such as Between(StartLastUpdateTime, EndLastUpdateTime)
Supported table options

This table supports the following option, which can be set in the [TableOptions] section.

  • DriverUnitSync - For Route table input templates, determines the way in which routes, drivers, and units are assigned. These settings only apply if you provide either the UnitId or the DriverId. If you provide both, then the values provided will be used regardless of this setting.

    Value

    Description

    Never (default)

    TDE only sets the values provided within the input data and does not update the route with related values from the Unit or Driver tables.

    Always

    This setting affects the following scenarios:

    • If you provide the UnitId and not the DriverId: The driver that is currently assigned to the unit will be automatically assigned to the route, or the route's driver will be unassigned if there is no driver assigned to the unit. In other words, the value for Route.DriverId will always be set to the value of Unit.DriverId.
    • If you provide the DriverId and not the UnitId: The unit that is currently assigned to the driver will be automatically assigned to the route, or the route's unit will be unassigned if there is no unit assigned to the driver. In other words, the value for Route.UnitId will always be set to the value of Driver.UnitId.

    AssignOnly

    This setting affects the following scenarios:

    • If you provide the UnitId and not the DriverId: The driver that is currently assigned to the unit will be automatically assigned to the route if a driver is assigned to the unit. In other words, the value for Route.DriverId will only be set to the value of Unit.DriverId if a driver is assigned to the unit.
    • If you provide the DriverId and not the UnitId: The unit that is currently assigned to the driver will be automatically assigned to the route if a unit is assigned to the driver. In other words, the value for Route.UnitId will only be set to the value of Driver.UnitId if a unit is assigned to the driver.

Route 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 route.
Name Text The name of the route.
DriverId Id<Driver> (required if no UnitId) The ID of the driver assigned to this route.
UnitId Id<Unit> (required if no DriverId) The ID of the vehicle that the assigned driver is to use for this route (if known).
TerritoryId Id<Territory> (required) The ID of the territory to which this route belongs.
TerritoryName Text (read-only) The name of the territory.
StartTime Timestamp The time of day when the route is scheduled to start (when the vehicle is to leave the depot).
EndTime Timestamp The time of day when the route is scheduled to end (when the vehicle is to return to the depot).
Status EnumType (read-only) The status of this route. Values: NotStarted, InProgress, Complete, NotComplete.
EarliestStartTime Timestamp The earliest time of day that the route can start (when the vehicle leaves the depot). A route's shift is Variable if both the EarliestStartTime and LatestEndTime are specified (i.e. the shift's beginning and ending times may vary within the window specified). If only the EarliestStartTime is specified, then the route's shift is Fixed (i.e. the shift begins at the EarliestStartTime).
LatestEndTime Timestamp For variable schedules, the latest time of day that the route can end (when the vehicle is to return to the depot).
NormalShiftDuration TimeInterval The duration for which the driver can be paid at the normal rate, before triggering overtime.
MaximumShiftDuration TimeInterval The maximum duration that the driver's shift can be scheduled for, including overtime.
FixedVehicleCostPerDay Number The fixed cost per day of running the specified vehicle, used to calculate depreciation.
LastUpdateTime Timestamp (read-only) The time when the route was last edited.

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].