building-omnistudio-callable-apex

Generate and review Salesforce OmniStudio System.Callable Apex implementations with action dispatch and response envelopes.

803|289|Updated Nov 7, 2025
One-click install
npx skills add https://github.com/forcedotcom/sf-skills --skill building-omnistudio-callable-apex
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: building-omnistudio-callable-apex
Source: https://github.com/forcedotcom/sf-skills/tree/main/skills/building-omnistudio-callable-apex
Command: npx skills add https://github.com/forcedotcom/sf-skills --skill building-omnistudio-callable-apex

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes assets (resource) components.

What problem does it solve?

Automating OmniStudio/Industries integrations often breaks when callable Apex does not follow a consistent action contract, robust input validation, and secure execution patterns. This skill resolves that by producing and auditing deterministic System.Callable implementations (including legacy VlocityOpenInterface/VlocityOpenInterface2 migration guidance).

Core Features & Use Cases

  • Callable generation for Industries: Creates System.Callable classes with explicit, versionable action dispatch using switch on action and a consistent response envelope.
  • Callable review and remediation: Analyzes existing callable implementations against a 120-point scoring rubric and identifies contract, security, bulkification, and testing gaps.
  • Migration guidance (VlocityOpenInterface / VlocityOpenInterface2): Provides phase-based mapping from invokeMethod(methodName, inputMap, outputMap, options) into callable(action, args) patterns and outlines how callers must adjust to the returned envelope.
  • Testing examples: Produces test class patterns covering positive, negative, contract/validation, bulk, and unsupported-action behavior.

Quick Start

Use building-omnistudio-callable-apex to generate a System.Callable implementation by requesting: Create a callable implementation for Order actions with createOrder and cancelOrder.

Frequently Asked Questions about building-omnistudio-callable-apex

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

FAQPage Schema
How do I create a callable Apex class for OmniStudio integrations?

To create an OmniStudio callable Apex class, implement the System.Callable interface with an explicit switch statement for action dispatch. This generates a consistent inputMap/options contract and a standardized response envelope for action-based integrations.

What is the best way to migrate VlocityOpenInterface to System.Callable Apex?

Migrating VlocityOpenInterface to System.Callable Apex requires mapping invokeMethod into callable(action, args) patterns. Callers must adjust to the new deterministic response envelope containing success, data, and errors properties.

How does callable Apex handle bulk-safe limits and CRUD security in Salesforce Industries?

Callable Apex handles bulk-safe limits and CRUD security by applying strict null-safe input validation, type coercion, sharing rules, and stripInaccessible for FLS enforcement. This ensures secure execution and prevents governor limit exceptions during bulk processing.

Can I audit existing OmniStudio callable Apex implementations for security gaps?

You can audit existing OmniStudio callable Apex implementations using a 120-point scoring rubric to identify contract, security, bulkification, and testing gaps. This review highlights missing CRUD/FLS checks and inconsistent error handling patterns.

What test coverage patterns are needed for callable Apex action dispatch?

Test coverage patterns for callable Apex action dispatch must cover positive, negative, contract validation, bulk, and unsupported-action behavior. This ensures deterministic error handling and validates that all switch-based actions return the correct response envelope.