Salesforce Decode
Salesforcedecode
Back to questions
ApexIntermediatecallabledynamicintegration

Implement Callable interface for dynamic Apex invocation

Real World Scenario

Flow needs to invoke different Apex handlers based on record type without separate invocable per type.

Expected Answer

• Implement System.Callable interface with call(action, args) method • Action string routes to handler methods • Args map typed extraction with validation • Single invocable wrapper delegating to Callable • Extensible via CMDT mapping action to class name • Security review dynamic class instantiation risks

Follow-Up Questions & Answers

Click to expand — each follow-up includes a direct, interview-ready answer

Main difference: use case and scale. Implement System.Callable interface with call(action, args) method. Action string routes to handler methods. Pick based on your integration pattern and team capability. Callable enables plugin architecture—validate allowed classes against allowlist. Balance speed of delivery with maintainability.

Architect Perspective

Callable enables plugin architecture—validate allowed classes against allowlist.