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.
Mode
- 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
- webService static void calloutSynch(String interfaceId, LIST ids): In this method the id size must be 10.
- 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.
- 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.
- webService static String invokeCallout(String interfaceId, LIST ids, String mode)
- 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.
CallOutControl | Flag | CalloutResponse (Attributes) | SAP | SAP-PI | SAP-R/3 | SFDC2SAPPI | SOAP | REST |
returnJSONComplete | true | String payloadJSON | no | no | no | no | yes | yes |
returnXml | true | String payloadXML | no | no | no | yes | yes | yes |
returnListRecord | true | List<Map<String,String>> records | yes | yes | yes | yes | yes | yes |
returnIMessages | true | no | no | no | no | no | no | no |
actionDoIntegrate | false | Does not process interface invoke call In/Out | ||||||
actionDoMapping | true | Does nothing | ||||||
isCreateMessage | false | Does not upsert message only in mode SYNC, Otherwise message will upsert. |