Transportation Management Engines in AX
Transportation Management Engines in AX
Transportation Management Engines in AX
Transportation
The Transportation management system (TMS)
module includes a number of extension points that
let you implement custom algorithms to perform
management engines
tasks that are related to the rating of transport and
freight reconciliation.
White paper
Transportation management engines www.microsoft.com/dynamics/ax
White paper Send feedback.
Contents
Transportation management engines 3
Audience 3
Architectural background 3
TMS Engines 4
Rate engines 6
Mileage rate engine 8
Point to Point Mileage rate engine 9
Point to Point Contract rate engine 10
Point to Point by Weight rate engine 11
Less than truckload (LTL) rate engine 12
Less than truckload Freight of all kind rate engine 14
Piece rate engine 15
Postal Zone Weight rate engine 16
Rail rate engine 17
Zone engines 19
Postal Code Zone engine 19
State Zone engine 20
Transit time engines 21
Calculation Transit Time engine 21
Mile Breaks Transit Time engine 22
Point To Point Transit Time engine 22
Mileage engines 24
Point to Point Mileage engine 24
Generic engines 25
Generic Weight Apportionment engine 25
Generic Apportionment engine 25
Freight bill type 25
Conclusion 26
Additional resources 26
This white paper describes all of the engines that are available in Microsoft Dynamics AX 2012 R3. It is recommended to
also read the following white paper:
• Implementing and deploying transportation management engines
Audience
The audience of this document is implementation consultants and users who want to analyze the transportation
situation at a company and perform the setup that is required in order to use the TMS in Microsoft Dynamics AX 2012
R3.
Architectural background
The following illustration shows a simplified view of the transportation management system.
In TMS, several operations require some kind of data processing that is specific to a particular carrier, such as
transportation rate calculation. Typically, this kind of calculation requires a lot of input data, such as the origin and
delivery addresses, the size, weight, and number of packages, and the requested delivery date. For a rate shopping
operation, you can track this information from the Rate route workbench form. When you initiate a rate shopping
request, request XML is constructed in TMS by using one of the X++ classes that are derived from
TMSProcessXML_Base. The request XML is passed to the processing system that is encapsulated in the .NET assembly,
named Microsoft.Dynamics.Ax.TMS. Further processing involves instantiation and utilization of one or more
Transportation management engines. The final response from the TMS managed system consists of XML, which is
interpreted into a result that is persisted in the Microsoft Dynamics AX database.
All of the engines available in Microsoft Dynamics AX 2012 R3 rely only on data defined in the system. The engines are
implemented in C#, designed for plug-ability and customization. If you are relying on Microsoft Dynamics AX data, the
engines can reuse the generic engine data tables and no additional data model and UI is required. Engines that connect
to external systems are not included with AX 2012 R3. However, the engine-based extensibility model lets you build
extensions using Microsoft Dynamics AX Visual Studio Tools.
You need to initialize base engine data to create engine setup data for all the engines that are included with Microsoft
Dynamics AX 2012 R3. If you initialize the base engine data in this manner, data is initialized per company and existing
engine data that is set up in individual companies may be disregarded. The existing data will not be removed, but it
might create a conflict depending on your setup.
This will initialize all the base engines and rate base types included with Microsoft Dynamics AX 2012 R3.
To rate a shipment using a specific carrier, you must configure multiple transportation management engines. The Rate
engine is required, but other transportation management engines may be required to support the Rate engine. For
example, the Rate engine can require the Mileage engine to provide mileage for calculating the rate based on mileage
between the source and the destination.
Metadata for transportation management engines is configured differently for the different types of engines. The
following table explains the metadata configuration of each engine type.
Transportation
Metadata configuration
management engine
Rate engine Requires a Rate base type. The rate base type contains metadata for the rate base data and
the rate base assignment data. The structure of rate base metadata is determined by the
type of rate engine. The structure of the rate base assignment metadata is determined by
the type of rate base assigner that is associated with that rate engine (through the rate
engine parameters). You set up the rate base type of a rate engine on the Rate engine form
and the Rate master form.
Zone engine Requires metadata to be set up directly on the zone master.
Transit time engine and Retrieves the metadata directly from the mileage or transit time engine’s configuration
Mileage engine setup form.
There are several rate base types included in Microsoft Dynamics AX 2012 R3 that will be created after initializing base
engine data in the transportation management parameters. Each rate base type defines the structure of the user
created data that is supplied to the rate engine through rate masters. The rate master includes one or more rate base
assignments. Each rate base assignment refers to one or more rate bases. Rate engines, together with rate base
assigners, consume that data in order to select the applicable transportation rate.
To view the rate base types, go to Transportation management > Setup > General > Rate base type. Note that making
changes in the existing rate base types might cause the corresponding rate engines and rate base assigners to not work
properly.
The fields in the Rate engine form are explained in the following table.
Field Description
Rate engine The rate engine identification field.
Rate base type The rate base type, which defines the structure of data for the rate base assignment and
the rate base.
Name The user friendly name of the engine.
Engine assembly The name of the .NET assembly (dll) containing the engine definition. For all the engines
shipped with Microsoft Dynamics AX 2012 R3, the name of the assembly is
Microsoft.Dynamics.Ax.Tms.dll.
Engine type The fully-qualified name (including namespace) of the class that defines the engine within
the engine assembly.
Click the Parameters button to view the parameters for any specific engine. The fields in the Parameters form are
explained in the following table.
Break masters are another essential component needed for rate engines to work properly. A break master is used to
define the pricing structure and its breakpoints or intervals. The pricing structure uses tiered pricing that is based on
physical dimensions. The break masters are then used by rate bases to define rates for each of the breakpoints. Each of
the rate engines should have an appropriate break master associated with it. Some examples for break masters will be
given for each rate engine. Use caution when changing break masters. We do not recommend that you change the
fields for Comparison and Data type in any of the examples given. To set up break masters, go to Transportation
management > Setup > Rating > Break master.
The total rate can be adjusted if its value falls out of the range defined by the minimum/maximum charge specified on
the Rate base form.
To view the setup for the engine, go to Transportation management > Setup > Engines > Rate engine. The setup for
the mileage rate engine is shown in the following table.
Note that the engine is associated with Rate base type named Mileage. The rate base type specifies metadata of data
used by the rate engine, as well as metadata of data used by the rate base assigner that is associated with the rate
engine. For the Mileage Rate base type, the following assignment metadata is specified.
In the Rate engine form, to view the parameters for the rate engine, click the Parameters button. The parameters for the
mileage rate engine are shown in the following table.
The associated rate base assigner MileageRateBaseAssigner will find an applicable rate base assignment for specific
rating requests. This requires data of specific format, which shown in the rate base type in the previous screenshot, does
not include any specific fields.
The MileageEngineCode parameter value means that the rate engine will use the P2P mileage engine to retrieve
mileage when calculating the rate. Note that the mileage engine is responsible for calculating the actual mileage for the
transportation. The value of the parameter refers to the identification of the engine, as shown in the Mileage engine
form.
The break master associated with the mileage rate engine should define the mileage ranges for which different per mile
rates apply. An example showing miles as a break unit is shown in the following screenshot.
The total rate can be adjusted if its value falls out of the range defined by the minimum/maximum charge specified on
the Rate base form.
To view the setup for the engine, go to Transportation management > Setup > Engines > Rate engine. The setup for
the point to point mileage rate engine is shown in the following table.
Note that the engine is associated with Rate base type named P2P. The rate base type specifies metadata of data used
by the rate engine, as well as metadata of data used by the rate base assigner associated with the rate engine. For the
P2P rate base type, the following assignment metadata is specified.
In the Rate engine form, to view the parameters for the rate engine, click the Parameters button. The parameters for the
point to point mileage rate engine are shown in the following table.
The parameter value of MileageEngineCode means that it will use the P2P mileage engine to retrieve mileage when
calculating the rate. Note that it is the mileage engine that is responsible for calculating the actual mileage for the
transportation. The value of the parameter refers to the identification of the engine, as shown in the Mileage engine
form.
There is a generic apportionment engine by weight, AppWeight, associated through the ApportionmentEngine
parameter. The AppWeight engine apportions the freight charges based on weight. This is used when generating freight
bills.
The break master that is associated with the point to point mileage rate engine is not expected to have actual ranges,
only one detail record for the rate is expected, as is shown in the following screenshot.
The total rate can be adjusted if its value falls out of the range defined by the minimum/maximum charge specified on
the Rate base form.
To view the setup for the engine, go to Transportation management > Setup > Engines > Rate engine. The setup for
the point to point contract rate engine is shown in the following table.
Note that the engine is associated with Rate base type named P2P. The rate base type specifies metadata of data used
by the rate engine, as well as metadata of data used by the rate base assigner associated with the rate engine. For the
P2P Rate base type, the following assignment metadata is specified.
10
The associated rate base assigner P2PRateBaseAssigner will find an applicable rate base assignment for specific rating
requests. This requires data that is in a specific format, which shown in the rate base type in the previous screenshot,
includes pick-up city, state, postal code, and country.
It has the generic apportionment engine by weight, AppWeight, associated with it through the ApportionmentEngine
parameter. The AppWeight engine apportions the freight charges based on weight. This is used when generating freight
bills.
The break master associated with the point to point contract rate engine is not expected to have actual ranges, only
one detail record for the rate is expected, as is shown in the following screenshot.
The total rate can be adjusted if its value falls out of the range defined by the minimum/maximum charge specified on
the Rate base form.
To view the setup for the engine, go to Transportation management > Setup > Engines > Rate engine. The setup for
the mileage rate engine is shown in the following table.
11
Note that the engine is associated with Rate base type named P2P. The rate base type specifies metadata of data used
by the rate engine, as well as metadata of data used by the rate base assigner associated with the rate engine. For the
P2P Rate base type, the following assignment metadata is specified.
In the Rate engine form, to view the parameters for the rate engine, click the Parameters button. The parameters for the
point to point by weight rate engine are shown in the following table.
This engine has the generic apportionment engine by weight, AppWeight, associated with it through the
ApportionmentEngine parameter. The AppWeight engine apportions the freight charges based on weight. This is used
when generating freight bills.
The Divisor parameter is a fixed factor that can be used in accessorial charges for unit conversion. The parameter value
for divisor is left blank, as this is specified as an accessorial fee type created in the accessorial assignment form by going
to Transportation management > Setup > Rating > Accessorial assignment. If the divisor in the accessorial charge is not
specified, it will be 1 and have no effect on the calculation of the rate.
The break master associated with the point to point by weight rate engine should define weight ranges, for which
different rate per unit of weight will apply. An example of this is shown in the following screenshot. You can change
weight unit depending on your needs.
12
The total rate can be adjusted if its value falls out of the range defined by the minimum/maximum charge specified on
the Rate base form.
To view the setup for the engine, go to Transportation management > Setup > Engines > Rate engine. The setup for
the LTL rate engine is shown in the following table.
Note that the engine is associated with Rate base type named LTL. The rate base type specifies metadata of data used
by the rate engine, as well as metadata of data used by the rate base assigner associated with the rate engine. For the
LTL Rate base type, the following assignment metadata is specified.
In the Rate engine form, to view the parameters for the rate engine, click the Parameters button. The parameters for the
LTL rate engine are shown in the following table.
The associated rate base assigner LTLRateBaseAssigner will find applicable rate base assignment for specific rating
requests. This requires data of a specific format, which shown in the rate base type in the previous screenshot, includes
pick-up postal code and drop-off state, start postal code, end postal code, and country.
This engine has the generic apportionment engine by weight, AppWeight, associated with it through the
ApportionmentEngine parameter. The AppWeight engine apportions the freight based on weight. This is used when
generating freight bills.
The WeightApportionEngine parameter determines the generic weight apportionment engine that the AppShipWeight
associates with the rate engine. This generic weight apportionment engine should only be used by the LTL and LTLFAK
rate engine.
The break master associated with the less than truckload (LTL) rate engine should define weight ranges, for which
different rates per unit of weight will apply. An example of this is shown in the following screenshot. You can change
weight unit depending on your needs.
13
The less than truckload freight of all kind rate engine calculation is as follows:
𝑐𝑙𝑎𝑠𝑠𝑊𝑒𝑖𝑔ℎ𝑡
𝑇𝑜𝑡𝑎𝑙 𝑟𝑎𝑡𝑒 = ∑ 𝑟𝑎𝑡𝑒 × 𝑐𝑒𝑖𝑙𝑖𝑛𝑔 × (1 − 𝑑𝑖𝑠𝑐𝑜𝑢𝑛𝑡)
100
Where:
classWeight – The total weight of a particular LTL class in the shipment. If the LTL class is selected in the Rate route
workbench, the grouping of total shipment weight will be rated using the selected class.
Rate – Transportation price per unit of weight for a particular LTL class. For example, this can be defined to have specific
weight intervals where different prices apply. Different pricing can also be assigned depending on drop-off postal code
ranges.
Discount – Discount value expressed as a real value between 0 and 1. This value is recorded as the 3rd dimension on the
effective rate base assignment.
Sum – Rate calculation is executed separately for each of the LTL classes recorded in the shipment. After that, the total
price is summed up.
The total rate can be adjusted if its value falls out of the range defined by the minimum/maximum charge that is
specified on the Rate base form.
To view the setup for the engine, go to Transportation management > Setup > Engines > Rate engine. The setup for
the LTL freight of all kind rate engine is shown in the following table.
Note that the engine is associated with Rate base type named LTLFak. The rate base type specifies metadata of data
used by the rate engine, as well as metadata of data used by the rate base assigner associated with the rate engine. For
the LTLFak Rate base type, the following assignment metadata is specified.
In the Rate engine form, to view the parameters for the rate engine, click the Parameters button. The parameters for the
LTL freight of all kind rate engine are shown in the following table.
The associated rate base assigner LTLFakRateBaseAssigner will find an applicable rate base assignment for specific
rating requests. This requires data of a specific format, which shown in the rate base type in the previous screenshot,
includes pick-up postal code and drop-off state.
14
The WeightApportionEngine parameter determines the generic weight apportionment engine AppShipWeight that is
associated with the rate engine. This generic weight apportionment engine should only be used by the LTL and LTLFAK
rate engine.
The break master associated with the less than truckload freight of all kind (LTLFak) rate engine should define weight
ranges, for which different rate per unit of weight will apply. An example of this is shown in the following screenshot. You
can change weight unit depending on your needs.
The total rate can be adjusted if its value falls out of the range defined by the minimum/maximum charge that is
specified on the Rate base form.
To view the setup for the engine, go to Transportation management > Setup > Engines > Rate engine. The setup for
the piece rate engine is shown in the following table.
Note that the engine is associated with Rate base type named Piece. The rate base type specifies metadata of data used
by the rate engine, as well as metadata of data used by the rate base assigner associated with the rate engine. For the
Piece Rate base type, the following assignment metadata is specified.
In the Rate engine form, to view the parameters for the rate engine, click the Parameters button. The parameters for the
piece rate engine are shown in the following table.
15
The associated rate base assigner PieceRateBaseAssigner will find applicable rate base assignment for specific rating
requests. This requires data of a specific format, which shown in the rate base type in the previous screenshot, includes
pick-up postal code, drop-off postal code from, drop-off postal code to, and drop-off country.
This engine has the generic apportionment engine by weight, AppWeight, associated with it through the
ApportionmentEngine parameter. The AppWeight engine apportions the freight charges on route, segments, shipment,
container, or line based on weight. This used when generating freight bills.
The parameter PieceUnitOfMeasure specifies that quantity will be used as the unit of measure for determining the
number of freight pieces.
The break master associated with the piece rate engine should define ranges of number of freight pieces, for which
different rates per freight piece apply. An example of this setup, with pieces as break unit, is shown in the following
screenshot.
The total rate can be adjusted if its value falls out of the range defined by the minimum/maximum charge that is
specified on the Rate base form.
To view the setup for the engine, go to Transportation management > Setup > Engines > Rate engine. The setup for
the postal zone weight rate engine is shown in the following table.
Rate engine Rate base type Name Engine assembly Engine type
PostalZoneWeight PostalZoneWeight Postal Code Microsoft.Dynami Microsoft.Dynamics.Ax.Tms.Bll.PostalZo
Zone Engine cs.Ax.Tms.dll neWeightRateEngine
Note that the engine is associated with Rate base type named PostalZoneWeight. The rate base type specifies metadata
of data used by the rate engine, as well as metadata of data used by the rate base assigner associated with the rate
engine. For the PostalZoneWeight Rate base type, the following assignment metadata is specified.
16
The associated rate base assigner PostalZoneWeightRateBaseAssigner will find the applicable rate base assignment for
specific rating requests. It will require data of specific format, which shown in the rate base type in the previous
screenshot, does not include any specific fields.
This engine has the generic apportionment engine by weight, AppWeight, associated with it through the
ApportionmentEngine parameter. The AppWeight engine apportions the freight charges based on weight. This is used
when generating freight bills.
The parameters also specify that the engine has ZoneMasterCode set with Postal as a parameter value, which means
that the engine will need to utilize the postal zone engine in order to find the number of zones for the calculation of the
rate. It’s important to set up the postal zone master for all destinations that are to be used with this engine.
The break master associated with the postal zone weight rate engine should define weight ranges, for which different
rate per unit of weight will apply. An example of this is shown in the following screenshot. You can change weight unit
depending on your needs.
The total rate can be adjusted if its value falls out of the range defined by the minimum/maximum charge that is
specified on the Rate base form.
To view the setup for the engine, go to Transportation management > Setup > Engines > Rate engine. The setup for
the rail rate engine is shown in the following table.
17
Note that the engine is associated with Rate base type named VolumeSTCC. The rate base type specifies metadata of
data used by the rate engine, as well as metadata of data used by the rate base assigner associated with the rate
engine. For the VolumeSTCC Rate base type, the following assignment metadata is specified.
In the Rate engine form, to view the parameters for the rate engine, click the Parameters button. The parameters for the
rail rate engine are shown in the following table.
The associated rate base assigner RailRateBaseAssigner will find the applicable rate base assignment for specific rating
requests. It will require data of specific format, which shown in the rate base type in the previous screenshot, includes
pick-up postal code, drop-off postal code from, drop-off postal code to, and drop-off country.
It has the generic apportionment engine by weight, AppVolume, associated with it through the ApportionmentEngine
parameter. The AppVolume engine apportions the freight charges based on volume. This is used when generating
freight bills.
The break master associated with the rail rate engine should define volume ranges for which different rates will apply.
An example of this setup, with m3 as break unit, is shown in the following screenshot.
18
The fields in the Zone engine form are explained in the following table.
Field Description
Zone engine The zone engine identification field.
Name The user friendly name of the engine.
Engine assembly The name of the .NET assembly (dll) containing the engine definition. For all the engines
shipped with Microsoft Dynamics AX 2012 R3, the name of the assembly is
Microsoft.Dynamics.Ax.Tms.dll.
Engine type The fully-qualified name (including namespace) of the class that defines the engine within
the engine assembly.
You can click on the Parameters button to view the parameters for a specific engine. The fields in the Parameters form
are explained in the following table. None of the zone engines require any parameters.
Field Description
Parameter name The name of the parameter expected at the engine instance initialization.
Parameter value The value of the parameter.
To view the metadata set up for this zone engine, go to Transportation management > Setup > General > Zone master.
The Zone type for this zone engine is set to Rating, because this zone engine is used to interpret zones for rating
scenarios. An example would be to calculate how many zones it takes to get from point A to B.
An example of how the setup for the zone master for the postal code zone engine is shown in the following screenshot.
If you initialize base engine data in a new company, the details section will be empty and will need to be populated
before using the engine.
19
To view the metadata set up for this zone engine, go to Transportation management > Setup > General > Zone master.
The Zone type for this zone engine is set to Routing, because the zone engine is used for determining zones in routing
scenarios. An example would be determining hub accessorial charges and selecting applicable route guides that use
zones for applicability criteria.
An example of the zone master setup for this engine is shown in the following screenshot. If you initialize base engine
data in a new company, the details section will be empty and will need to be populated before using the engine.
To view the setup for the engine, go to Transportation management > Setup > Engines > Zone engine. The setup for
the state zone engine is shown in the following table.
20
The fields in the Transit time engine form are explained in the following table.
Field Description
Transit time engine The transit time engine identification field.
Name The user friendly name of the engine.
Engine assembly The name of the .NET assembly (dll) containing the engine definition. For all the engines
shipped with Microsoft Dynamics AX 2012 R3, the name of the assembly is
Microsoft.Dynamics.Ax.Tms.dll.
Engine type The fully-qualified name (including namespace) of the class that defines the engine within
the engine assembly.
The transit time engine is associated with a shipping carrier on the Rating profile form, which can be viewed in
Transportation management > Setup > Rating > Rating profile.
This engine calculates transit time in days, based on the data that is put in for the shipment in the Rate route
workbench. As shown in the example in the screenshot, a carrier service called STD is defined to handle 360 miles per
day. This means that the shipping carrier with the associated service STD will use this transit time calculation. The
shipping carrier will also need to be associated with the transit time engine in the rating profile. If you initialize base
engine data in a new company, the details section will be empty and will need to be populated before using the engine.
Using the setup in the previous screenshot, if you have a shipment with 450 miles, transit time calculation will be as
follows:
450
= 1.25 𝑑𝑎𝑦𝑠
360
21
Where:
Days – The predefined real number of days that transportation can take for a particular distance.
In the following screenshot, the example setup for this transit time engine shows that for shipments with a mileage
between 0 and 100, there will always be a transit time of 1 day, shipments with a mileage between 100 and 500 will have
a transit time of 2 days, and shipments with a mileage between 500 and 10000 will have a transit time of 5 days. If you
initialize base engine data in a new company, the details section will be empty and will need to be populated before
using the engine.
To view the setup for the engine, go to Transportation management > Setup > Engines > Transit time engine. The setup
for the mile breaks transit time engine is shown in the following table.
22
To view the setup for the engine, go to Transportation management > Setup > Engines > Transit time engine. The setup
for the point to point transit time engine is shown in the following table.
23
The fields in the Mileage time engine form are explained in the following table.
Field Description
Mileage engine The mileage engine identification field.
Name The user friendly name of the engine.
Engine assembly The name of the .NET assembly (dll) containing the engine definition. For all the engines
shipped with Microsoft Dynamics AX 2012 R3, the name of the assembly is
Microsoft.Dynamics.Ax.Tms.dll.
Engine type The fully-qualified name (including namespace) of the class that defines the engine within
the engine assembly.
Default If selected, this mileage engine will be used by default for retrieving mileage.
There is only one mileage engine provided with Microsoft Dynamics AX 2012 R3. In the following blog post, you can
learn how to set up a mileage engine that retrieves distance data from Bing Maps:
Transportation management mileage engine based on Bing maps.
To view the setup for the engine, go to Transportation management > Setup > Engines > Mileage engine. The setup for
the point to point mileage engine is shown in the following table.
In the following screenshot, an example using demo data for mileage is shown using predefined mileage for each origin
and destination. This means that for every shipment, in order to retrieve mileage, you need to have mileage set up
between the origin postal code and the destination postal code of the shipment. For example, with this setup, if you
have a shipment going from postal code 98401, with a destination postal code of 31001, it would show as 300 miles.
24
By volume:
By weight:
By quantity:
25
Additional resources
Use the following links to access blog posts and white papers on the subjects not covered in this document or resources
that provide supplemental guidance:
26