The Integration of iDempiere and Wanda POS Documentation

By Ing. Tatioti Mbogning Raoul Under the direction of : Dr.-Ing Stanley A. Mungwe Sponsored by IT Kamer Company Ltd, Cameroon Table of Contents

1 iDempiere’s Wanda POS Integration Plugin 5 1.1 Download the plugin ...... 5 1.2 Install the plugin ...... 5

2 Use the plugin 7 2.1 Wanda POS iDempiere’s Menu ...... 9 2.2 Setup ActiveMQ in iDempiere ...... 9 2.3 Start ActiveMQ Server ...... 11 2.4 Add Product in iDempiere ...... 13 2.5 Export Products and Customers from iDempiere ...... 15 2.6 Import Products and Customers to Wanda POS ...... 18 2.6.1 New Products ...... 21 2.6.2 New Customers ...... 23 2.7 Export Orders from Wanda POS ...... 23 2.7.1 Place Orders ...... 24 2.7.2 Orders Synchronization ...... 25 2.8 Import Orders to iDempiere ...... 26 2.8.1 Process Imported Orders ...... 28 2.9 Stop ActiveMQ Server ...... 29 2.10 Wanda POS Synchronisation Workflow ...... 30

3 Thanks 30

4 About Me 30

Copyright (c) 2014 IT-Kamer Company LTD1 Ing. Tatioti Mbogning Raoul List of Figures

1 Apache Felix Web Console ...... 5 2 Install or Update Wanda POS Plugin ...... 6 3 Wanda POS Plugin ...... 6 4 iDempiere login account ...... 7 5 iDempiere login account ...... 8 6 Wanda POS Synchronization Menu ...... 9 7 Start ActiveMQ Server from iDempiere ...... 11 8 ActiveMQ Web Admin ...... 12 9 Add Product in iDempiere ...... 13 10 Product Price List in iDempiere ...... 14 11 Product Price List in iDempiere ...... 14 12 Export Data to Queue Process ...... 15 13 Export Data to Queue Result ...... 16 14 New created Queues ...... 17 15 Maintainance Menu ...... 18 16 Wanda POS Properties ...... 19 17 Products and Customers Synchronization ...... 20 18 New Product(1) ...... 21 19 New Product(2) ...... 22 20 New Customers ...... 23 21 Place Order ...... 24 22 Orders Synchronization ...... 25 23 Import Orders Process in iDempiere(1) ...... 26 24 Import Orders Process in iDempiere(2) ...... 27 25 Import Orders Process in iDempiere(2) ...... 28 26 Turn ActiveMQ OFF ...... 29 27 Synchronization Workflow ...... 30

Copyright (c) 2014 IT-Kamer Company LTD2 Ing. Tatioti Mbogning Raoul List of Tables

1 Wanda POS Synchronisation Menu Description ...... 9 2 Export Data to Queue - Fields Description ...... 15 3 Import Orders from Queue - Fields Description ...... 26

Copyright (c) 2014 IT-Kamer Company LTD3 Ing. Tatioti Mbogning Raoul This document is free. You can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.

Copyright (c) 2014 IT-Kamer Company LTD4 Ing. Tatioti Mbogning Raoul 1 iDempiere’s Wanda POS Integration Plugin

1.1 Download the plugin

To download the plugin go at this address : http://sourceforge.net/projects/wandaposdapos/ files/iDempiere/cm.itkamer.wandapos-integration_1.0.1.jar/download

1.2 Install the plugin

After download the plugin, run your iDempiere Server. After that open your browser and the fol- lowing url : http://localhost:8080/osgi/system/console/bundles.

Replace localhost:8080 with your server name and port. The login is SuperUser and the pass- word you have set for the SuperUser. After login, you will have this screen :

Figure 1: Apache Felix Web Console

Click on the Install/Update button. Select the jar you have downloaded in the section 1.1. Configure your starting behaviour and click on Install or Update.

Copyright (c) 2014 IT-Kamer Company LTD5 Ing. Tatioti Mbogning Raoul Figure 2: Install or Update Wanda POS Plugin

Now go at the end of the page. You will see that the plugin has been installed.

Figure 3: Wanda POS Plugin

Copyright (c) 2014 IT-Kamer Company LTD6 Ing. Tatioti Mbogning Raoul 2 Use the plugin

Now the plugin in iDempiere is now ready to be used. Now open your browser and the following url : http://localhost:8080/webui.

Use the SuperUser account and provide the password you set for this user.

Figure 4: iDempiere login account

