Sunday, May 11, 2014

How Ship Carrier works in AX

Introduction

Microsoft Dynamics AX customers often use one or more shipping carriers to deliver their products to customers. Shipping software is available directly from these carriers, such as UPS and FedEx that can work with many carriers and centralize the shipping process. This software is used to calculate shipping rates, produce labels and tracking numbers, and generate additional reports and documents.
The shipping carrier interface feature allows Microsoft Dynamics AX customers to integrate with shipping software. The shipping software packages can pull information from Microsoft Dynamics AX, process packages, and then move their information into Microsoft Dynamics AX, eliminating manual entry and improving tracking visibility

Technical  Working

Step 1

The process begins with Packingslip functionality in AX. At this stage a request is generated by AX and saved in ShippCarreirShippingRequest table.

The following code inserts the request in ShipCarrierShippingRequest table.

Classes -> SalesPackingSlipJournalPost -> endPost -> line # 7


Step 2

At this stage third party shipping software is responsible for reading data from ShipCarrierShippingRequest table and inserting reply including Tracking numbers, Shipping Charges etc. into ShipCarrierStaging table.

Step 3

This stage is Invoicing stage where AX transforms the reply (data from ShipCarrierStaging table) return by the third party shipping software into miscellaneous charges.
The following code validates the reply for the request generated at the time of Packingslip.

Classes -> SalesInvoiceJournalCreate-> init -> line # 17


Once the response is verified, the response is the then transferred to the ShipCarrierTracking and ShipCarrierPackage table. If the response is not retrieved the following error is thrown at the time of validation. “Shipping charges have not been retrieved”

After successful validation the response is now converted into miscellaneous charges and reflected on sales invoice. Lastly the ShipCarrierStaging record is updated by setting its Transferred field to true.

Classes -> SalesInvoiceJournalCreate-> init -> line # 19


Classes -> SalesInvoiceJournalCreate-> retreiveShippingInfo-> line # 38 or 46


Classes -> SalesInvoiceJournalCreate-> createMiscCharge-> line # 26



ShipCarrierPackage function createMiscCharges is called for adding miscellaneous charges in sales order. These created miscellaneous charges are found in MarkupTrans table.

No comments:

Post a Comment