Mileage Server Manager

image1

Independent mileage profiles created for drivers, customers and vendor are connected to the third party mileage software configured using the Mileage Server Manager program and are an important part of the overall configuration.

The Mileage Server Manager program acts as an interface between TruckMate programs and third party mileage software such as PC*Miler. For example, when a dispatcher creates a new trip in the Dispatch program, the program automatically sends the 'Leg From' zone and the 'Leg To' zone to the Mileage Server Manager program, which feeds the points to the third party mileage program, and then relays the response (the mileage) back to the Dispatch program. The Mileage Server Manager program runs on a server and the user workstations are configured to connect to the Mileage Server Manager program according to the layout in each workstation’s 'HOSTS' file.

The Mileage Server Manager program has been converted to function as a Windows service so the Tools menu . When you open the Mileage Server Manager program for the first time, you will be prompted to configure the Mileage Windows service.

You can setup multiple mileage server instances across any number of computers on your network and configure TruckMate to access them all in specific ways.

PC*Miler (or any other mileage application) needs to be installed locally (not over a network, and not accessed through a mapped drive) on the Mileage Server Manager machine in order for the new Mileage Server Manager service to be able to access it properly.

If you start the Mileage Server Manger and the window does not appear, the program has been minimized and is already running. The Mileage Server Manger window minimizes to the Window notification tray section (i.e. not the task bar) in the lower right using a globe icon.

image2

To access Mileage Server Manager:

From this location Go to

TruckMate Menu and TruckMate Task List

  • TruckMate 2023.x and later:
    Utilities > Mileage > Mileage Server Manager

  • TruckMate 2022.x and earlier:
    Utilities > Mileage Server Manager

Windows Start Menu

TruckMate 20xx > Mileage Server Manager

Windows Explorer

C:\Program Files (x86) > TruckMate 20xx > Mileserv.exe

To access Mileage Profile Maintenance, open Customer & Vendor Profiles or Driver Profiles and go to Tools > Mileage Profile.

Setting up Mileage Server Manager

Procedure overview

  • Review the Application Configuration settings

  • Review the Security Configuration settings

  • Install or connect to your third party mileage engine software programs

Basic Mileage Server Manager Setup

  • Verify the default entry in the Windows Services file

  • Indicate the third party mileage engines being used

  • Configure and install the Mileage Server Windows service

  • Configure the ETA (estimated time of arrival) defaults

  • Configure the Mileage Server logging and log file locations

  • Verify the Mileage Server services are running

  • Perform a connection test to verify TruckMate is receiving data from third party software

Configuring third party mileage engine services

Configure TruckMate with respect to the specific mileage engine(s) being used for mileage calculations

Advanced Mileage Server Manager Setup

  • Configuring the Mileage Server for multi-company

  • Setting up multiple Mileage Servers

  • Setting up the Mileage Server to start automatically

Validating zones

  • Validate the zones using the Zone Validation Utility

  • Validate individual zones using the Codes Maintenance > Zones window

Configuring Mileage Profiles

  • Create and configure the Mileage Profile(s) used for drivers, clients, vendors and fuel tax reporting

  • Assign a Mileage Profile to each Driver Profile.

  • Assign a Mileage Profile to each Customer and Vendor Profile.

Setting up Application Configurator for Mileage Server Manager

The following Application Configurator options are listed under Configuration Options > MILESERV.EXE.

Option Description

Auto Purge OK Records

Determines if Mileserver Job records are purged automatically.

  • True
    The Mileage Server application will automatically purge (delete) all Mileserver Job records as soon as they enter OK status.

  • False (default)
    The Mileage Server application will not automatically purge any Mileserver Job records.

You can also toggle Automatic Purging On / Off using the 'Purge Jobs with OK Status' checkbox found in the Tools menu > Job Purge window.

Borders open/closed

Sets the border state prior to any batch fuel tax trip creation for mileage providers supporting this feature. (This setting does not apply to TruETA.)

  • Open (default)
    Mileage calculations will allow routing into another country if mileage might be saved.

  • _Closed
    Mileage calculations will not route through a different country in order to save on mileage.

Note: If the third party mileage engine has a similar configuration parameter, ensure it agrees with the TruckMate setting. For example PC*Miler has a setting for International Borders open/closed.

CalcMilesBothWays

