Introduction #
Previously, we created SearchService to allow users to call Skyvva Services by REST Api from their system. However, it only supports flat. We now provide two formats as a response: JSON and XML data for called request data from any external system by using SearchService Rest API.
The table below display the new keywords or parameter which we have added to support in patch version 2.42.5.
New Parameter |
Description |
RESPONSEPAYLOADFORMAT | This new parameter gives you an option to choose which format you want to use to Callout. |
SUPPRESSNULLVALUE | This new parameter is using to adds null value or remove from the response result. True= Response only the field which has value. False= Both field value, Null and Notnull, will respond. |
What is the SearchService API? #
The searchService API is working as the query method of the HTTP request. We have integration and interface configuration where we mapped object as per our requirements. So when we use SearchService API, we actually query the data we have mapped for our interface. So it will return the data of the object as per the mapping of the interface. We can use the REST API SearchService or the SOAP API.
Why we use this feature? #
We use this feature to call SKYVVA Services by REST API from an external system.
[su_box title=”Note” box_color=”#2a8af0″ title_color=”#000000″]In this document, we used postman application where Request payload means the body we have pass through postman and endpoint URL is the URL we have pasted on postman and in response we will get JSON data as parent and child by using searchService API.[/su_box]
#
- Create Integration.
- create Outbound Interface then select Status “Deployed” and Operation Type with Query
- write the SOQL query and save it.
- Do mapping field.
#
To use SearchService REST API, you have to do some configuration on PostMan (Any external system and this document use PostMan as an example). Follow the given step below:
- You have to navigate to PostName application
- Create a new request and a new folder
- Change method GET to POST and enter Salesforce URL with /services/apexrest/skyvvasolutions/SearchService
- click Body tab => click raw tab => select JSON (application/JSON) in picklist => Create rest body
Here is a body:
Click Header tab => enter Authorization for Key cell => create Bearer with sessionId
- Click Send button to get response data. This screenshot return null value.
This screenshot below response with value.
Click Send button to get response data. This screenshot return true value.
This screenshot below response with value.