Integrating Magento with other platforms is always a challenge. Likewise, integrating Navision with other platforms is always a challenge. Naturally, trying to tackle a Magento Navision Integration project will not disappoint, if you are looking for a challenge! It is possible, however, and in this article we’ll provide a brief overview of how we approach getting Magento and Navision to talk to each other with our own clients.
No, There’s Not A Plugin For That
Let’s get this out of the way. You cannot simply go to the Magento Market place and grab a plugin to connect Magento with Navision. This can be a frustrating truth, however, if you consider the customized nature of Navision – it’s not hard to understand why. No two Navision installations are alike, and rarely are two Magento installations alike. Given that level of customization, there would be no way to create a one-size solution to integrate the two platforms. Often you’ll see plugins available, but when you investigate, you’ll see these are typically a custom development service for sale.
Our Approach to the Magento Navision Integration Project
First – Conquer the Language Barrier
Magento and Navision operate on different platforms. One sits in a linux environment with a MySQL database, while the other sits in a Windows environment with a MS SQL database. The two platforms alway speak different languages. Magento 2 utilizes a REST API that is quite customizeable. Navision relies on a SOAP API that takes a slightly different approach. Because both platforms have different access methods, and reside on different servers, the most common sense approach was to develop a stand-alone piece that communicates with both.
Next – Configure Each Platform
Magento: In Magento 2, in order to communicate via the API you must create a user, then assign that user API priveleges. These can be highly customized to only the software areas needed for the integration. i.e. billing, inventory, etc.
Navision: Navision utilizes a set of services called ‘Web Services’. After the 2009 release, Nav allows access to web services via NTLM authentication. Once enabled and configured, Web Services will make XML data available through a web interface. A user can view XML structure documents as well as perform CRUD options via the SOAP API.
Then – Develop the Middleware
Our solution centers around a piece of custom software, we develop, that operates in between the two platforms. This ‘middleware’ is designed to read and write data to both platforms and perform whichever operations we choose. Since we primarily work with Magento, and our preferred platform is Linux, we prefer to build our middleware in a LAMP / LEMP environment. We use an OOP PHP framework, typically running on a Linux / Nginx / MySQL environment. The basic structure of our solution is this:
- Middleware queries Magento via the REST API. (generate an array of orders, customers, products, etc)
- Middleware parses through each record and writes / updates that data to the Navision platform.
Finally – Create A Schedule
Once your middleware piece is testing and performing as planned, the most simple method of automation is to create a scheduled server script. There are numerous ways to do this, and most developers have their own preference. In a nutshell though – decide how often your script needs to run, and how to control record volume to keep in line with memory / resource constraints, and set your schedule accordingly.
Gotchas & Other Considerations
While the overall concept is simple, actually creating a fine-tuned integration is rarely that simple. You’ll likely run into to issues with memory, Navision server performance, bandwidth limitations, and more. The PHP > Magento API connection is fairly efficient. However, the connection to Navision can vary widely, depending on the setup. Some Navision setups can handle non-stop processing of data through web services, while others need to have it metered out in small doses to keep from having locked tables and such. There are also quirks with Navision to contend with – such as the way you have to create an empty record first, and then update it with data. Make a 2-step process where you would think it only needed to be one. There are many more, but this is our basic approach and the main goal here is to get you off on the right path.
Much of our Magento Navision Integration success can be traced back to this article: Freddy’s Blog – Connecting to NAV We Services from PHP. This is not Magento specific, but goes into detail about the basic PHP to NAV connection, using NTLM services, and even links to an NTLM library you can use in your custom application.
Need Help with your Magento Navision Integration?
We (ITD Interactive) have built numerous eCommece solutions on the Magento Platform, and have successfully integrated many of them with the Navision Platform. If you would like to chat with us about your project, or if you are in the marketing for an eCommerce developer with experience in Navision Integration, we’d love to hear from you!.