I have worked on a good number of ISV integration solutions, and every time, unit testing in the new instances means I must enter or update the required settings of the integrations. These entries can be very annoying and time-consuming. I also noticed that most integrations require pre-configurations or settings, like integration setup, customer class, Order Types, default values, default Numbering sequence, etc. Every time an ISV solution is implemented, there will be a good amount of manual effort involved in setting up the initial configurations.
So, I was wondering, is there any possibility to plug & play the ISV solutions by capturing the settings automatically, without any manual effort? as I was searching for the solution, I found an article on Site Configuration using Customization by Sergey Marenich, which explains how we can add (or change) packages configuration in Acumatica ERP right from the Customization Plugin. This article helped me to understand and work on my requirement.
The Custom Plug-In is a Separate Code File
What I have learned is that Customization Plug-In is a separate code file with a class that Acumatica can dynamically compile and load during publication.
Class events are automatically subscribed and executed on Database and or Files operations.
The two Class events are:
- OnPublished – here you can access the file system and do proper configuration prior to the application being restarted.
- UpdateDatabase – here you can have some operations that should be executed to ensure your own database update scripts.
Here is the sample code snippet (Sample project available in GitHub):
Below the class file is extracted from the sample project code from GitHub.
The Most Common Plugin Settings
Below are the most common settings I have used in the Integration Setup screen.
- Default Customer– This can be used in marketplace integration if the orders are of Fulfilment by marketplaces.
- Customer class– This can be defined if the integrations have a setting to select the customer class.
- Numbering sequence– Set the default numbering sequence, which can change later.
- Order Types– If the orders are to be identified separately, then a default value can be set in the setup screen, for example, for any marketplace integrations such as eBay, Amazon, Walmart, etc. A base Order type such as EB or WM can be created, and its value can be filled in the setup screens.
- Any default values for any setup screen.
The above settings can be created or updated as soon as the package is deployed into the instance with a UpdateDatabase event.
Note: We must be cautious with the updated data, and it should not impact any other parts of sensitive data.
Sample project is available in the GitHub, please follow https://github.com/vinayrajk/CustomizationPlugin.git
Hopefully, this article will give you a good understanding on the usage of customization plugin and to plug & play the ISV solutions with the default settings that comes with the package.