jhaughey Posted October 28, 2020 Share Posted October 28, 2020 Is it possible to make API calls with javascript in the Fusion Pro rules editor? Specifically, we have a client who would like to enter data in English, and have it translated to other languages, including Asian character languages, for print. I'm thinking that if there is some way to call the Google translate API there may be a way to do it? Open to any other ideas as well. TIA Quote Link to comment Share on other sites More sharing options...
Dan Korn Posted October 29, 2020 Share Posted October 29, 2020 It depends on what kind of API it is. If the API you're calling can be accessed by a URL, then yes, you can make calls to it by simply building up the appropriate URL with query string and calling CreateResource() with it. If you search this forum for "maps" you'll find several examples, such as this one. This will work in FusionPro VDP Creator or Server, though you should craft your rule and your job to handle intermittent failures to access the website. If the API is something like a RESTful service or a .NET web service which requires XML to be posted, then you can't call that from a JavaScript rule. You would need to do that from your own custom application, and that custom app could then supply the results in a data file to FusionPro Server. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.