Javascript Libraries
Here is my simple JavaScript code -Now I want to leverage this in a mapping in ICS.
With version 17.1.3 (Early Update Enabled) we can import JavaScript libraries.
Here I import my .js file -
I specify that it will be used in Orchestrations - I also
specify the data types (String) of the input e.g. the ISO code IE and the
output - Ireland.
Now, use this in an Orchestration - for this I use the Callout activity.
Select the js function for use in the Callout -
Configure the input - I set it to the countryCode from my input.
Now, I just re-sequence the Callout, placing it before the Map for the RightNow createContact.
I now do the mapping for the RightNow createContact -
Note the availability of the Callout response in the Source panel.
I also map the country to the Title attribute in the RightNow contact.
I am doing this so that it is visible in the first screen
I map the response from RightNow -
Simple stuff!
I test -
https://myICS/integration/flowapi/rest/NC_JS_EXAMPLE_ORCH/v01/syncContact?firstName=Joe&surname=Cahill&countryCode=IE
I check in RightNow
No comments:
Post a Comment