Skip to content

forcedotcom/sf-skills / skills/omnistudio-callable-apex-generate

omnistudio-callable-apex-generate

Verified

Salesforce Industries Common Core (OmniStudio/Vlocity) Apex callable generation and review skill with 120-point scoring. Use when creating, reviewing, or migrating Industries callable Apex implementations. TRIGGER when: user creates or reviews System.Callable classes, migrates VlocityOpenInterface or VlocityOpenInterface2, or builds Industries callable extensions used by OmniStudio, Integration Procedures, or DataRaptors. DO NOT TRIGGER when: generic Apex classes or triggers (use platform-apex-generate), building Integration Procedures (use omnistudio-integration-procedure-generate), authoring OmniScripts (use omnistudio-omniscript-generate), configuring Data Mappers (use omnistudio-datamapper-generate), or analyzing namespace/dependency issues (use omnistudio-dependencies-analyze).

assets/pattern_openinterface.cls

View on GitHub
/**
 * VlocityOpenInterface2 implementation skeleton.
 * Use when the Industries extension point requires the legacy Open Interface contract.
 *
 * Key rules:
 * - Write results into outputMap via putAll(); do NOT return the envelope from invokeMethod
 * - Return true for success, false for unsupported/failed actions
 * - Delegate to the same private methods as the Callable (same inputMap, options signature)
 * - Populate outputMap with the same envelope shape (success, data, errors)
 *
 * Replace Industries_XxxOpenInterface and actionOne with the actual class/action names.
 */
global with sharing class Industries_XxxOpenInterface implements omnistudio.VlocityOpenInterface2 {

    global Boolean invokeMethod(String methodName, Map<String, Object> inputMap,
                                Map<String, Object> outputMap, Map<String, Object> options) {
        switch on methodName {
            when 'actionOne' {
                Map<String, Object> result = actionOne(inputMap, options);
                outputMap.putAll(result);
                return true;
            }
            when else {
                outputMap.put('success', false);
                outputMap.put('errors', new List<Map<String, Object>>{
                    new Map<String, Object>{
                        'code'    => 'UNSUPPORTED_ACTION',
                        'message' => 'Unsupported action: ' + methodName
                    }
                });
                return false;
            }
        }
    }

    private Map<String, Object> actionOne(Map<String, Object> inputMap, Map<String, Object> options) {
        // 1. Validate required keys from inputMap
        // 2. Run business logic (SOQL with WITH USER_MODE, DML with sharing)
        // 3. Return response envelope (written into outputMap by the caller above)
        return new Map<String, Object>{
            'success' => true,
            'data'    => new Map<String, Object>()
        };
    }
}
reverse-engineer-anythingmorluto/reaReverse engineer native, managed, Electron/JavaScript, packaged, firmware, and browser targets with REA, and build agent environments (AgentEnv bundles) of web applications from a live instance or a capture, and of Linux desktop apps with a task from a request. Use shipped-artifact or requested runtime evidence to explain features, compare versions, decompile code, or guide a reconstruction. Skip REA for ordinary source-repository architecture analysis.Stars: 472kUpdated Claude CodeCodexVerifiedInstall
diagnosing-superpowersobra/superpowersUse when a superpowers session went wrong and your human partner wants to know why — repeated work, ignored plans, stumbles, poor results, a skill that didn't fire, "it took too long", "why is it so expensive", "what is it doing" — or wants to build a bug report for the superpowers maintainers, for the current session or a past one identified by id or path, on any harness.Stars: 322kUpdated Claude CodeCodexVerifiedInstall
dispatching-parallel-agentsobra/superpowersUse when facing 2+ independent tasks that can be worked on without shared state or sequential dependenciesStars: 322kUpdated Claude CodeCodexVerifiedInstall
executing-plansobra/superpowersUse when executing an implementation plan in the current session as the implementer yourself — your human partner chose inline execution, or no subagent tool is availableStars: 322kUpdated Claude CodeCodexVerifiedInstall