Tutorials

  1. Home
  2. Docs
  3. Tutorials
  4. 55. What is the operation query and pullQuery and what is the difference?

55. What is the operation query and pullQuery and what is the difference?

Learning Objective:-

This unit describes about:-

  1. What is operation query and how it works?
  2. What is pullQuery and how it works?

1. What is Query?

Query means quering 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 . Quering data is using SOQL statement , We can write SOQL by entering into outbound interface or using query editor and this way we can generate SOQL statement in our outbound interface.

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

1.1 We have 2 possibilities of query operation:-

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

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

1.2 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.

 

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

 

2. Add Metadata Provider, Istructure Repository, Message Type for interface(As shown in the picture given below).

 

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

4. Navigate to Postman application.

5.Create new request and new folder.

6.Change method GET to POST and enter Salesforce classic URL with /services/apexrest/skyvvasolutions/SearchService  (shown in the picture given in point 8).

7.Click Body tab => click raw tab => select JSON (application/json) in picklist => Create rest body
Body is shown below in the picture.

{
"INTEGRATIONID" : "xxxxxxxxxxxx",
"INTERFACENAME" : "xxxxxxxxxxxx" 
}

8. Click Header tab => enter Authorization for Key cell => create Bearer with sessionId.
(As shown in picture given below).

9. Click Send button to get response data .

10. Here is the result of responded Json data.

2. What is pullQuery?

When we query a data we get a result and then next time we query again we get same result and it send to the client again. So the pullQuery is used in combination with a outbound interface and it is used within interface outbound scheduler, we have scheduler which can execute the outbound interface , select the data and send the data to the receiver. Here we use pullQuery operation like we don’t want to send save data again which is sent once already. So by this pullQuery operation we will send data only once . For this we need to create custom field on account salesforce object .

2.1 How does pullQuery works?

 

 

 

Was this article helpful to you? Yes No

How can we help?