Copyright (c) 2014 IT-Kamer Company LTD7 Ing. Tatioti Mbogning Raoul After click on the OK button, set the Client to System, Role to System Administrator and also set your Organization and your Warehouse.

Figure 5: iDempiere login account

Copyright (c) 2014 IT-Kamer Company LTD8 Ing. Tatioti Mbogning Raoul 2.1 Wanda POS iDempiere’s Menu

When your are logged, click on the Menu button at the top of the page. You will have this screen :

Figure 6: Wanda POS Synchronization Menu

Items Description Guide to operate the Wanda POS Synchro- Wanda POS Synchronisation Workflow nisation. Export Products and Customers from iDem- Export Data to Queue piere to the ActiveMQ Server. Import Orders synchronized by all the Import Orders from Wanda POS Wanda POS Stations in iDempiere. Process Imported Orders Process Imported Orders in iDempiere. Turn ActiveMQ ON Start the ActiveMQ Server. Turn ActiveMQ OFF Stop the ActiveMQ Server.

Table 1: Wanda POS Synchronisation Menu Description

2.2 Setup ActiveMQ in iDempiere

Like you see in the previous section, the Wanda POS Synchronisation menu contain two elements named :

1. Turn ActiveMQ ON

2. Turn ActiveMQ OFF

These elements are two tasks which enable user to start an ActiveMQ server directly from iDem- piere. To be able to use this two tasks, you must first setup ActiveMQ in iDempiere. Follow these steps :

Copyright (c) 2014 IT-Kamer Company LTD9 Ing. Tatioti Mbogning Raoul 1. Download ActiveMQ We made some scripts to be able to start ActiveMQ from iDempiere. You can download a pre-configured ActiveMQ server in our .net repository. It already contains all the necessary scripts and all the others configurations we made in the original ActiveMQ Server downloaded from apache web site.

Download pre-configured ActiveMQ : http://sourceforge.net/projects/wandaposdapos/ files/iDempiere/ActiveMQ/pre-configured-activemq-5.7.zip/download Unzip the file in the directory %IDEMPIERE HOME% utils (%IDEMPIERE HOME% = The directory where you installed your iDempiere server). Note 1 : If you want to use your own ActiveMQ you have to :

1. Download this zip which contains all the scripts : Windows : http://sourceforge.net/projects/wandaposdapos/files/iDempiere/ ActiveMQ/idempiere-activemq-scripts-windows.zip/download

Linux : http://sourceforge.net/projects/wandaposdapos/files/iDempiere/ActiveMQ/ idempiere-activemq-scripts-.zip/download

After download these zip, unzip it in the directory named bin in your ActiveMQ. 2. Modify your ActiveMQ configuration Go where you unzipped your ActiveMQ server. Enter in the directory conf and open the file named activemq.xml. Look for these lines :