Determines whether to calculate based on direction of travel.

  • True
    Calculates Miles in both directions, which often results in different mileage results based on outgoing or incoming status.

  • False (default)

CalcTripETAs

Allows you to disable the automatic calculation of Trip ETAs in the Dispatch program. Options are:

  • True
    Calculates Trip ETAs.

  • False (default)

Call SAVE_TLORDER for User

This string config (blank by default) can be set to any user name. After processing an UPDATEDLD job (generated when entering Freight Bills to update the 'DISTANCE' field), the TLORDER.CREATED_BY field on the record will be checked to see if it’s equal to the app config value. If the user names are the same, the SAVE_TLORDER stored procedure will be called. If the value is set at 'ALL USERS' then SAVE_TLORDER will always be called following an UPDATEDLD job from the Mileage Server. If the app config is blank (default) this functionality is turned off.

This functionality is provided for better automation between Mileage Server and automated Freight Bill creation. It is not intended for use with normal users. For example, use with EDI, which automatically creates Freight Bills with a user name of 'EDICOMMGR'. This is provided so a user does not have to go into Customer Service and edit and save the Freight Bill in order for mileage to populate (as well as any rating functionality that is based on mileage).

ClientTimeOut

This option will set the number of seconds required- without a response- before the Interactive Mileage Request Response will stop functioning. Default is set at '40' seconds.

Content Tools Address Synchronization

Determines whether you want to synchronize the addresses with the Trimble Maps Content Tools Places API in addition to using the Trimble Maps tool for the address search functions. Having two separate app. configs. means you can use it for searching only and opt. out of the address synchronization.

  • True
    TruckMate will synchronize the address information using the Trimble Maps Content Tools information as the correct data. Address synchronization requires that the 'Content Tools Address Synchronization' AND the 'Use Content Tools' app configs are both set to True.

  • False (default)
    Default

Note: The Customer Profile and Batch Geocoding utilities (for Lat/Long updates), will check to verify both of the 'Use Content Tools' and 'Content Tools Address Synchronization' options. Both need to be True in order to do address synchronization within these two utility programs.

CustomUpdateLegsum

Determines if the sp_CUSTOM_UPDATE_LEGSUM stored procedure is called automatically.

  • True
    Calls the Stored Procedure sp_CUSTOM_UPDATE_LEGSUM after the Legsum table is updated by the Mileage Server.

  • False (default)
    Default of False should not be changed unless you have been given custom code.

Delivery Confirmation

Works in conjunction with the Mileage Server program—​Delivery Confirmation, where you can select the Delivery Confirmation option and enter your particulars in the fields provided.

  • True
    Enable a delivery confirmation e-mail to be sent each time a delivery occurs for particular clients.

  • False (default)

Frequency to fix up resources

Removed as of TruckMate 2023.3

Indicates the frequency in minutes to fix and free up any stuck resources from Dispatch, Crossdock, Multi Mode Dispatch, etc.

Must be a whole number greater than or equal to 1.

Highway Directions

Determines whether Highway directions are calculated for each leg.

  • True
    Calculates Highway directions for each leg. When MILESERVER_JOB records are inserted for leg updates, it will automatically attempt to get highway directions from the mileage program, and insert them into the LEG_HWY_DIRECTIONS table.

  • False (default)

Host for ETA

Indicate and manage which Mileserve mileage server should be used to process ETA (i.e., GENETA) jobs. Only one server can be specified.

Enter the host name (or host IP address) of the server that will be taking the eta jobs into the text field.

Leave the field blank to use the MILESERV.EXE > Hosts app. config. settings.

Hosts

Sets the host and port for every available mileserver. Separate each host with a semicolon.

Allows the user to point TruckMate to multiple mileage server machines for use by the Mileage Server program. The administrator should enter the machine name (or IP address) of the mileage server and the port that the mileage service is operating on (default is 'mileservice' or '6239'). Multiple mileage servers are entered with semi-colons between them, For example:

localhost:mileservice;othermachine:6239;thirdmachine:mileservice

The above value for the 'Hosts' config designates three mileage servers, each running off of the 6239/mileservice port. Once this config is saved and the user opens the Mileage Profile window, they will see only the available mileage services that are running on those three machines appear in the 'Available Services' section of the form. The user can then define their 'Profile Name' entries and configure them to use the specific services.

