omnistudio-callable-apex-generate

Generate and review Salesforce Industries System.Callable Apex classes with 120-point scoring.

Updated Jul 2, 2026
One-click install
npx skills add https://github.com/padjei/SF_Build --skill omnistudio-callable-apex-generate-padjei
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: omnistudio-callable-apex-generate
Source: https://github.com/padjei/SF_Build/tree/main/.claude/skills/omnistudio-callable-apex-generate
Command: npx skills add https://github.com/padjei/SF_Build --skill omnistudio-callable-apex-generate-padjei

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes assets (resource) components.

What problem does it solve? Building callable Apex for Salesforce Industries (OmniStudio/Vlocity) extension points requires strict contracts, security enforcement, and consistent response envelopes that are easy to get wrong, and legacy VlocityOpenInterface code often needs modernization to System.Callable. ## Core Features & Use Cases - Callable Generation & Review: Create System.Callable classes with explicit switch-on action dispatch, input validation, CRUD/FLS enforcement, and a consistent success/data/errors response envelope. - 120-Point Scoring Rubric: Validate implementations across 7 categories (contract, input validation, security, error handling, bulkification, testing, documentation) with Ready/Review/Block thresholds. - Migration Guidance: Convert VlocityOpenInterface and VlocityOpenInterface2 implementations to System.Callable while preserving action contracts, with bundled before/after examples and test classes. - Use Case: An Integration Procedure needs a custom action to find Quotes by Product2.ProductCode; the skill generates the callable class, a custom exception class, and a full test class covering positive, negative, contract, and bulk cases. ## Quick Start Ask the assistant to create a System.Callable Apex class for an OmniStudio Integration Procedure with specific action names and input/output keys, and it will generate the class, tests, and exception class following the 120-point rubric.

Frequently Asked Questions about omnistudio-callable-apex-generate

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I create a System.Callable Apex class for OmniStudio?▼

Define your action names and input/output contract, then implement System.Callable with a thin call() method that dispatches via switch on action to private methods. Return a consistent envelope with success, data, and errors keys, and throw a typed exception for unsupported actions.

How to migrate VlocityOpenInterface2 to System.Callable in Salesforce?▼

Preserve methodName values as action strings, pass inputMap and options as keys in the args map, and return a response envelope instead of mutating outputMap. Keep call() thin by delegating to the same internal methods, and update callers to read the return value instead of outputMap.

What is the difference between VlocityOpenInterface and System.Callable?▼

VlocityOpenInterface2 uses invokeMethod(methodName, inputMap, outputMap, options) and writes results into outputMap by reference, returning a Boolean. System.Callable uses call(action, args) and returns the result directly, making it the modern standard interface without a managed package namespace dependency.

Does System.Callable require a namespace prefix in managed packages?▼

System.Callable is a standard Salesforce interface and requires no namespace prefix. However, omnistudio.VlocityOpenInterface2 uses the managed omnistudio namespace and must always be qualified, and custom classes deployed into a namespaced package need the prefix applied.

Why does my callable class fail when callers pass flat arguments?▼

The failure happens when code expects an inputMap key but the caller passes flat args. Guard defensively by checking whether args contains the inputMap key, and if absent, treat args itself as the input map with an empty options map.

When should I not use a callable Apex class?▼

Avoid callables for generic Apex classes or triggers without an Industries extension point, and for long-running work that belongs in asynchronous processing. Use dedicated skills for building Integration Procedures, OmniScripts, or DataRaptors instead of hand-coding those artifacts.