Tutorial V2.41 (Lightning)

  1. Home
  2. Docs
  3. Tutorial V2.41 (Lightning)
  4. 32. Different way how to invoke outbound interface

32. Different way how to invoke outbound interface

Why SKYVVA Callout Methods

The callout methods are using to send data from salesforce to external system (SFDC to SAP/SAP-PI) thru interface outbound. The Service only sends one record/children per request to SAP. To invoke callout from apex trigger the method invokeCallout(interfaceId, ids, ‘AUTO’) is recommended.


  • SYNC: Callout as synchronous the same method calloutSynch(…).
  • FUTURE: Callout as asynchronous the same method calloutFuture(…).
  • BATCH: Callout as apex batch execution the same method callout(…).
  • AUTO: Split records to callout as future and batch processing.  Recommend invoke from trigger with unexpected ids size, because the list id was split stall list of id then process callout.Example: If 150 records have updated then trigger invoke callout, Record will split to chunk of list-Id to callout:

    – 10 lists (10 record-ids/list) then execute by future.

    – Remaining 50 records executed by apex batch.

You will get real time response in SYNC  mode only.

SKYVVA Callout Methods

  1. webService static void calloutSynch(String interfaceId, LIST ids): In this method the id size must be 10.
  2. webService static String calloutFuture(String interfaceId, LIST ids): When this method  triggered,  an id size must be 10 and can be invoked this method 10 times from trigger. It will send 10 requests per future execution. If ids-size>10 you need to split the process.
  3. webService static void callout(String interfaceId, LIST ids):In this callout method, batch processing has done with unexpected id size. But it is not good if invoke from trigger, it can cause issue concurrent batch if apex batch executing is every slow.
  4. webService static String invokeCallout(String interfaceId, LIST ids, String mode)
  5. global CalloutResponse invokeCallout2(String integrationName, String interfaceName, String[] ids, String mode, CallOutControloutBoundControl)

Response could be text of JSON, XML, List of Map based on given flag parameters in CallOutControl and Apex of each adapter handle setting when execute callout.

CallOutControlFlagCalloutResponse (Attributes)SAPSAP-PISAP-R/3SFDC2SAPPISOAPREST
returnJSONCompletetrueString payloadJSONnonononoyesyes
returnXmltrueString payloadXMLnononoyesyesyes
returnListRecordtrueList<Map<String,String>> recordsyesyesyesyesyesyes
actionDoIntegratefalseDoes not process interface invoke call In/Out
actionDoMappingtrueDoes nothing
isCreateMessagefalseDoes not upsert message only in mode SYNC, Otherwise message will upsert.




Was this article helpful to you? Yes No

How can we help?