Tuesday, October 20, 2015

#449 ICS - Using the REST adapter

Here is a simple scenario, I will use the ICS REST adapter to connect to a service on Sales Cloud.

Introduction


Here is the URL from Sales Cloud -

https://mySalesCloud:port/crmCommonApi/resources/latest/accounts?onlyData=true&fields=OrganizationName&orderBy=OrganizationName&limit=200&q=OrganizationName%20LIKE%20Ni*

Essentially, I want to select all sales accounts whose names begin with "Ni".

I test this request in Postman -

























As you can see, I get 11 hits.
I save the output to a file, for further use.

Create the REST adapter Connection in ICS














The REST URL is set https://mySalesCloud:port/crmCommonApi/resources/latest

I test the Connection -














Create the Integration

Here is the final result -









Configure Target (using above connection)






























Note: I add /accounts as the relative URI



I specify GET
I add parameters
I configure the response (I will use the file I saved, as the basis)

Here are the parameters - 
These are taken directly from the Sales Cloud REST URL.



I base the response on the output file I saved earlier.
In the creation wizard I selected response is JSON, based on a sample file.
I uploaded the output file and a schema is generated.


That's it.

Configure Source



Request Mapping


















Response Mapping




















Testing with SOAP-UI


I add my credentials and test -
























Now I amend the request as follows -

I add the request parameters -










I change the resource to /accounts and test -





















voilĂ 

No comments: