PC Miler

Prev Next

The integration with PC Miler provides routing and mileage information. The information returned from PC Miler is used to populate the Load Map component with tracking information.

Setup

Field Tracking

Track Driver progress along the route with tracking breadcrumbs. Each tracking location update in the Tracking Log component is displayed in the Load Map. To enable this feature, history tracking must be enabled for the following fields.

  • Last Reported City

  • Last Reported State/Province

  • Last Reported Country

  • Last Tracking Update Source

  • Last Tracking Update

  • Schedule Status

  • Load Status Comments

  • Driver Comments

The tracking breadcrumbs button on the Load Map component is available when the fields above have field tracking enabled.

Tracking breadcrumbs may be toggled on and off with the breadcrumb button on the Load Map control panel.

Enter Credentials

Enable the PC Miler integration by completing the following steps.

  1. Navigate to TMS Admin.

  2. Select Credentials

  3. Select the Global Services tab.

  4. Find PC Miler in the list and open the card. 

  5. Check the Enabled and Use Rest API boxes.

  6. Enter the User ID into the text field.

  7. Click the Save button when finished.

Valid credentials are required from a PC Miler subscription. An API key is the only required credential. See examples in the table below.

User ID

Password 1

Password 2

Customer Number

API Key


The PC Miler integration may use different types of API Key.

  • The Global API Key is only supported for versions 24 and newer.

  • The North American API Key is supported for all available Mileage API Versions.

Transportation Profile Fields

Set mileage and routing preferences for each customer on the Transportation Profile. The following fields control the routing and mileage that PC Miler returns for customer Loads.

  • Mileage API

    • Set the Mileage integration to use for each customer. Set to PC Miler.

  • Mileage API Borders

    • Set whether international border crossings are opened or closed. Set to Borders Closed or Borders Open.

  • Mileage API Highway Only

    • Check to use highways for routing and mileage.

  • Mileage API Override Restrictions

    • Check to override truck restrictions for specific sizes and weights for routing and mileage.

  • Mileage API Routing

    • Set preferred routing by Practical, Shortest, or Fastest. The default setting is Practical.

  • Mileage API Toll Roads

    • Set the preferred option for toll roads. Options include Always Avoid, Avoid if Possible, and Use.

  • Mileage API Version

    • Set the PC Miler version to use for routing and mileage. The default setting is Latest.

Transportation Profile field values are added to the Load during Load creation. Once the Load record is created, these fields may be changed on the Load Lightning Record Page.

  • Mileage API Borders

  • Mileage API Highway Only

  • Mileage API Override Restrictions

  • Mileage API Routing

  • Mileage API Toll Roads

Load Fields

The following fields may be set on a Load-by-Load basis to control the routing and mileage returned from PC Miler.

Add the Equipment Routing Restrictions and Hazmat Routing fields the Load field sets below to include them when creating new Loads. Additional fields may be changed on a Load by Load basis after the Load is created.

Only the Load Equipment Routing Restrictions and Hazmat Routing fields may be set when creating Loads on the Load Configuration component. Other field values are overwritten by the customer Transportation Profile values when the Load is created.

  • TMS1

  • TMS10

  • TMS11

  • TMS18

  • Equipment Routing Restrictions

    • Set the routing restrictions for the equipment type. Values include 53’ Trailer, National Network, and 53’ Trailer and National Network.

  • Hazmat Routing

    • Set the routing guidelines for the Load based on the type of Hazmat cargo. Options include General, Caustic, Explosives, Flammable, Inhalants, and Radioactive.

  • Mileage API Borders

    • Set whether international border crossings are opened or closed. Set to Borders Closed or Borders Open. The default setting is Borders Closed.

  • Mileage API Highway Only

    • Check to use highways for routing and mileage.

  • Mileage API Override Restrictions

    • Check to override truck restrictions for specific sizes and weights for routing and mileage.

  • Mileage API Routing

    • Set preferred routing by Practical, Shortest, or Fastest. The default setting is Practical.

  • Mileage API Toll Roads

    • Set the preferred option for toll roads. Options include Always Avoid, Avoid if Possible, and Use. The default setting is Use.

User Fields

Check the Show Route Options field on each User record to enable the routing options on the Load Map LWC. This field enables the Route Options button on the Load Map.

Trusted URLs Settings

Check that the Trusted URLs Settings for the PC Miler integration are enabled.

  1. Click the Setup gear icon in the top right corner.

  2. From the drop-down, click Setup.

  3. In the Quick Find Toolbar type Trusted URLs and click the link.

  4. If ALK is not listed as a trusted URL, click the New Trusted URL button.

  5.  Enter "ALK" in the API Name field and *.alk.com in the URL text box. 

  6. Click Save.

Remote Site Settings

Upgrading from previous versions of the TMS may have outdated information. Check that the Remote Site Settings for the PC Miler integration URL are up to date.

  1. Click the Setup gear icon in the top right corner.

  2. From the drop-down, click Setup.

  3. In the Quick Find Toolbar type Remote Site Settings and click the link.

  4. From the list of remote sites find PC Miler and click the Edit link.

  5. Update the Remote Site URL to match the Service URL below.

Service URL: https://pcmiler.alk.com

Test Service URL: https://pcmiler.alk.com

The PC Miler integration supports multiple stops for the same Account location.

LaneIQ

The PC Miler integration enables and populates the Miles, Total Miles, Distance, and Units columns in the LaneIQ Lane table. The Open/Close Border and Show List of Locations buttons are also visible.

If the integration is NOT enabled, the Miles, Total Miles, Distance, and Units columns in the LaneIQ Lane table are not displayed. The Open/Close Border and Show List of Locations buttons are also hidden.

Integration Calls

The following integration calls send information to and from PC Miler to provide map, addresses, geolocations, and routing and mileage information for Loads and Trip Plans.

Geocoding Batch

The PC Miler Geocoding Batch end point provides the latitude and longitude coordinates for a set of addresses.

Many TMS operations trigger the call to PC Miler to convert addresses into geolocations. Some examples of of TMS components and batch jobs that call the Geocoding Batch end point are provided below.

TMS Operation

PC Miler Endpoint

Request Type

Response

Various TMS components and batch processes

Geocoding Batch

POST

200: Success

400: Bad Request

Sample Geocoding Batch JSON Request Payload

{
  "Locations": [
    {
      "Address": {
        "StreetAddress": "1435 Fox St.",
        "City": "Denver",
        "State": "CO",
        "Zip": "80204",
        "Country": "US",
      },
    },
    {
      "Address": {
        "StreetAddress": "500 W Court St.",
        "City": "Kankakee",
        "State": "IL",
        "Zip": "60901",
        "Country": "US",
      },
    },
    {
      "Address": {
        "StreetAddress": "2900 166th St",
        "City": "Markham",
        "State": "IL",
        "Zip": "60428",
        "Country": "US",
      },
    }
  ]
}

Sample Geocoding Batch JSON Response Payload

{
    "Coords": {
      "Lat": "41.880643",
      "Lon": "-87.630541"
    },
    "Coords": {
      "Lat": "42.257250",
      "Lon": "-87.845999"
    },
    "Coords": {
      "Lat": "42.350665",
      "Lon": "-71.090392"
    },
}

No TMS Field Updates

See PC Miler Geocoding Batch documentation here.

Reverse Geocoding Batch

The PC Miler Reverse Geocoding Batch end point provides the ability to send a group of latitude/longitude coordinates and convert them to street addresses.

Several TMS components, batch processes, and integrations trigger the call to PC Miler to convert geolocations into address locations. Some examples of TMS operations that call the reverse geocoding batch end point are provided below.

TMS Operation

PC Miler Endpoint

Request Type

Response

Several TMS operations with examples above.

Reverse Geocoding Batch

POST

200: Success

400: Bad Request

Sample Reverse Geocoding Batch JSON Request Payload

{
    "request": {
        "Coords": [{
                "Lat": 39.958188,
                "Lon": -75.163244,
                "Region": 4,
            }, {
                "Lat": 40.957645,
                "Lon": -75.168672,
                "Region": 4,
                }, {
                "Lat": 40.99113,
                "Lon": -76.65801,
                "Region": 4,
                },
            },
        ],
    }
}

Sample Reverse Geocoding Batch JSON Response Payload

{
  "ReverseGeoBatchResult": [
    {
      "Address": {
        "StreetAddress": "2333 Waukegan Rd.",
        "City": "Bannockburn",
        "Zip": "60015",
        "StateAbbreviation": "IL",
        "CountryAbbreviation": "US"
      },
      "ConfidenceLevel": "Exact",
    },
    {
      "Address": {
        "StreetAddress": "2900 166th St",
        "City": "Markham",
        "Zip": "60428",
        "StateAbbreviation": "IL",
        "CountryAbbreviation": "US"
      },
      "ConfidenceLevel": "Exact",
    },
    {
      "Address": {
        "StreetAddress": "526 Beacon Street",
        "City": "Boston",
        "Zip": "02215",
        "StateAbbreviation": "MA",
        "CountryAbbreviation": "US"
      },
      "ConfidenceLevel": "Exact",
    }
  ]
}

The Confidence Level element returned from PC Miler for each geolocation must be either Good or Exact for the TMS to accept an address value.

No TMS Field Updates

See PC Miler Reverse Geocoding Batch documentation here.

Route Reports

The PC Miler Route Reports end point provides routing an mileage information based on two or more Stops.

TMS Operation

PC Miler Endpoint

Request Type

Response

Create Loads, Refresh button on Load Map component

Route Reports

POST

200: Success

400: Bad Request

Load and Transportation Profile field settings control the values sent to PC Miler for the following elements.

TMS Object

TMS Field

PC Miler Element

Load

Equipment Routing Restrictions

ClassOverrides

Load

Hazmat Routing

HazMatType

Load/Transportation Profile

Mileage API Borders

BordersOpen

Load/Transportation Profile

Mileage API Highway Only

HighwayOnly

Load/Transportation Profile

Mileage API Override Restrictions

OvrerideRestrict

Load/Transportation Profile

Mileage API Routing

RoutingType

Load/Transportation Profile

Mileage API Toll Roads

tollRoads (requires PC Miler version 34 or newer)

Route mileage returns in the TMiles element.

Sample Route Reports JSON Request Payload

{
  "ReportRoutes": [
    {
      "Stops": [
        {
          "Address": {
            "City": "Des Moines",
            "State": "IA",
            "Country": "US"
          }
        },
        {
          "Coords": {
            "Lat": "39.739173",
            "Lon": "-104.995650"
          }
        }
      ],
      "Options": {
        "RoutingType": 0,
        "HighwayOnly": true,
        "ClassOverrides": 1,
        "TollRoads": 3,
		"HazMatType": 1,
        "OverrideRestrict": false,
        "BordersOpen": false
      },
      "ReportTypes": [
        {
          "__type": "MileageReportType:http://pcmiler.alk.com/APIs/v1.0"
        }
      ]
    }
  ]
}

Sample Route Reports JSON Response Payload

[
  {
    "__type": "MileageReport:http://pcmiler.alk.com/APIs/v1.0",
    "ReportLines": [
      {
        "Stop": {
          "TimeZone": "CDT",
          "Address": {
            "StreetAddress": "",
            "City": "Des Moines",
            "State": "IA",
            "Zip": "50318",
            "County": "Polk",
            "Country": "United States",
            "SPLC": null,
            "CountryPostalFilter": 0,
            "AbbreviationFormat": 0,
            "StateName": "Iowa",
            "StateAbbreviation": "IA",
            "CountryAbbreviation": "US"
          },
          "Errors": [],
          "Coords": {
            "Lat": "41.600878",
            "Lon": "-93.600722"
          },
          "SpeedLimitInfo": null,
          "Region": 4,
          "ConfidenceLevel": "Good",
          "Label": "",
          "DistanceFromRoad": null,
          "PlaceName": "",
          "CrossStreet": null,
          "TimeZoneOffset": "GMT-5:00",
          "TimeZoneAbbreviation": "CDT",
          "IsDST": true
        },
        "LMiles": "0.000",
        "TMiles": "0.000",
        "LCostMile": "0.00",
        "TCostMile": "0.00",
        "LHours": "0:00",
        "THours": "0:00",
        "LTolls": "0.00",
        "TTolls": "0.00",
        "LEstghg": "0.0",
        "TEstghg": "0.0",
        "EtaEtd": null
      },
      {
        "Stop": {
          "TimeZone": "MDT",
          "Address": {
            "StreetAddress": "1435 North Fox Street",
            "City": "Denver",
            "State": "CO",
            "Zip": "80204",
            "County": "Denver",
            "Country": "United States",
            "SPLC": null,
            "CountryPostalFilter": 0,
            "AbbreviationFormat": 0,
            "StateName": "Colorado",
            "StateAbbreviation": "CO",
            "CountryAbbreviation": "US"
          },
          "Errors": [],
          "Coords": {
            "Lat": "39.739173",
            "Lon": "-104.995650"
          },
          "SpeedLimitInfo": null,
          "Region": 4,
          "ConfidenceLevel": "Good",
          "Label": "",
          "DistanceFromRoad": 0.019,
          "PlaceName": "",
          "CrossStreet": null,
          "TimeZoneOffset": "GMT-6:00",
          "TimeZoneAbbreviation": "MDT",
          "IsDST": true
        },
        "LMiles": "671.911",
        "TMiles": "671.911",
        "LCostMile": "1161.86",
        "TCostMile": "1161.86",
        "LHours": "11:24",
        "THours": "11:24",
        "LTolls": "0.00",
        "TTolls": "0.00",
        "LEstghg": "2233.1",
        "TEstghg": "2233.1",
        "EtaEtd": null
      }
    ],
    "RouteID": null,
    "TrafficDataUsed": false
  }
]

No TMS Field Updates

See PC Miler Route Reporting documentation here.

HazMat Routing Reference

TMS HazMat Value

PC Miler value

None

No value

General

1

Caustic

2

Explosives

3

Flammable

4

Inhalants

5

Radioactive

6