Hello, I am calling an outbound integration from N...
# integrations
a
Hello, I am calling an outbound integration from NetSuite to a 3rd party system via https.post. I trigger the integration from a User Event script, afterSubmit. But it seems that the integration is running synchronous, meaning that the record saving is waiting for the integration call to return, and do its updates, before the record is again shown to the user. I want to trigger the integration logic (build the payload, call the other system, process the response, etc) async. What would be the right approach to make this call asynchronously? Should I call a Suitelet from the User Event script?
b
N/task Module to do the post in a scheduled or map/reduce script processor queue instead
a
thanks, that is an option
any other options?
if I call for example a Suitelet from the the User Event, would that also run synchronously?
b
im not sure why you think calling a different url would make it any more asynchronous
a
ok, so, the only option is then the N/task and schedule or map/reduce
great, thanks
sorry, how about using promise?
b
your code would be asynchronous, but would still wait for the promise to fulfill or reject
a
ok