Integrating iDempiere with External Systems
The purpose of this page is to discuss topics related to external user and API communication. iDempiere might need to communicate in the following ways:
- Offer data to external users
- Capture data from external users
- Offer data to an external system
- Capture data from an external system
How you choose to interact with an external users or systems depends on the task to be accomplished. Below are some thoughts based on common questions.
Data Export
One of the easiest ways to integrate with an external system/user is simply to export data. Here are my thoughts:
- You can create a dedicated iDempiere view/window that exports data the way a system prefers. Example: Alerts.
- You can take this concept and make it much more feature rich by creating dedicated windows to create lists for export. For example: exporting contacts for email/text communication (Mail Chimp).
- Create a "Notification" window
- Create a "Notification Line" subtab
- Create a Notification window => Create Lines From form with parameters to select which users to include. You can run the Create Lines From process as many times as is needed to create the desired list. Because you keep records in a dedicated window, you can know who you have spoken with, how many times and for what reasons.
- Once you create the desired contact list, you can simply export it in a form that is appropriate for your communication tool (mail chimp, Amazon AWS SNS service, mailing, etc...)
- An alternative to exporting is to provide a process that communicates directly with the external service. If successful, the process will mark the header record as "Processed".
External User Access
Anyone can login to iDempiere if you (a) give them a role, (b) give them a password and (c) give them the URL. Here are points to creating a Role for outside users:
- Check the Role window => Manual checkbox.
- Only give them access to the * window (no actual orgs).
- Only give them access to the needed windows (not all).
- Almost all windows should be read only.
- If you need to collect data from external users,
- Create a window to act as a form to submit data.
- Update the Window, Tab and Field window => Tab subtab => SQL Where field to be "1=2". This way external users can create data; however, they cannot edit it or see it after created. You can create a second window to "see" submitted data.
Separate Servers
You do not want to expose your primary application server to the outside world. Here are my thoughts for multiple application servers:
- First, make sure you separate your application server from your database server. This page walks you through the process.
- Second, make sure you have a dedicated application servers for the respective tasks. Here are the configuration details.
- WebUI for internal users
- WebUI/WebServices for external users
- Services
- You will place the WebUI/WebServices application server in a DMZ to help isolate external users from your internal system. You can simple shut this server down in the case of a bad situation.
Separate but Almost Equal
You can create and expose a second instance of iDempiere based on your primary server's back. Here is a discussion about creating a reporting warehouse. The backup and restore process will execute from a schedule/cron script. As the backup is restored, run SQL to remove sensitive data if desired. You can even use this instance to capture external data. You just need to migrate the data to your primary instance before it is destroyed for the next restore.
Web Services
Here is a section on web services.
Database Access
Here are my thoughts on provide direct DB access to an external user/system:
- This option should only be used with trusted partners. I do not recommend opening your DB to just anyone.
- PostgreSQL is hardened enough to be able to provide secure role-based access.
- You will most likely create a dedicated DB user/role with limited read and no write abilities.
- The only information you provide will be via dedicated database views (example: tradingpartner_orderdetail_v). This is an important concept because if forces you to create a dedicated API (the view itself).
- If you are only sharing data, you can create a read replica DB instance to isolate external user/system load from your core ERP System.
Other References
More Options
Please be quick to ask about options not mentioned here. There is more to be discussed...