API Lookup inside workflow

  • 23 Views
  • Last Post 4 weeks ago
pauldtosco posted this 4 weeks ago

Hi,

I have a workflow that I currently run to lookup a client ABN captured in a document against a CSV file which returns the client name and ID as it is listed in our ERP. However, the client list is growing and I need to manually maintain the CSV file.

I have access to our ERP's REST API, and I would like to use it to perform a lookup of the captured ABN and use the lookup result in the workflow (as metadata). Looking through the forum, I see that this has been attempted via both Javascript and VBscript and neither are able to perform the job.

In those posts JS.NET is mentioned as an alternative, can you please give me more details about this and / or link me to some relevant resources if possible?

Thanks for your time

Order By: Standard | Newest | Votes
luca.scarpati posted this 4 weeks ago

Hi Paul,

 

your current use is the one that works for sure, but we understand your problem of updating the CSV each time with the new data that arrives from customer.

An alternative could also be that but you have to make sure that the process is not Asynchronous because otherwise you will never receive an answer (so I see it a bit difficult it can work in your case)

An alternative yes, it could also be the one you wrote above but you have to make sure that your steps/process is not Asynchronous because otherwise you will never receive an answer (so I see it a bit difficult it can work in your case)...it is due to how our engine works and as it is written in this FAQ in our forum:

Can I use Threads in my JS code?

No, threading is not supported because Scanshare processing engine is a synchronous FIFO queue and async operations are not handled while the processing engine waits for the script execution to proceed to the next workflow step.

 

Just for info if you have specific problems with your script, maybe write to support. They will be able to suggest or explain your problem in detail and maybe suggest a correct way cool.

 

Best regards,

Luca

  • Liked by
  • pauldtosco
pauldtosco posted this 4 weeks ago

Thanks Luca, I'll check with support. Appreciate your response as always

  • Liked by
  • luca.scarpati
Close