afv-library/skills/omnistudio-callable-apex-generate
2026-07-03 05:25:02 +00:00
..
assets feat: Release Skills Renaming by domain first convention @W-23187998@ 2026-06-26 12:21:51 +00:00
examples feat: Release Skills Renaming by domain first convention @W-23187998@ 2026-06-26 12:21:51 +00:00
CREDITS.md feat: Release Skills Renaming by domain first convention @W-23187998@ 2026-06-26 12:21:51 +00:00
README.md feat: Release Skills Renaming by domain first convention @W-23187998@ 2026-06-26 12:21:51 +00:00
SKILL.md feat: Release: Standardize skill folder structure scripts/, references/, assets/ @W-23262449@ 2026-07-03 05:25:02 +00:00

omnistudio-callable-apex-generate

Generates and reviews Salesforce Industries Common Core (OmniStudio/Vlocity) Apex callable implementations. Build secure, deterministic System.Callable classes with a 120-point scoring rubric and migration guidance from legacy VlocityOpenInterface implementations.

Features

  • Callable Generation: Create System.Callable classes with safe action dispatch
  • Callable Review: Analyze existing callable implementations for risks and fixes
  • 120-Point Scoring: Validation across 7 callable-specific categories
  • VlocityOpenInterface / VlocityOpenInterface2 Support: Phase 2 contract mapping and Phase 3 implementation patterns for invokeMethod(String methodName, Map<String, Object> inputMap, Map<String, Object> outputMap, Map<String, Object> options)
  • Migration Guidance: Patterns for moving from VlocityOpenInterface/VlocityOpenInterface2 to System.Callable
  • Testing Examples: Test class patterns for actions, errors, and bulk inputs

Quick Start

1. Invoke the skill

Skill: omnistudio-callable-apex-generate
Request: "Create a callable implementation for Order actions with createOrder and cancelOrder"

2. Answer requirements questions

The skill will ask about:

  • Industries entry point (OmniScript, Integration Procedure, DataRaptor)
  • Action names (strings passed into call)
  • Input/output contract (required keys, response shape)
  • Data access needs and security expectations

3. Review generated code

The skill generates:

  • Callable class with explicit switch on action
  • Consistent response envelope
  • Test class examples for action coverage and error paths

Bundled Examples

Scoring System (120 Points)

Category Points Focus
Contract & Dispatch 20 Explicit actions, switch on, versioned strings
Input Validation 20 Required keys, type coercion, null guards
Security 20 CRUD/FLS checks, with sharing, stripInaccessible
Error Handling 15 Typed exceptions, consistent errors
Bulkification & Limits 20 No SOQL/DML in loops, list inputs
Testing 15 Positive/negative/contract/bulk tests
Documentation 10 ApexDoc for class and action methods

Thresholds: 90+ (Ready) | ⚠️ 70-89 (Review) | <70 (Block)

Cross-Skill Integration

Related Skill When to Use
platform-apex-generate General Apex work beyond callable implementations
platform-custom-object-generate / platform-custom-field-generate Verify object/field availability before coding
platform-apex-test-run Run tests and analyze coverage
platform-metadata-deploy Deploy callable classes to an org

Documentation

VlocityOpenInterface / VlocityOpenInterface2

The skill includes design (Phase 2) and implementation (Phase 3) guidance for the Open Interface signature invokeMethod(String methodName, Map<String, Object> inputMap, Map<String, Object> outputMap, Map<String, Object> options). Use this when extending legacy OmniStudio/Vlocity integration points or building dual Callable + Open Interface implementations.

Requirements

  • sf CLI v2
  • Target Salesforce org