Change the value of the attribute createConnector to true. So when your ActiveMQ Server will start, it will create its own Connector insted of use the default JVM JMX connector (Ref : http://activemq.apache.org/jmx.html). This is very important if you want to be able to stop the ActiveMQ Server from iDempiere. Copy your ActiveMQ in the directory IDEMPIERE HOME/utils (IDEMPIERE HOME = The directory where you installed iDempiere).

Copyright (c) 2014 IT-Kamer Company LTD10 Ing. Tatioti Mbogning Raoul 2.3 Start ActiveMQ Server

After correctly setup your ActiveMQ Server, go back to the iDempiere’s webui. In the menu Wanda POS Synchronsation, click on the item Turn ActiveMQ ON. The ActiveMQ Server would start like this :

Figure 7: Start ActiveMQ Server from iDempiere

Copyright (c) 2014 IT-Kamer Company LTD11 Ing. Tatioti Mbogning Raoul After that open your browser and the following url : http://localhost:8161/admin/queue.jsp. Replace localhost:8161 with your server name and port. You will have a page which looks like the picture 2.3. Our ActiveMQ is empty.

Figure 8: ActiveMQ Web Admin

Copyright (c) 2014 IT-Kamer Company LTD12 Ing. Tatioti Mbogning Raoul 2.4 Add Product in iDempiere

We have added some product in iDempiere ERP. Like you see, the informations about the product are :

1. Name : Grass Seed Container

2. Product Category : Standard

3. Tax Category : Standard

Figure 9: Add Product in iDempiere

Copyright (c) 2014 IT-Kamer Company LTD13 Ing. Tatioti Mbogning Raoul We also added Price List for this product :

1. List price : 80.00

2. Standard Price : 75.00

3. Limit Price : 72.00

Figure 10: Product Price List in iDempiere

In the following screen we set the quantity on hand for this product.

Figure 11: Product Price List in iDempiere

Copyright (c) 2014 IT-Kamer Company LTD14 Ing. Tatioti Mbogning Raoul Note : This product is only for HQ organization. So when we will do synchronization with Wanda POS, this product will be synchronized only by the Wanda POS Station for which POS Locator Name is: HQ.

2.5 Export Products and Customers from iDempiere

In the iDempiere’s Wanda POS Synchronisation menu, click on the Export Data to Queue item. iDempiere will open this window process.

Figure 12: Export Data to Queue Process

Fields Description Host The host on which the ActiveMQ Server is listening (eg : localhost). Port The port on which the ActiveMQ Server is listening (eg : 61616). This is the queue name in ActiveMQ Server on which the process Products Queue Name will send products. Note : This value must be the same in Wanda POS’s wandapos.properties file. This is the queue name in ActiveMQ Server on which the process Customer Queue Name will send customers. Note : This value must be the same in Wanda POS’s wandapos.properties file. Username This is the username for the ActiveMQ Server (eg : admin). Password This is the password for the ActiveMQ Server. This is the product category for the products we want to synchro- Product Category nize (eg : Standard). This is the customer category for the customers we want to syn- Customer Category chronize (eg : Standard 2003). This is the price list for the products we want to synchronize (eg : Price List Standard 2003).

Table 2: Export Data to Queue - Fields Description

Copyright (c) 2014 IT-Kamer Company LTD15 Ing. Tatioti Mbogning Raoul Note : To be able to choose the products’s category, the customers’s category and price list, you must login in iDempiere with an account which has the right to access these informations.

Check the Self Service box and also the Erase Queue box if you want to erase the previous queue before the synchronisation. Click on the Start button. After the export is finished, the process will show you the export results.

Figure 13: Export Data to Queue Result

Copyright (c) 2014 IT-Kamer Company LTD16 Ing. Tatioti Mbogning Raoul Now go back to ActiveMQ web admin. You will see the new created queues.

Figure 14: New created Queues

Note : This process exports products for each POS Locator Name (Orgranization). So if we have 5 Wanda POS Stations and 20 products, 5 for each Wanda POS Station, this process will export products in 5 Queues in the ActiveMQ Server. The process will also export all the customers in the Customer category choosed in ActiveMQ’s Queues for all organization set in iDempiere ERP.

Like you see in the previous picture, customers have been synchronized for all organizations(Furniture, HQ, Fertilizer . . . ) set in iDempiere.

Note : There is only products for HQ Organization. So only the Wanda POS station which has pos = HQ in its wandapos.properties will be able to synchronize products in the queue : HQProducts.

The key used to identify each Wanda POS station is the POS Locator Name (pos key in wandapos.properties file). So when you synchronize informations, you have to be sure of that :

1. Customers and Products Queue Names must be the same in both Wanda POS and iDempiere ERP.

2. POS Name («entry key=”pos”»HQ«/entry» in wandapos.properties) must match one organization in iDempiere ERP.

Copyright (c) 2014 IT-Kamer Company LTD17 Ing. Tatioti Mbogning Raoul 2.6 Import Products and Customers to Wanda POS

After exported customers and products from iDempiere, lunch Wanda POS and go the menu Main- tainance.

Figure 15: Maintainance Menu

Copyright (c) 2014 IT-Kamer Company LTD18 Ing. Tatioti Mbogning Raoul Click on the Resources button. Scroll all resources in the left and look for the resource named: wandapos.properties. You have to modify this file to match queue names (Products and Customers) you seted when you exported from iDempiere.

Figure 16: Wanda POS Properties

Now go back to the maintenance menu and click the button : POS Synchronisation. After some few seconds, you will have a message from the database manager informing you that The data synchronization has been successful. You can click on the Info button display more informations about the numbers of products and customers which have been synchronized.

Copyright (c) 2014 IT-Kamer Company LTD19 Ing. Tatioti Mbogning Raoul Like you see, we have exported one product and four Customers from iDempiere ERP and after synchronization in Wanda POS we have exactly one product and four Customers imported in Wanda POS.

Figure 17: Products and Customers Synchronization

Copyright (c) 2014 IT-Kamer Company LTD20 Ing. Tatioti Mbogning Raoul 2.6.1 New Products

When we go to the Products menu, we have the product named Grass created in iDempiere which has been synchronized in Wanda POS.

Figure 18: New Product(1)

Copyright (c) 2014 IT-Kamer Company LTD21 Ing. Tatioti Mbogning Raoul When you go to the Sales menu, you see a new category named : Standard which has been created and contains only one product: Grass. Enjoy !!!!!!

Figure 19: New Product(2)

Copyright (c) 2014 IT-Kamer Company LTD22 Ing. Tatioti Mbogning Raoul 2.6.2 New Customers

When we go to the Customers menu, we have four customers created in iDempiere which have been synchronized in Wanda POS.

Figure 20: New Customers

2.7 Export Orders from Wanda POS

Now we are going to make some orders and we will synchronize this orders with iDempiere ERP always using ActiveMQ as a man in the middle for the integration of iDempiere ERP with Wanda POS. This is the second side of the integration : Synchronize orders from Wanda POS to iDempiere ERP.

Copyright (c) 2014 IT-Kamer Company LTD23 Ing. Tatioti Mbogning Raoul 2.7.1 Place Orders

Place orders in your Wanda POS and click on OK button.

Figure 21: Place Order

Copyright (c) 2014 IT-Kamer Company LTD24 Ing. Tatioti Mbogning Raoul 2.7.2 Orders Synchronization

After make one sale, go to the Maintenance menu. Click on the button : ERP Order Synchro- nization. After few seconds your order(s) will be synchronized. You can click on the Info button display more informations about the numbers of orders which have synchronized.

Figure 22: Orders Synchronization

Copyright (c) 2014 IT-Kamer Company LTD25 Ing. Tatioti Mbogning Raoul 2.8 Import Orders to iDempiere

Go back to iDempiere ERP in the Wanda POS Synchronisation menu and click on the process : Import Orders from POS.

Figure 23: Import Orders Process in iDempiere(1)

Fields Description Host The host on which the ActiveMQ Server is listening (eg : localhost). Port The port on which the ActiveMQ Server is listening (eg : 61616). This is the queue name in ActiveMQ Server on which the process Orders Queue Name will pick ordres. Note : This value must be the same in Wanda POS’s wandapos.properties file. Username This is the username for the ActiveMQ Server (eg : admin). Password This is the password for the ActiveMQ Server. Test the process. This will pick up queue from ActiveMQ without Test Queue removed messages inside it.

Table 3: Import Orders from Queue - Fields Description

Copyright (c) 2014 IT-Kamer Company LTD26 Ing. Tatioti Mbogning Raoul After set all the fields, click on the Start button. After few seconds you will have the Import Result.

Figure 24: Import Orders Process in iDempiere(2)

Copyright (c) 2014 IT-Kamer Company LTD27 Ing. Tatioti Mbogning Raoul 2.8.1 Process Imported Orders

Go back in the Wanda POS Synchronisation menu in iDempiere and click on the item named : Process Imprted Orders. Navigate through all orders in the window you will see the new imported order(s).

1. Product Key : Grass

2. Unit Price : 80

3. Order Quantity : 2

Figure 25: Import Orders Process in iDempiere(2)

Copyright (c) 2014 IT-Kamer Company LTD28 Ing. Tatioti Mbogning Raoul 2.9 Stop ActiveMQ Server

After completing the synchronization, you can turn off the ActiveMQ Server. To turn off the Ac- tiveMQ Server, go back in the Wanda POS Synchronisation menu. Click on the item : Turn ActiveMQ OFF.

Figure 26: Turn ActiveMQ OFF

Copyright (c) 2014 IT-Kamer Company LTD29 Ing. Tatioti Mbogning Raoul 2.10 Wanda POS Synchronisation Workflow

You can click on the workflow’s elements. This is simply a workflow about how to operate the synchronisation between Wanda POS and iDempiere.

Figure 27: Synchronization Workflow

Enjoy a very good integration between Wanda POS and iDempiere ERP.

3 Thanks

Thanks to Redhuan D. Oon for his original idea about integration with POS. Thanks to the original designers of Openbravo. They have made a very good rolling, maintainable and scalable code.

4 About Me

Ing. Tatioti Mbogning Raoul, Project Manager and Software Developper at IT-Kamer Company LTD. I obtained my certificate of engineer the 15th june 2014 in the National Advanced School of Polytechnic in Yaound´eCameroon. If you have any questions about me or about these works please send me an email at these ad- dresses : [email protected] or in gmail : [email protected]. You can also call me directly by phone : +(237)70 04 36 57.

You can also send an email to Dr.-Ing Stanley A. Mungwe the big manager of all these projects : [email protected]. Thank you very much for your attention.

Copyright (c) 2014 IT-Kamer Company LTD30 Ing. Tatioti Mbogning Raoul