3. Invoke callout2()
1. Overview
invokeCallout2() is an extended outbound callout method in Skyvva based on Interface API Version V2.
It is designed to improve the legacy invokeCallout() by adding support for asynchronous processing modes while still maintaining compatibility with older SAP PI integration architecture (SFDC2SAPPI).
This method is
please help write a document only invokeCallout2()?
Skyvva Outbound Callout Method – invokeCallout2() (V2 Extended)
1. Overview
invokeCallout2() is an enhanced outbound callout method in Skyvva based on Interface API Version V2.
It extends the original invokeCallout() functionality by introducing asynchronous processing capabilities while still remaining within the legacy V2 integration architecture.
This method is mainly used for SFDC to SAP PI (SFDC2SAPPI) integrations where more flexible execution modes are required.
2. Purpose
The main purpose of invokeCallout2() is to:
- Provide outbound integration with extended processing options
- Support both synchronous and asynchronous execution
- Improve scalability compared to
invokeCallout() - Maintain compatibility with V2-based legacy integrations
3. When to Use invokeCallout2()
Use invokeCallout2() when:
- You are working within Interface API Version V2
- Asynchronous processing is required
- You need Queueable or Batch processing support
- The integration does not use Message Type Template (IStructure)
- You are integrating with SFDC2SAPPI adapter
4. Limitations
invokeCallout2() has the following limitations:
- Does NOT support Message Type Template (IStructure)
- Does NOT support modern V3 adapter framework
- Limited to V2 architecture
- No support for advanced V3 message structures (custom/sObject mapping)
5. Supported Interface API Version
| Feature | Value |
|---|---|
| Interface API Version | V2 |
6. Supported Execution Modes
| Mode | Support |
|---|---|
SYNC | ✅ Supported |
AUTO | ✅ Supported |
FUTURE | ✅ Supported |
QUEUEABLE | ✅ Supported |
BATCH | ✅ Supported |
7. Adapter Support
| Adapter Type | Support |
|---|---|
| SFDC2SAPPI Adapter | ✅ Supported |
| REST Adapter | ❌ Not Supported |
| SOAP Adapter | ❌ Not Supported |
| SAP PI/PO Modern Adapter | ❌ Not Supported |
8. Parameters
invokeCallout2() requires the following parameters:
| Parameter | Description |
|---|---|
| Interface Name | Name of the outbound interface |
| Integration Name | Name of the integration configuration |
| IDs | Salesforce record IDs |
| Mode | Execution mode (SYNC, AUTO, FUTURE, QUEUEABLE, BATCH) |
| CallOutControl | Configuration object for processing behavior |
9. CallOutControl Configuration Example
skyvvasolutions.CallOutControl c=new skyvvasolutions.CallOutControl();
c.returnxml=true;
c.returnListRecord=true;
c.iscreatemessage=true;
skyvvasolutions.CallOutControl c=new skyvvasolutions.CallOutControl();
c.returnxml=true;
c.returnListRecord=true;
c.iscreatemessage=true;
10. Sample Apex Script for invokeCallout2()
skyvvasolutions.CallOutControl c=new skyvvasolutions.CallOutControl();
c.returnxml=true;
c.returnListRecord=true;
c.iscreatemessage=true;
List<String> lId = new List<String>();
for(Account a : [SELECT Id FROM Account]){
lId.add(a.Id);
}
skyvvasolutions.IServices.invokeCallout2('IntegrationName','InterfaceName',lId, 'QUEUEABLE', c);
11. Processing Flow
12. Key Characteristics
- Based on Interface API Version V2
- Supports asynchronous execution (Future / Queueable / Batch)
- Compatible with legacy SAP PI (SFDC2SAPPI) integrations
- No support for Message Type Template (
IStructure) - Designed for extended legacy integration scenarios
13. Summary
invokeCallout2() is a V2 extended outbound callout method that improves upon invokeCallout() by adding support for asynchronous processing.
It is best suited for:
- SFDC2SAPPI-based integrations
- Legacy SAP PI environments requiring async processing
- V2 architecture-based outbound integrations
14. Recommendation
- Use
invokeCallout2()for legacy V2 systems requiring async processing - For new enterprise integrations, consider
invokeCalloutV3()for full adapter and message flexibility