Ignore address Line 2

Do not use address line 2 information in mileage calculations.

* True
The second address line is ignored.

* False (Default)
The second address line is included and used in mileage calculations.

Ignore requests for same zones

Only applies to Carrier Vendor with a mileage profile that lists DMILE prior to a third party mileage service provider.

  • True (Default)
    If there is a DMILE entry, it will be used.

  • False

Note: If set to True and a DMILE profile request for a same zone is processed, and an entry is not found, a result of 0 miles is set as a default.
For example, a multi-leg trip with legs A/B, B/C will return zero for the B to B leg.

Job Latency

Sets the number of seconds to wait before MileServer will process a job. Enter an integer value. Default is set at 30 seconds.

LogLines

Sets the maximum number of Log messages that will be displayed to the screen at one time. Default value is set at 6, but you may change this to any other integer.

LOCHIST to Address

This config option is used by the trigger 'LOCHIST_TOADDRESS'. When set to 'True', after an insert it creates an MSJOB record called LOCHIST. The Mileage Server program then takes this job, gets the Latitudinal position (POSLAT) and longitudinal position (POSLONG) for the LOCHIST record and does a PC*Miler (no other vendor) reverse address lookup. It then places the found address (if it was actually found) in the LOCHIST record’s comment as "r;Address, City, Prov". Default is set at 'False'.

  • True

  • False (default)

Note: Be careful when using this option in a system that has many trucks, for this feature might overtax the Mileage Server program, causing system slowdown.

Mileage Split

  • True
    Store Canadian miles and US miles separately for each leg in addition to the total distance.

  • False (default) Store only the total distance.

PC Option Purchased

If you are using PCMiler’s Postal / Zip code add-on software, set this value to True to indicate that your zone codes are based on zip / postal codes

  • True
    Zone codes will be based on zip / postal codes.

  • False (default)

This "PC Option Purchased" app. config. must be True if you are using the Alt-Z - Auto Zone Creation feature (i.e., the app. config for CSERV.EXE > Auto Zone Creation = True), and you are adding a zone from a freight bill that has a postal code in order for the new Zone to be created based on the freight bill’s zip/postal information or the City, and State or Province information.

Example:

  • When there is no Postal Code in the FB, it created a BCKEREMEOS zone code, with short description KEREMEOS, BC.

  • When there is a valid V0X 1N0 postal code in the FB, it created V0X 1N0 zone code, with short description KEREMEOS, BC.

PC*MILER Web Services API Key

API key to use when connection to the Trimble Maps Content Tools service. Enter the 32 character key provided by Trimble Maps (formerly ALK Maps).

RouteSynch Compliance

Specifies how strict the route should be generated.

  • 0 - Strict: Try to navigate back to the original route at all costs, even if it means the driver needs to turn around and drive back to rejoin the prescribed route.

  • 1 - Moderate: (Default) Try to navigate back to the original route but will take into account the driver’s current position in relation to the destination; i.e. try to rejoin the prescribed route as it navigates towards the destination, but along a route that is more reasonable than what the Strict compliance level would follow.

  • 2 - Minimal: At this level, the original prescribed route is not taken into consideration. The route taken may still rejoin the original route, but its first objective is to go to the destination from the driver’s current position.

RouteSynch Distance

Specifies distance in miles a diver my travel out of route. Requires a number between 1 and 300. Default is 0.2.

SchedulerETAupdates

Specifies the number of hours between recalculations for the ETAs (0 for Never).

Set FerryMiles Included in Mileage Report

Override the PC*Miler (pcmserve.ini > FerryMiles=) option setting with this TruckMate application configuration value.

  • Do not override (default) Use the PC*Miler pcmserve.ini setting.

  • False
    Ferry miles will not be used by PC*Miler when updating the Canadian/US leg distance values in legsum.

  • True
    Ferry miles will be included in PCMiler’s calculation and we will include them if they exist in the Canadian/US leg distance.

Store Trip Mileage

When True, and the Mileage Server program processes an 'UPDATELEG' command, the following SQL statement will be run (with the appropriate values):

UPDATE TRIP SET DISTANCE_LOADED = ___
DISTANCE_EMPTY = ___
WHERE TRIP_NUMBER = ___

