Hi all,
I've previously built an integration to our delivery routing software eLogii which works like so:
- Sales Order creation triggers a UE script that creates an "eLogii Queue" record.
- This record contains low level details such as the ID, context (create, edit, delete) and type of record that triggered it's creation so as to keep the processing time of the UE low and give the bulk of the work to the next MR script.
- The MR script then triggers every 15min, looking for all records that are "PENDING" and uses a number of SQL queries and functions to populate the eLogii Queue record with a JSON payload to be sent to eLogii.
- Once finished, the script sets the record status to "PROCESSED" and triggers a ScheduledScript
- Lastly the ScheduledScript queries all of the PROCESSED eLogii Queue records and makes an API call to eLogii with the JSON data, creating, editing and deleting new delivery tasks in eLogii for the drivers.
I'm now needing to build an even bigger integration to our new ecommerce webstore which will need to send updates to prices, items, customers, inventory and more every 15min at least. It will be uploading XML files to an SFTP server.
Does my above approach still sound like a good solution or do you have your own suggestions or preferences that you could tell me about?
My main concern is just trying to keep as much of the processing time in the backend of NetSuite (not on CL and UE scrips and workflows), which is why I think having the UE just to trigger the process is the best approach and then have MR/SS/SL and other script types do the leg work in the background.
One thing I'm not certain how to achieve is that I would prefer to only set updates when significant changes have happened.
For example, when updating a customer record, this will need to send a Customer XML file to the SFTP.
But only if the customers item pricing changes would I also need to send a Pricing XML file.
I think the only script type that can compare oldRecord vs newRecord data is a UE script, or at least certainly not an MR or SS and ontop of the item pricing sublist doesn't show in system information, so there's no way to compare system information to see if anything meaningful has changed in the item pricing to warrant sending an update.
I think it would be faster to just send both the Customer and the Pricing data than trying to load and compare the old and new record data in a UE. Would you agree?