Skip to main content

Driver rules

This article explains how to set up and use Driver rules.

Written by eLogii

Driver rules are used to define sets of Driver-related rules that influence how eLogii will behave in case specified Driver fields are populated with defined values. This feature can be found in Configuration ⇒ Driver rules.

Rule Application Settings

Users can choose when they want the rule to trigger (Apply rule on driver) - once the Driver that meets the criteria is created (the rule can trigger only once for that Driver), once it's been updated (the rule can trigger multiple times, depending on the conditions set), or in both cases.

An Apply phase can also be specified. Users can choose whether the rules should be applied before or after the resolution of eLogii system references, including start/end locations, vehicles, teams, and zones. System references in this context are placeholders or references that eLogii later converts into actual objects or values.

In practice, "after resolution" refers to the point after the Task is created. Rules are applied, and are usually selected when rules need to evaluate the actual assigned locations, vehicles, teams, or zones, while "before resolution" means before a Task is created, and is used when the logic should act on the system references themselves. Specifying either of these values prevents situations where a previously applied rule gets overridden by a consecutive rule.

Setting up Source Field conditions

It is possible to set multiple conditions for a singular rule, as well as groups of conditions. This means that you can add multiple conditions and define their relationships, then once the conditions are met, they influence the outcome of the rule.

The triggers are set in the source field, while the result is specified in the target field. The Source field refers to the trigger of a specific change you want to occur, and the Target is where you would like to apply that change.

A simple example of using Driver rules would be changing the route stop limit of specific Drivers if they meet the necessary criteria.

The AND defines the relationship of the conditions, meaning that the Driver needs to have both of these specific triggers for the rule to apply. This means that, following the example above, only Drivers with the reference 123 and an assigned zone "Friday Run" are the ones the rules apply to. In case there are Drivers with the same reference, but are assigned to a different zone, the rule would not apply to them.

If we were to set OR as the relationship definer for the same example, then the scope of application would be much wider, as the rule would be applied in case the Driver has a reference set as 123, and their assigned zone is "Friday run", or if their reference number is 456, and their assigned zone is "Wednesday run".

Users can also add another layer to the condition relationships by grouping certain conditions within groups and then defining the relationships of those conditions within the group, just as in the example above.

Both the target and source field entity elements that can be selected for Driver rules are limited to Driver-related fields.

Logical Operators

Logical operators are used to indicate how eLogii should interpret the source field value. Users can choose from the following logical operators:

Operator

Name

Function

=

equals

Assigns values to entities - the left side holds the same value as the right side

!=

not equal to

Check whether the values of two entities are equal or not. If the values are not equal, then the condition becomes true

>

greater than

Check if the value of the left side is greater than the right side. If it is, then the condition becomes true

>=

greater than or equal to

Check if the value of the left side is greater than or equal to the value of the right side. If it is, then the condition becomes true

<

less than

Check if the value of the left side is less than the value of the right side. If it is, then the condition becomes true

<=

less than or equal to

Check if the value of the left side is less than or equal to the value of the right side. If it is, then the condition becomes true

contains

contains

If the field contains a specified value, a desired action will be triggered.

begins with

begins with

If the contents of the field begin with a specific value, an action will be triggered.

ends with

ends with

If the contents of the field end with a specific value, an action will be triggered.

does not contain

does not contain

If the contents of the field do not contain a specific value, an action will be triggered.

does not begin with

does not begin with

If the contents of the field do not begin with a specific value, an action will be triggered.

does not end with

does not end with

If the contents of the field do not end with a specific value, an action will be triggered.

is null

is null

If the contents of the field are empty, an action will be triggered.

is not null

is not null

If any content is populating the selected field, an action will be triggered.

in

in

If a specific value is included in the contents of a list in the selected field, then an action will be triggered.

not in

not in

If a specific value is not included in the contents of a list in the selected field, then an action will be triggered.

between

between

If the number value of the selected field is between the specified range, an action will be triggered.

not between

not between

If the number value of the selected field is outside of the specified range, an action will be triggered.

Target Fields and Target Field Values

There are many target fields to choose from, and they depend on the target Driver field that stores information.

  • text - relates to populating the fields that store string/text data types. You would choose text if you wish to set a particular skill or capability to a Task after conditions are met.

  • number - relates to populating specific fields that store data as integers/numbers. You would choose this if you wish to define a priority for a Task based on specific conditions, for example.

  • date - this field will be used if you wish to make changes to any fields that store date data.

  • color - this will prompt a color picker where you can pick a color that will be applied to the Tasks that meet the desired conditions.

  • true/false - refers to the validity of the defined target field.

  • fieldName - refers to another Task field in eLogii. It allows users to copy data from one field to another via automation.

  • JSON - allows users to write JSON expressions to get the desired outcome.

It's possible to add multiple target fields within a single rule. This means that you can add various actions to trigger once specific conditions are met. For example, if a Driver with a particular reference is imported to the system, you can set a specific tag to apply, assign them to a Team, and set their skills to specific values.

Did this answer your question?