During normal operation of the Mileage Server program, the LEGSUM Table is updated but the TRIP Table is left unmodified. With this turned on, the TRIP Table will be updated each time LEGSUM is updated.

Street Level

When set to True, Mileage Server Street Level support is enabled, which changes the way mileage is calculated against freight bills. When Street Level is turned on, the Mileage Server will no longer attempt to perform mileage lookups between street level addresses on Freight Bills themselves. Instead, it will perform mileage lookups between zones, like normal, and enable zones to be validated to a street level (i.e., use the zone’s own configured street level address). Positioning zones will use street level information as well.

A Zone Code’s address is entered into the various 'Address' fields in the Codes Maintenance program > Zone Tab > Location Info section. For more information on setting up street level mileage functionality in TruckMate, see the 'Setting up PC*Miler Streets for street level mileage calculations' topic.

Note:

  1. If street level information is not configured for the zone code used on a Freight Bill, the Mileage Server will fall back to using the standard mileage positioning logic (i.e. zip/postal code mileage calculations based on the zone code’s validated 'Lookup Code').

  2. When Street Level is enabled, the user can still manually override mileage.

  3. For PC*Miler users: To truly enable street level functionality, ensure that the 'Highway Directions' app. config. (above) is set to 'False'.

THRESHHOLD

This value sets the frequency in milliseconds with which the Mileage Server program checks the MILESERVER_JOB table to see if there are outstanding mileage lookups. The larger this number, the less frequently the table will be checked, and the longer it will take for mileage lookups to occur. However, decreasing this value will increase the load on your network and server, and can result in increased "deadlock" errors. These errors occur when a user attempts to update data at the same time that the Mileage Server is writing to the record. Default value is "2000" (2 seconds.)

Trimble Maps Platform API Key

API key for the TruckMate Map View program using Trimble Maps (formerly ALK Maps).

TruETA API Key

API key for the Trimble Maps TruETA service.

TruETA Notifications API Key

API key to use when checking TruETA notifications. Use key provided by Trimble Maps (formerly ALK Maps).

TruETA Out of Corridor Notifications URL

URL to be used when checking the TruETA out of corridor events. Use the URL provided by Trimble Maps (formerly ALK Maps).

TruETA Out of Route Notifications URL

URL to be used when checking the TruETA out of route events. Use the URL provided by Trimble Maps (formerly ALK Maps).

TruETA Update Position Interval (min)

Sets the interval in minutes for position updates. The last position update time is saved and TRUETA/TRIP jobs with row timestamps less than the update time are removed. Default is 15 minutes.

TruETA Username

Username/email account for the TruETA service.

Update LEG Planned Departure

Determines how TruckMate updates the Trip Leg Planned Departure value when processing leg ETA requests.

  • True (default)
    TruckMate updates the Trip Leg Planned Departure when processing leg ETA (GENETA) requests.

  • False
    Trip Leg Planned Departure will not be updated.

Use Content Tools

Enables Trimble Maps Content Tools functionality (Single Search for Address Auto-Complete), in the supported TruckMate modules.

  • True
    When you create a vendor or client profile, the address and the geo code are auto filled in using Trimble map data.

  • False (default)
    The address and the geo code information must be entered manually when creating a vendor or client profile.

Note: Requires a valid MILESERV.EXE > PC*MILER Web Services API Key to be entered into the Application Configuration option of the same name. (Prior to TM 19.4, this app. config. was called Content Tools API Key.)

Use Use Favors/Avoids

Enables the ability to use pre-set avoid/favor entries to force the PC*Miler Web Services to avoid some roads and favor others.

  • True
    Freight bill mileage values from shipper to consignee consider the pre-set avoid/favor sets when calculating the mileage.

  • False (default)
    The mileage server uses standard logic to determine mileage.

Note: Requires a valid MILESERV.EXE > PC*MILER Web Services API Key to be entered into the Application Configuration option of the same name. (Prior to TM 19.4, this app. config. was called Content Tools API Key.)

Setting up Security Configuration for Mileage Server Manager

The Enable Mileage option for Driver and Customer Profiles are available in the Security > Business Events > Misc. section of Security Configuration.

image3

When the Enable Mileage checkbox is selected for a user group or a specific user, the Tools > Mileage Profile menu option is enabled (For Customer and Driver Profiles) allowing you to open the Mileage Profile Maintenance window.

image4