Microsoft Dynamics AX 2012 customers often use one or more shipping carriers (UPS, FedEx etc.) to deliver the products to their customers. Shipping software is available directly from these carriers. 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 the shipping software. The shipping software packages can pull information from Microsoft Dynamics AX, process packages, and then move back the information like charges, tracking number etc. to Microsoft Dynamics AX, eliminating manual entry and improving tracking visibility.
Below we will see how the various application objects work together to complete the integration process
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
At this stage third party shipping software is responsible for reading data fromShipCarrierShippingRequest table and inserting reply including Tracking numbers, Shipping Charges etc. into ShipCarrierStaging table.
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 andShipCarrierPackage 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.