Customizing the Retail Transaction Service

Microsoft Dynamics AX 2012 for Retail came with a very powerful feature that I feel is a bit underrated: the possibility to customize the Retail Transaction Service.

The Retail Transaction Service is just a simple Windows Service that sends synchronous requests from the POS to the HQ .Net Business Connector for processing. After the AOS finishes the processing of the data, it returns some data back to the POS.

In Microsoft Dynamics AX 2012 for Retail there are two Classes for the customization: RetailTransactionService and RetailTransactionServiceEx.

The RetailTransactionService Class holds all the standard methods used by the POS like creating a new customer, updating an address or updating a transfer order. These methods represent the basic functionalities of the POS. Of course, if needed customization to these methods can be done.

The RetailTransactionServiceEx Class is there to add functionalities beyond the standard. Just add a new method to this class and you will be able to call this method from the POS. There are a few important notes to make about the methods:

  1. The methods have to be static.
  2. Pick simple parameters when calling the method like strings or integers. For structured data, use an XML.
  3. As return values use a container. Always have a flag to be able to check if the call was successful.

Use the Application.TransactionService.Invoke() method (with the X++ method name and parameters) from the POS side to invoke the newly written method.

Hope you enjoyed my post and in case you have a question don’t hesitate to leave a comment!

Posted in retail and tagged .

Leave a Reply

Your email address will not be published. Required fields are marked *