Hi, I’d like to call a Celigo integration flow fr...
# suitescript
s
Hi, I’d like to call a Celigo integration flow from Netsuite via the menu or a button. Does anyone know how to go about doing this or have some sample code? I’ve successfully called the flow from other applications and have the API setup but not too sure of the setup / syntax calling it from Netsuite. All help gratefully accepted!
m
Hi @Stewart Cruickshank, have you seen our API docs? You can run a flow from the API. There are other possibilities too. Please let me know if you want to dig into this, happy to discuss further. https://github.com/celigo/integrator-api-docs
s
Is it just a url to call? you can use https.post to call a url, passing optional credentials and post data in the body. You could then call this from a button function on a user event script
s
Hi @matt.graney @Sam L Thanks for the responses. @matt.graney - the issue isn't so much on the Celigo side, I've set up the API and the bearer key etc. @Sam L I wasn't sure whether I could call https.post from a user event script or whether I needed to use a UE to call a Restlet. If I can do it direct from a UE that would be more straightforward.
👍 1
BTW - good to connect again @Sam L!
s
You can make a https.post call - just need to wrap the button function in a require statement. Best to actually use https.post.promise so you can capture success/failure
s
👍 thanks