Good day everyone! Anybody have experiencing imple...
# general
v
Good day everyone! Anybody have experiencing implementing real time updates in NS? Manufacturing if possible. Have another service pushing data to NS. Currently pulling data via a scheduled script (every 30 min), but want real time updates. Any ideas? Thank you in advance for any help.
d
How much data? On which record(s)? You could use a User Event script to push a payload on each record submit
c
Building on what Daniel said. I would take it a step further, and create a scheduled script that the UE queues. That way the agent actioning the task doesn't have increased load times waiting for the request/response to finish.
d
Yes, this is the way! We use a record we call an "Integration Log" with a load of metadata and a queue system to launch scheduled scripts in order that handle either incoming or outgoing requests
v
But would this way give real-time data without firing the scheduled script?
d
The scheduled script is what sends the payload with the data. This runs on the submit event so it's on demand
c
It'll be as real-time as your environment/scheduler can happen. It will be quicker then a cron that runs every 30 minutes.
v
so it would a user event script + scheduled script?
d
That's right, but you will want to write the event to a record so you can re-queue and capture errors and responses easily too
c
That would be the recommendation. Otherwise the agent actioning the record update will end up waiting for the receiving service to process the request.
v
What about governance?
d
Scheduled scripts have lots of governance. Plus you will probably only be using a few lookups per event so shouldn't be an issue
c
Since each record spawns a new scheduled script instance you really shouldn't hit it. We use to import 300+ orders per batch in one and never hit the limit.
v
I am sorry for the confusion. I don't see how still using a scheduled script will give me real time data updates.
d
Scheduled script is a bit of a misnomer, it's not scheduled in the sense that it runs every X minutes. It runs on demand when the User Event queues it
c
Can you expand more on what the problem you're trying to solve is?
d
The UE will run each time your record is saved, launching the Scheduled script, which will upload your payload on demand
v
So we have a manufacturing service we have a connection (API) with. It sends updates when items are in diferent stages of manufacturing and creates different work order. They want the work orders completion as close to real time as possible.
d
So yeah, the above solution is best for what you're asking for
v
so when they pull up the table and save the table we will use the UE to fire the scheduled script?
d
Correct
c
Table? This would be on your work order completion save event
v
Is there anyway of getting updates to be delivered outside to a portlet?
real-time
d
That depends on where your portlet is getting its data? Isn't it getting data from NS?
v
the data comes into a custom record from the manafacturing 3rd party
c
Just fire off a SuiteQL query to display the latest updated records? Not sure what their data structure is / if they give you something that logs what you're after.
v
where can I see what data they are sending? I did not set this up.
c
Contact the vendor? Look at the custom record? You're going to have to dig through their data to see if what you're trying to achieve is possible.
v
OK I will look into the custom record they are using.
Thank you for your help.
Warning you....I may need some more guidance the more I find out. 🙂
c
You're welcome. I'll be around if you need additional help.
🙏 1
@VS You might be interested in this if you can get it working on your environment (based on a message in #sdf it might not be fully available yet). https://netsuiteprofessionals.slack.com/archives/C29HQS63G/p1787326849283709 Event subscribers would eliminate your need for a UE/SS to achieve the same functionality. Instead you would subscribe to your desired transactions and push everything in the background.
🙏 1