Tutorials

  1. Home
  2. Dokumente
  3. Tutorials
  4. 67. How to use the operation query and transform the result set using the mapping tool?

67. How to use the operation query and transform the result set using the mapping tool?

Learning Objectives:-

This unit describes:-

  • What is Operation Query?
  • How to use it?

What is Operation Query?

Query means querying data from salesforce from a client by using Soap UI or postman and when we use postman we use rest version and for soap, we use search service API. Querying data is using SOQL statement, We can write SOQL by entering into the outbound interface or using the query editor and this way we can generate SOQL statements in our outbound interface.

It gives the response as a JSON to the client if we call using Soap UI or by the postman, we can put different conditions or requests. But the main reason or requirement is query data.

We have 2 possibilities for query operation:-

1. Query operation without mapping will give raw data as a result.

2. Query operation with mapping will give enhanced data as a result.

Operation Query with mapping is explained below:-

How does query works?

The procedure is given below:-

        Pre-Requisite :-

  1. Create Metadeta provider.
  2. Create Istructure Repository.
  3. Create Message type e.g AccountMT is the parent of ContactMT.
  4. Create Integration.

 

  • Create Outbound Interface then select Status is Deployed and Operation Type with Query (As shown in the picture given below):-

 

  • Add Metadata Provider, Istructure Repository, Message Type for interface(As shown in the picture given below):-

 

  • Do tree mapping field Salesforce object map with Message Type step by step with the level (As shown in the picture given below):-

  • Check the select statement Query editor as shown below:-

 

  • Navigate to Postman application.
  • Create a new request and a new folder.
  • Change method GET to POST and enter Salesforce classic URL with /services/apexrest/skyvvasolutions/SearchService (shown in the picture given in point 8).
  • Click Body tab => click raw tab => select JSON (application/json) in picklist => Create rest body
    The body is shown below in the picture.
{
"INTEGRATIONID" : "xxxxxxxxxxxx",
"INTERFACENAME" : "xxxxxxxxxxxx" 
}
  • Click Header tab => enter Authorization for Key cell => create Bearer with sessionId.
    (As shown in the picture given below).

 

  • Click Send button to get response data.
  • Here is the result of the responded JSON data.

 

Fandest du diesen Artikel hilfreich? Ja Nein

Wie können wir helfen?