Small Parcel Shipping (SPS) – Dynamics 365

Table of Contents

The small parcel shipping (SPS) feature facilitates Microsoft Dynamics 365 Finance and Operation/Supply Chain to interact directly with shipping carriers (e.g. FedEx, DHL) through a dedicated rate engine. A Rate Engine interacts with the shipping carrier, provides a packed container having order details to the shipping carrier, and receives the tracking number, shipping label, and shipping rate. The respective response is added to the associated sales order.

Create a new transportation management engine

Create a solution for SPS handling which will comprise different types of projects as follows:

  • D365 Finance Operation: TMSThirdParty
    • Create a D365FO project with the name TMSThirdParty under the appropriate model in which it is to be deployed.

  • Dot Net Library: DHLCustomEngine
    • Create a Dot Library project and select an appropriate framework e.g. 4.6.

  • Add the following references to Finance and Operation assemblies that can be found where all the d365 assemblies are deployed. 
    • [Packagesroot]\ApplicationPlatform\bin\Dynamics.AX.ApplicationPlatform.dll
    • [Packagesroot]\ApplicationFoundation\bin\Dynamics.AX.ApplicationFoundation.dll
    • [Packages root]\ApplicationSuite\bin\Dynamics.AX.ApplicationSuite.dll
    • Microsoft.Dynamics.ApplicationPlatform.Environment.dll
    • Microsoft.Dynamics.AX.Data.Core.dll
    • Microsoft.Dynamics.AX.Framework.Linq.Data.AdoNet.dll
    • Microsoft.Dynamics.AX.Framework.Linq.Data.dll
    • Microsoft.Dynamics.AX.Framework.Linq.Data.Interface.dll
    • Microsoft.Dynamics.AX.Framework.Linq.Data.Msil.dll
    • Microsoft.Dynamics.AX.Server.Core.dll
    • Microsoft.Dynamics.AX.Xpp.AxShared.dll
    • Microsoft.Dynamics.AX.Xpp.Support.dll
    • [Packages root]\ApplicationSuite\bin\Microsoft.Dynamics.AX.Tms.dll
    • [Packages root]\ApplicationSuite\bin\Microsoft.Dynamics.AX.Tms.Base.dll

 

  • Add C# class with the DHLCustomEngine inherited from BaseRateEngine, implement the base class method and resolve the reference the required references. 
  • Rate method is an override Method that is responsible for taking input parameters from Finance and operation, crate DHL-TPL request and posts it TPL, in response will get Tracking No and Shipping Label.
  • Create TMS Transaction object set request and response object in TMSTrasaction table as below.

  • Add DHLCustomEngine library reference in TMSThirdParty and Build the solution.

How to Deploy

  • Deployment package
    • Select the appropriate Model ( TMSEngine ) and create a deployment package and select the path where the DLL libraries will be stored.  

Setup of TMS Engine in Finance and Operation

  • Rate Engine
    • Navigate to the Rate Engine page in Finance and Operation Management, create a new engine, and add the required information and assembly of the library project which has rate engine implementation.

How the Rate Engine will Trigger

  • There are different ways for triggering Rate Engine. We will create a container in finance and operation for triggering Rate Engine. 
  • Navigate to warehouse management and ? Packing and Containerization  ? Pack.
  •   Fill the required information.

  •   Add Shipment to the pack form and create a container, select container type.

  •  Select the necessary shipment and Close the Container.

  •  On Close of the Container the Rate Engine will be called, It will add the tracking number and shipping label in the transaction table. You can see the tracking id under the Manifest Id and print label from Print Menu.

Reference

https://learn.microsoft.com/en-us/dynamics365/supply-chain/warehousing/small-parcel-shipping

Related Post