UseCase: Here, we will feed a lookup name as input and then based on the lookup name we will fetch the Lookup csv file from a location using FTP protocol and then call lookup rest api to update the the respective lookup.
Rest API details to update lookup:
API : /ic/api/integration/v1/lookups/{name}
Verb : PUT
Request Json payload:
{"columns":["rightnow","soap"],"rows":[{"rowData":["RN1","SOAP1"]},{"rowData":["RN2","SOAP2"]}],"name":"myLookup"}
Prerequisites:
- You should have a FTP connection to read the csv.
- You should have a ICS rest connection.
Implementation steps:
Step1: We will feed lookup name.
URI: /update/{lookupName}
Step4: Provide the sample Json request payload.
►Here haedcoded, "Country_Code" and "Country_Name" to each Columns.
►For each lookup row map to rows and map the code and name fields to each rowData.
►Map template lookup name to name.
►Map input template lookup name to rest request template parameter name.
No comments:
Post a Comment