MarcomCentral (PTI) and FusionPro User Communities

MarcomCentral (PTI) and FusionPro User Communities (http://forums.pti.com/index.php)
-   FusionPro® VDP Creator (http://forums.pti.com/forumdisplay.php?f=5)
-   -   API calls (http://forums.pti.com/showthread.php?t=10459)

jhaughey October 28th, 2020 12:19 PM

API calls
 
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

Dan Korn October 29th, 2020 11:20 AM

Re: API calls
 
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.


All times are GMT -7. The time now is 03:26 AM.

Powered by vBulletin® Version 3.8.4
Copyright ©2000 - 2021, Jelsoft Enterprises Ltd.
(c) 2011, PTI Marketing Technologies™, Inc.