SK SKYVVA Documentation

3. Org.2-Org. Adapter

Rest adapter is used to call out data from SKYVVA – Salesforce to other SKYVVA Salesforce instance.

The creation of an app

To be able to call out the data from an instance to another instance, you need to create an app in order to connect.  This part of the tutorial will be explained the example of two instances A&B. The following steps will show you how to create an app in instance B:

[su_box title="Note" box_color="#2a8af0" title_color="#000000"]Copy your Consumer Key in notepad. Then click to reveal Consumer Secret and copy to notepad.[/su_box]

System Administrator Profile is now Associate with Apps.

The creating of REST Adapter

You have to login access to Instant A in order to create the Adapter for connection to Instance B. To create REST Adapter, there are steps you must follow:

For Property requirement: 1. username

2. Password

3. OAuth_20_Flow

4. OAuth 2.0 client-id

5. OAuth_2.0_client-Secret

6. REST_Token_Endpoint_URL

7. REST_API_Service_Endpoint_URL

8. REST_Authentication_Type

9. REST_Operation

10. TargetIntegrationId

11. targetInterfaceName

12. REST_Media_Type

13. Max_Request_Timeout

[su_box title="Note" box_color="#2a8af0" title_color="#000000"]You might not find this parameter property in the property picklist. So if you can't find it you can add this parameter value by navigating to Setup => Object Manager=> Select Property => Field & Relationships=> click on Name field=> Scroll down to Value section then try to find the "Max_Request_Timeout" if you can't find it please select on "New" button on the top of Value section. Add the picklist value in the box then click Save.[/su_box]

After Save, you will see the value picklist at the bottom.

Just navigate to Adapter then select the existing REST Adapter and click on "New Property" => Select Add New=> Select the property picklist " Max_Request_Timeout" and complete the value with "120".

Configure the Integration and Outbound Interface, for Instance, A side

Create an Outbound Interface and input REST Adapter, choose Asynchronous for Processing Mode. Select fields from sObject for Query and do the mapping.

The configuring of invoking callout using Auto mode

To do invoke callout, the user can follow the steps below:

[aux_code language="javascript" theme="tomorrow" title="" extra_classes=""] List ids=new List(); for(Account a: [select id from Account limit 10]){ ids.add(a.Id); } skyvvasolutions.IServices.invokeCallout('interfaceID', ids, 'BATCH'); [/aux_code]

Open this article in the interactive viewer →