[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M7CBCVK12YFG2WQT7566TYGX":3,"skill-same:01M7CBCVK12YFG2WQT7566TYGX":51},{"skillNo":4,"name":5,"nameZh":6,"description":7,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":16,"categories":17,"keywords":18,"publishedAt":19,"linkOnly":20,"markdownContent":21,"markdownBody":22,"frontMatter":23,"refName":29,"commitSha":30,"skillDirectory":31,"forksCount":32,"repositoryHtmlUrl":33,"repositoryHomepageUrl":6,"ownerHtmlUrl":34,"ownerBlogUrl":6,"ownerDescription":35,"updatedAt":36,"install":37,"resources":50},"01M7CBCVK12YFG2WQT7566TYGX","sf-industry-commoncore-callable-apex",null,"Salesforce Industries Common Core (OmniStudio\u002FVlocity) Apex callable generation and review with 120-point scoring. TRIGGER when: user creates or reviews System.Callable classes, migrates `VlocityOpenInterface` \u002F `VlocityOpenInterface2`, or builds Industries callable extensions used by OmniStudio, Integration Procedures, or DataRaptors. DO NOT TRIGGER when: generic Apex classes\u002Ftriggers (use sf-apex), building Integration Procedures (use sf-industry-commoncore-integration-procedure), authoring OmniScripts (use sf-industry-commoncore-omniscript), configuring Data Mappers (use sf-industry-commoncore-datamapper), or analyzing namespace\u002Fdependency issues (use sf-industry-commoncore-omnistudio-analyze).","om-scogo\u002Fskillsh-scraper","om-scogo","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F160466840?v=4","01M79AWB6DFVCQ7RK70CS34B96","Om Achrekar","01M79AWB6ZM9SKR8KDH1WSSM22",0,"MIT","https:\u002F\u002Fgithub.com\u002Fom-scogo\u002Fskillsh-scraper\u002Fblob\u002Fmain\u002Fdata\u002Fskills\u002Fjaganpro-sf-skills\u002Fsf-industry-commoncore-callable-apex\u002Fskills\u002Fsf-industry-commoncore-callable-apex\u002FSKILL.md",[],[],"2026-11-15 14:19:17",false,"---\nname: sf-industry-commoncore-callable-apex\ndescription: >\n  Salesforce Industries Common Core (OmniStudio\u002FVlocity) Apex callable generation and review with\n  120-point scoring.\n  TRIGGER when: user creates or reviews System.Callable classes, migrates\n  `VlocityOpenInterface` \u002F `VlocityOpenInterface2`, or builds Industries callable extensions used by\n  OmniStudio, Integration Procedures, or DataRaptors.\n  DO NOT TRIGGER when: generic Apex classes\u002Ftriggers (use sf-apex), building Integration Procedures\n  (use sf-industry-commoncore-integration-procedure), authoring OmniScripts (use sf-industry-commoncore-omniscript),\n  configuring Data Mappers (use sf-industry-commoncore-datamapper), or analyzing namespace\u002Fdependency\n  issues (use sf-industry-commoncore-omnistudio-analyze).\nlicense: MIT\nmetadata:\n  version: \"1.0.0\"\n  author: \"Shreyas Dhond\"\n  scoring: \"120 points across 7 categories\"\n---\n\n# sf-industry-commoncore-callable-apex: Callable Apex for Salesforce Industries Common Core\n\nSpecialist for Salesforce Industries Common Core callable Apex implementations. Produce secure,\ndeterministic, and configurable Apex that cleanly integrates with OmniStudio and Industries\nextension points.\n\n## Core Responsibilities\n\n1. **Callable Generation**: Build `System.Callable` classes with safe action dispatch\n2. **Callable Review**: Audit existing callable implementations for correctness and risks\n3. **Validation & Scoring**: Evaluate against the 120-point rubric\n4. **Industries Fit**: Ensure compatibility with OmniStudio\u002FIndustries extension points\n\n---\n\n## Workflow (4-Phase Pattern)\n\n### Phase 1: Requirements Gathering\n\nAsk for:\n- Entry point (OmniScript, Integration Procedure, DataRaptor, or other Industries hook)\n- Action names (strings passed into `call`)\n- Input\u002Foutput contract (required keys, types, and response shape)\n- Data access needs (objects\u002Ffields, CRUD\u002FFLS rules)\n- Side effects (DML, callouts, async requirements)\n\nThen:\n1. Scan for existing callable classes: `Glob: **\u002F*Callable*.cls`\n2. Identify shared utilities or base classes used for Industries extensions\n3. Create a task list\n\n---\n\n### Phase 2: Design & Contract Definition\n\n**Define the callable contract**:\n- Action list (explicit, versioned strings)\n- Input schema (required keys + types)\n- Output schema (consistent response envelope)\n\n**Recommended response envelope**:\n```\n{\n  \"success\": true|false,\n  \"data\": {...},\n  \"errors\": [ { \"code\": \"...\", \"message\": \"...\" } ]\n}\n```\n\n**Action dispatch rules**:\n- Use `switch on action`\n- Default case throws a typed exception\n- No dynamic method invocation or reflection\n\n**VlocityOpenInterface \u002F VlocityOpenInterface2 contract mapping**:\n\nWhen designing for legacy Open Interface extensions (or dual Callable + Open Interface support), map the signature:\n\n```\ninvokeMethod(String methodName, Map\u003CString, Object> inputMap, Map\u003CString, Object> outputMap, Map\u003CString, Object> options)\n```\n\n| Parameter | Role | Callable equivalent |\n|-----------|------|---------------------|\n| `methodName` | Action selector (same semantics as `action`) | `action` in `call(action, args)` |\n| `inputMap` | Primary input data (required keys, types) | `args.get('inputMap')` |\n| `outputMap` | Mutable map where results are written (out-by-reference) | Return value; Callable returns envelope instead |\n| `options` | Additional context (parent DataRaptor\u002FOmniScript context, invocation metadata) | `args.get('options')` |\n\nDesign rules for Open Interface contracts:\n- Treat `inputMap` and `options` as the combined input schema\n- Define what keys must be written to `outputMap` per action (success and error cases)\n- Preserve `methodName` strings so they align with Callable `action` strings\n- Document whether `options` is required, optional, or unused for each action\n\n---\n\n### Phase 3: Implementation Pattern\n\n**Vanilla System.Callable** (flat args, no Open Interface coupling):\n\n```apex\npublic with sharing class Industries_OrderCallable implements System.Callable {\n    public Object call(String action, Map\u003CString, Object> args) {\n        switch on action {\n            when 'createOrder' {\n                return createOrder(args != null ? args : new Map\u003CString, Object>());\n            }\n            when else {\n                throw new IndustriesCallableException('Unsupported action: ' + action);\n            }\n        }\n    }\n\n    private Map\u003CString, Object> createOrder(Map\u003CString, Object> args) {\n        \u002F\u002F Validate input (e.g. args.get('orderId')), run business logic, return response envelope\n        return new Map\u003CString, Object>{ 'success' => true };\n    }\n}\n```\n\nUse the vanilla pattern when callers pass flat args and no VlocityOpenInterface integration is required.\n\n**Callable skeleton** (same inputs as VlocityOpenInterface):\n\nUse `inputMap` and `options` keys in `args` when integrating with Open Interface or when callers pass that structure:\n\n```apex\npublic with sharing class Industries_OrderCallable implements System.Callable {\n    public Object call(String action, Map\u003CString, Object> args) {\n        Map\u003CString, Object> inputMap = (args != null && args.containsKey('inputMap'))\n            ? (Map\u003CString, Object>) args.get('inputMap') : (args != null ? args : new Map\u003CString, Object>());\n        Map\u003CString, Object> options  = (args != null && args.containsKey('options'))\n            ? (Map\u003CString, Object>) args.get('options')  : new Map\u003CString, Object>();\n        if (inputMap == null) { inputMap = new Map\u003CString, Object>(); }\n        if (options  == null) { options  = new Map\u003CString, Object>(); }\n\n        switch on action {\n            when 'createOrder' {\n                return createOrder(inputMap, options);\n            }\n            when else {\n                throw new IndustriesCallableException('Unsupported action: ' + action);\n            }\n        }\n    }\n\n    private Map\u003CString, Object> createOrder(Map\u003CString, Object> inputMap, Map\u003CString, Object> options) {\n        \u002F\u002F Validate input, run business logic, return response envelope\n        return new Map\u003CString, Object>{ 'success' => true };\n    }\n}\n```\n\n**Input format**: Callers pass `args` as `{ 'inputMap' => Map\u003CString, Object>, 'options' => Map\u003CString, Object> }`. For backward compatibility with flat callers, if `args` lacks `'inputMap'`, treat `args` itself as `inputMap` and use an empty map for `options`.\n\n**Implementation rules**:\n1. Keep `call()` thin; delegate to private methods or service classes\n2. Validate and coerce input types early (null-safe)\n3. Enforce CRUD\u002FFLS and sharing (`with sharing`, `Security.stripInaccessible()`)\n4. Bulkify when args include record collections\n5. Use `WITH USER_MODE` for SOQL when appropriate\n\n**VlocityOpenInterface \u002F VlocityOpenInterface2 implementation**:\n\nWhen implementing `omnistudio.VlocityOpenInterface` or `omnistudio.VlocityOpenInterface2`, use the signature:\n\n```apex\nglobal Boolean invokeMethod(String methodName, Map\u003CString, Object> inputMap,\n                           Map\u003CString, Object> outputMap, Map\u003CString, Object> options)\n```\n\nOpen Interface skeleton:\n\n```apex\nglobal with sharing class Industries_OrderOpenInterface implements omnistudio.VlocityOpenInterface2 {\n    global Boolean invokeMethod(String methodName, Map\u003CString, Object> inputMap,\n                                Map\u003CString, Object> outputMap, Map\u003CString, Object> options) {\n        switch on methodName {\n            when 'createOrder' {\n                Map\u003CString, Object> result = createOrder(inputMap, options);\n                outputMap.putAll(result);\n                return true;\n            }\n            when else {\n                outputMap.put('success', false);\n                outputMap.put('errors', new List\u003CMap\u003CString, Object>>{\n                    new Map\u003CString, Object>{ 'code' => 'UNSUPPORTED_ACTION', 'message' => 'Unsupported action: ' + methodName }\n                });\n                return false;\n            }\n        }\n    }\n\n    private Map\u003CString, Object> createOrder(Map\u003CString, Object> inputMap, Map\u003CString, Object> options) {\n        \u002F\u002F Validate input, run business logic, return response envelope\n        return new Map\u003CString, Object>{ 'success' => true, 'data' => new Map\u003CString, Object>() };\n    }\n}\n```\n\nOpen Interface implementation rules:\n- Write results into `outputMap` via `putAll()` or individual `put()` calls; do not return the envelope from `invokeMethod`\n- Return `true` for success, `false` for unsupported or failed actions\n- Use the same internal private methods as the Callable (same `inputMap` and `options` parameters); only the entry point differs\n- Populate `outputMap` with the same envelope shape (`success`, `data`, `errors`) for consistency\n\nBoth Callable and Open Interface accept the same inputs (`inputMap`, `options`) and delegate to identical private method signatures for shared logic.\n\n---\n\n### Phase 4: Testing & Validation\n\nMinimum tests:\n- **Positive**: Supported action executes successfully\n- **Negative**: Unsupported action throws expected exception\n- **Contract**: Missing\u002Finvalid inputs return error envelope\n- **Bulk**: Handles list inputs without hitting limits\n\n**Example test class**:\n```apex\n@IsTest\nprivate class Industries_OrderCallableTest {\n    @IsTest\n    static void testCreateOrder() {\n        System.Callable svc = new Industries_OrderCallable();\n        Map\u003CString, Object> args = new Map\u003CString, Object>{\n            'inputMap' => new Map\u003CString, Object>{ 'orderId' => '001000000000001' },\n            'options'  => new Map\u003CString, Object>()\n        };\n        Map\u003CString, Object> result =\n            (Map\u003CString, Object>) svc.call('createOrder', args);\n        Assert.isTrue((Boolean) result.get('success'));\n    }\n\n    @IsTest\n    static void testUnsupportedAction() {\n        try {\n            System.Callable svc = new Industries_OrderCallable();\n            svc.call('unknownAction', new Map\u003CString, Object>());\n            Assert.fail('Expected IndustriesCallableException');\n        } catch (IndustriesCallableException e) {\n            Assert.isTrue(e.getMessage().contains('Unsupported action'));\n        }\n    }\n}\n```\n\n---\n\n## Migration: VlocityOpenInterface to System.Callable\n\nWhen modernizing Industries extensions, move `VlocityOpenInterface` or\n`VlocityOpenInterface2` implementations to `System.Callable` and keep the\naction contract stable. Use the Salesforce guidance as the source of truth.\n[Salesforce Help](https:\u002F\u002Fhelp.salesforce.com\u002Fs\u002FarticleView?id=ind.v_dev_t_callable_implementations_651821.htm&type=5)\n\n**Guidance**:\n- Preserve action names (`methodName`) as `action` strings in `call()`\n- Pass `inputMap` and `options` as keys in `args`: `{ 'inputMap' => inputMap, 'options' => options }`\n- Return a consistent response envelope instead of mutating `outMap`\n- Keep `call()` thin; delegate to the same internal methods with `(inputMap, options)` signature\n- Add tests for each action and unsupported action\n\n**Example migration (pattern)**:\n```apex\n\u002F\u002F BEFORE: VlocityOpenInterface2\nglobal class OrderOpenInterface implements omnistudio.VlocityOpenInterface2 {\n    global Boolean invokeMethod(String methodName, Map\u003CString, Object> input,\n                                Map\u003CString, Object> output,\n                                Map\u003CString, Object> options) {\n        if (methodName == 'createOrder') {\n            output.putAll(createOrder(input, options));\n            return true;\n        }\n        return false;\n    }\n}\n\n\u002F\u002F AFTER: System.Callable (same inputs: inputMap, options)\npublic with sharing class OrderCallable implements System.Callable {\n    public Object call(String action, Map\u003CString, Object> args) {\n        Map\u003CString, Object> inputMap = args != null ? (Map\u003CString, Object>) args.get('inputMap') : new Map\u003CString, Object>();\n        Map\u003CString, Object> options  = args != null ? (Map\u003CString, Object>) args.get('options')   : new Map\u003CString, Object>();\n        if (inputMap == null) { inputMap = new Map\u003CString, Object>(); }\n        if (options  == null) { options  = new Map\u003CString, Object>(); }\n\n        switch on action {\n            when 'createOrder' {\n                return createOrder(inputMap, options);\n            }\n            when else {\n                throw new IndustriesCallableException('Unsupported action: ' + action);\n            }\n        }\n    }\n}\n```\n\n---\n\n## Best Practices (120-Point Scoring)\n\n| Category | Points | Key Rules |\n|----------|--------|-----------|\n| **Contract & Dispatch** | 20 | Explicit action list; `switch on`; versioned action strings |\n| **Input Validation** | 20 | Required keys validated; types coerced safely; null guards |\n| **Security** | 20 | `with sharing`; CRUD\u002FFLS checks; `Security.stripInaccessible()` |\n| **Error Handling** | 15 | Typed exceptions; consistent error envelope; no empty catch |\n| **Bulkification & Limits** | 20 | No SOQL\u002FDML in loops; supports list inputs |\n| **Testing** | 15 | Positive\u002Fnegative\u002Fcontract\u002Fbulk tests |\n| **Documentation** | 10 | ApexDoc for class and action methods |\n\n**Thresholds**: ✅ 90+ (Ready) | ⚠️ 70-89 (Review) | ❌ \u003C70 (Block)\n\n---\n\n## ⛔ Guardrails (Mandatory)\n\nStop and ask the user if any of these would be introduced:\n- Dynamic method execution based on user input (no reflection)\n- SOQL\u002FDML inside loops\n- `without sharing` on callable classes\n- Silent failures (empty catch, swallowed exceptions)\n- Inconsistent response shapes across actions\n\n---\n\n## Common Anti-Patterns\n\n- `call()` contains business logic instead of delegating\n- Action names are unversioned or not documented\n- Input maps assumed to have keys without checks\n- Mixed response types (sometimes Map, sometimes String)\n- No tests for unsupported actions\n\n---\n\n## Cross-Skill Integration\n\n| Skill | When to Use | Example |\n|-------|-------------|---------|\n| sf-apex | General Apex work beyond callable implementations | \"Create trigger for Account\" |\n| sf-metadata | Verify object\u002Ffield availability before coding | \"Describe Product2\" |\n| sf-deploy | Validate\u002Fdeploy callable classes | \"Deploy to sandbox\" |\n\n---\n\n## Reference Skill\n\nUse the core Apex standards, testing patterns, and guardrails in:\n- [skills\u002Fsf-apex\u002FSKILL.md](..\u002Fsf-apex\u002FSKILL.md)\n\n---\n\n## Bundled Examples\n\n- [examples\u002FTest_QuoteByProductCallable\u002F](examples\u002FTest_QuoteByProductCallable\u002F) — read-only query example with `WITH USER_MODE`\n- [examples\u002FTest_VlocityOpenInterfaceConversion\u002F](examples\u002FTest_VlocityOpenInterfaceConversion\u002F) — migration from legacy `VlocityOpenInterface`\n- [examples\u002FTest_VlocityOpenInterface2Conversion\u002F](examples\u002FTest_VlocityOpenInterface2Conversion\u002F) — migration from `VlocityOpenInterface2`\n\n## Notes\n\n- Prefer deterministic, side-effect-aware callable actions\n- Keep action contracts stable; introduce new actions for breaking changes\n- Avoid long-running work in synchronous callables; use async when needed\n\n---\n","# sf-industry-commoncore-callable-apex: Callable Apex for Salesforce Industries Common Core\n\nSpecialist for Salesforce Industries Common Core callable Apex implementations. Produce secure,\ndeterministic, and configurable Apex that cleanly integrates with OmniStudio and Industries\nextension points.\n\n## Core Responsibilities\n\n1. **Callable Generation**: Build `System.Callable` classes with safe action dispatch\n2. **Callable Review**: Audit existing callable implementations for correctness and risks\n3. **Validation & Scoring**: Evaluate against the 120-point rubric\n4. **Industries Fit**: Ensure compatibility with OmniStudio\u002FIndustries extension points\n\n---\n\n## Workflow (4-Phase Pattern)\n\n### Phase 1: Requirements Gathering\n\nAsk for:\n- Entry point (OmniScript, Integration Procedure, DataRaptor, or other Industries hook)\n- Action names (strings passed into `call`)\n- Input\u002Foutput contract (required keys, types, and response shape)\n- Data access needs (objects\u002Ffields, CRUD\u002FFLS rules)\n- Side effects (DML, callouts, async requirements)\n\nThen:\n1. Scan for existing callable classes: `Glob: **\u002F*Callable*.cls`\n2. Identify shared utilities or base classes used for Industries extensions\n3. Create a task list\n\n---\n\n### Phase 2: Design & Contract Definition\n\n**Define the callable contract**:\n- Action list (explicit, versioned strings)\n- Input schema (required keys + types)\n- Output schema (consistent response envelope)\n\n**Recommended response envelope**:\n```\n{\n  \"success\": true|false,\n  \"data\": {...},\n  \"errors\": [ { \"code\": \"...\", \"message\": \"...\" } ]\n}\n```\n\n**Action dispatch rules**:\n- Use `switch on action`\n- Default case throws a typed exception\n- No dynamic method invocation or reflection\n\n**VlocityOpenInterface \u002F VlocityOpenInterface2 contract mapping**:\n\nWhen designing for legacy Open Interface extensions (or dual Callable + Open Interface support), map the signature:\n\n```\ninvokeMethod(String methodName, Map\u003CString, Object> inputMap, Map\u003CString, Object> outputMap, Map\u003CString, Object> options)\n```\n\n| Parameter | Role | Callable equivalent |\n|-----------|------|---------------------|\n| `methodName` | Action selector (same semantics as `action`) | `action` in `call(action, args)` |\n| `inputMap` | Primary input data (required keys, types) | `args.get('inputMap')` |\n| `outputMap` | Mutable map where results are written (out-by-reference) | Return value; Callable returns envelope instead |\n| `options` | Additional context (parent DataRaptor\u002FOmniScript context, invocation metadata) | `args.get('options')` |\n\nDesign rules for Open Interface contracts:\n- Treat `inputMap` and `options` as the combined input schema\n- Define what keys must be written to `outputMap` per action (success and error cases)\n- Preserve `methodName` strings so they align with Callable `action` strings\n- Document whether `options` is required, optional, or unused for each action\n\n---\n\n### Phase 3: Implementation Pattern\n\n**Vanilla System.Callable** (flat args, no Open Interface coupling):\n\n```apex\npublic with sharing class Industries_OrderCallable implements System.Callable {\n    public Object call(String action, Map\u003CString, Object> args) {\n        switch on action {\n            when 'createOrder' {\n                return createOrder(args != null ? args : new Map\u003CString, Object>());\n            }\n            when else {\n                throw new IndustriesCallableException('Unsupported action: ' + action);\n            }\n        }\n    }\n\n    private Map\u003CString, Object> createOrder(Map\u003CString, Object> args) {\n        \u002F\u002F Validate input (e.g. args.get('orderId')), run business logic, return response envelope\n        return new Map\u003CString, Object>{ 'success' => true };\n    }\n}\n```\n\nUse the vanilla pattern when callers pass flat args and no VlocityOpenInterface integration is required.\n\n**Callable skeleton** (same inputs as VlocityOpenInterface):\n\nUse `inputMap` and `options` keys in `args` when integrating with Open Interface or when callers pass that structure:\n\n```apex\npublic with sharing class Industries_OrderCallable implements System.Callable {\n    public Object call(String action, Map\u003CString, Object> args) {\n        Map\u003CString, Object> inputMap = (args != null && args.containsKey('inputMap'))\n            ? (Map\u003CString, Object>) args.get('inputMap') : (args != null ? args : new Map\u003CString, Object>());\n        Map\u003CString, Object> options  = (args != null && args.containsKey('options'))\n            ? (Map\u003CString, Object>) args.get('options')  : new Map\u003CString, Object>();\n        if (inputMap == null) { inputMap = new Map\u003CString, Object>(); }\n        if (options  == null) { options  = new Map\u003CString, Object>(); }\n\n        switch on action {\n            when 'createOrder' {\n                return createOrder(inputMap, options);\n            }\n            when else {\n                throw new IndustriesCallableException('Unsupported action: ' + action);\n            }\n        }\n    }\n\n    private Map\u003CString, Object> createOrder(Map\u003CString, Object> inputMap, Map\u003CString, Object> options) {\n        \u002F\u002F Validate input, run business logic, return response envelope\n        return new Map\u003CString, Object>{ 'success' => true };\n    }\n}\n```\n\n**Input format**: Callers pass `args` as `{ 'inputMap' => Map\u003CString, Object>, 'options' => Map\u003CString, Object> }`. For backward compatibility with flat callers, if `args` lacks `'inputMap'`, treat `args` itself as `inputMap` and use an empty map for `options`.\n\n**Implementation rules**:\n1. Keep `call()` thin; delegate to private methods or service classes\n2. Validate and coerce input types early (null-safe)\n3. Enforce CRUD\u002FFLS and sharing (`with sharing`, `Security.stripInaccessible()`)\n4. Bulkify when args include record collections\n5. Use `WITH USER_MODE` for SOQL when appropriate\n\n**VlocityOpenInterface \u002F VlocityOpenInterface2 implementation**:\n\nWhen implementing `omnistudio.VlocityOpenInterface` or `omnistudio.VlocityOpenInterface2`, use the signature:\n\n```apex\nglobal Boolean invokeMethod(String methodName, Map\u003CString, Object> inputMap,\n                           Map\u003CString, Object> outputMap, Map\u003CString, Object> options)\n```\n\nOpen Interface skeleton:\n\n```apex\nglobal with sharing class Industries_OrderOpenInterface implements omnistudio.VlocityOpenInterface2 {\n    global Boolean invokeMethod(String methodName, Map\u003CString, Object> inputMap,\n                                Map\u003CString, Object> outputMap, Map\u003CString, Object> options) {\n        switch on methodName {\n            when 'createOrder' {\n                Map\u003CString, Object> result = createOrder(inputMap, options);\n                outputMap.putAll(result);\n                return true;\n            }\n            when else {\n                outputMap.put('success', false);\n                outputMap.put('errors', new List\u003CMap\u003CString, Object>>{\n                    new Map\u003CString, Object>{ 'code' => 'UNSUPPORTED_ACTION', 'message' => 'Unsupported action: ' + methodName }\n                });\n                return false;\n            }\n        }\n    }\n\n    private Map\u003CString, Object> createOrder(Map\u003CString, Object> inputMap, Map\u003CString, Object> options) {\n        \u002F\u002F Validate input, run business logic, return response envelope\n        return new Map\u003CString, Object>{ 'success' => true, 'data' => new Map\u003CString, Object>() };\n    }\n}\n```\n\nOpen Interface implementation rules:\n- Write results into `outputMap` via `putAll()` or individual `put()` calls; do not return the envelope from `invokeMethod`\n- Return `true` for success, `false` for unsupported or failed actions\n- Use the same internal private methods as the Callable (same `inputMap` and `options` parameters); only the entry point differs\n- Populate `outputMap` with the same envelope shape (`success`, `data`, `errors`) for consistency\n\nBoth Callable and Open Interface accept the same inputs (`inputMap`, `options`) and delegate to identical private method signatures for shared logic.\n\n---\n\n### Phase 4: Testing & Validation\n\nMinimum tests:\n- **Positive**: Supported action executes successfully\n- **Negative**: Unsupported action throws expected exception\n- **Contract**: Missing\u002Finvalid inputs return error envelope\n- **Bulk**: Handles list inputs without hitting limits\n\n**Example test class**:\n```apex\n@IsTest\nprivate class Industries_OrderCallableTest {\n    @IsTest\n    static void testCreateOrder() {\n        System.Callable svc = new Industries_OrderCallable();\n        Map\u003CString, Object> args = new Map\u003CString, Object>{\n            'inputMap' => new Map\u003CString, Object>{ 'orderId' => '001000000000001' },\n            'options'  => new Map\u003CString, Object>()\n        };\n        Map\u003CString, Object> result =\n            (Map\u003CString, Object>) svc.call('createOrder', args);\n        Assert.isTrue((Boolean) result.get('success'));\n    }\n\n    @IsTest\n    static void testUnsupportedAction() {\n        try {\n            System.Callable svc = new Industries_OrderCallable();\n            svc.call('unknownAction', new Map\u003CString, Object>());\n            Assert.fail('Expected IndustriesCallableException');\n        } catch (IndustriesCallableException e) {\n            Assert.isTrue(e.getMessage().contains('Unsupported action'));\n        }\n    }\n}\n```\n\n---\n\n## Migration: VlocityOpenInterface to System.Callable\n\nWhen modernizing Industries extensions, move `VlocityOpenInterface` or\n`VlocityOpenInterface2` implementations to `System.Callable` and keep the\naction contract stable. Use the Salesforce guidance as the source of truth.\n[Salesforce Help](https:\u002F\u002Fhelp.salesforce.com\u002Fs\u002FarticleView?id=ind.v_dev_t_callable_implementations_651821.htm&type=5)\n\n**Guidance**:\n- Preserve action names (`methodName`) as `action` strings in `call()`\n- Pass `inputMap` and `options` as keys in `args`: `{ 'inputMap' => inputMap, 'options' => options }`\n- Return a consistent response envelope instead of mutating `outMap`\n- Keep `call()` thin; delegate to the same internal methods with `(inputMap, options)` signature\n- Add tests for each action and unsupported action\n\n**Example migration (pattern)**:\n```apex\n\u002F\u002F BEFORE: VlocityOpenInterface2\nglobal class OrderOpenInterface implements omnistudio.VlocityOpenInterface2 {\n    global Boolean invokeMethod(String methodName, Map\u003CString, Object> input,\n                                Map\u003CString, Object> output,\n                                Map\u003CString, Object> options) {\n        if (methodName == 'createOrder') {\n            output.putAll(createOrder(input, options));\n            return true;\n        }\n        return false;\n    }\n}\n\n\u002F\u002F AFTER: System.Callable (same inputs: inputMap, options)\npublic with sharing class OrderCallable implements System.Callable {\n    public Object call(String action, Map\u003CString, Object> args) {\n        Map\u003CString, Object> inputMap = args != null ? (Map\u003CString, Object>) args.get('inputMap') : new Map\u003CString, Object>();\n        Map\u003CString, Object> options  = args != null ? (Map\u003CString, Object>) args.get('options')   : new Map\u003CString, Object>();\n        if (inputMap == null) { inputMap = new Map\u003CString, Object>(); }\n        if (options  == null) { options  = new Map\u003CString, Object>(); }\n\n        switch on action {\n            when 'createOrder' {\n                return createOrder(inputMap, options);\n            }\n            when else {\n                throw new IndustriesCallableException('Unsupported action: ' + action);\n            }\n        }\n    }\n}\n```\n\n---\n\n## Best Practices (120-Point Scoring)\n\n| Category | Points | Key Rules |\n|----------|--------|-----------|\n| **Contract & Dispatch** | 20 | Explicit action list; `switch on`; versioned action strings |\n| **Input Validation** | 20 | Required keys validated; types coerced safely; null guards |\n| **Security** | 20 | `with sharing`; CRUD\u002FFLS checks; `Security.stripInaccessible()` |\n| **Error Handling** | 15 | Typed exceptions; consistent error envelope; no empty catch |\n| **Bulkification & Limits** | 20 | No SOQL\u002FDML in loops; supports list inputs |\n| **Testing** | 15 | Positive\u002Fnegative\u002Fcontract\u002Fbulk tests |\n| **Documentation** | 10 | ApexDoc for class and action methods |\n\n**Thresholds**: ✅ 90+ (Ready) | ⚠️ 70-89 (Review) | ❌ \u003C70 (Block)\n\n---\n\n## ⛔ Guardrails (Mandatory)\n\nStop and ask the user if any of these would be introduced:\n- Dynamic method execution based on user input (no reflection)\n- SOQL\u002FDML inside loops\n- `without sharing` on callable classes\n- Silent failures (empty catch, swallowed exceptions)\n- Inconsistent response shapes across actions\n\n---\n\n## Common Anti-Patterns\n\n- `call()` contains business logic instead of delegating\n- Action names are unversioned or not documented\n- Input maps assumed to have keys without checks\n- Mixed response types (sometimes Map, sometimes String)\n- No tests for unsupported actions\n\n---\n\n## Cross-Skill Integration\n\n| Skill | When to Use | Example |\n|-------|-------------|---------|\n| sf-apex | General Apex work beyond callable implementations | \"Create trigger for Account\" |\n| sf-metadata | Verify object\u002Ffield availability before coding | \"Describe Product2\" |\n| sf-deploy | Validate\u002Fdeploy callable classes | \"Deploy to sandbox\" |\n\n---\n\n## Reference Skill\n\nUse the core Apex standards, testing patterns, and guardrails in:\n- [skills\u002Fsf-apex\u002FSKILL.md](..\u002Fsf-apex\u002FSKILL.md)\n\n---\n\n## Bundled Examples\n\n- [examples\u002FTest_QuoteByProductCallable\u002F](examples\u002FTest_QuoteByProductCallable\u002F) — read-only query example with `WITH USER_MODE`\n- [examples\u002FTest_VlocityOpenInterfaceConversion\u002F](examples\u002FTest_VlocityOpenInterfaceConversion\u002F) — migration from legacy `VlocityOpenInterface`\n- [examples\u002FTest_VlocityOpenInterface2Conversion\u002F](examples\u002FTest_VlocityOpenInterface2Conversion\u002F) — migration from `VlocityOpenInterface2`\n\n## Notes\n\n- Prefer deterministic, side-effect-aware callable actions\n- Keep action contracts stable; introduce new actions for breaking changes\n- Avoid long-running work in synchronous callables; use async when needed\n\n---\n",{"name":5,"license":15,"metadata":24,"description":28},{"author":25,"scoring":26,"version":27},"Shreyas Dhond","120 points across 7 categories","1.0.0","Salesforce Industries Common Core (OmniStudio\u002FVlocity) Apex callable generation and review with 120-point scoring. TRIGGER when: user creates or reviews System.Callable classes, migrates `VlocityOpenInterface` \u002F `VlocityOpenInterface2`, or builds Industries callable extensions used by OmniStudio, Integration Procedures, or DataRaptors. DO NOT TRIGGER when: generic Apex classes\u002Ftriggers (use sf-apex), building Integration Procedures (use sf-industry-commoncore-integration-procedure), authoring OmniScripts (use sf-industry-commoncore-omniscript), configuring Data Mappers (use sf-industry-commoncore-datamapper), or analyzing namespace\u002Fdependency issues (use sf-industry-commoncore-omnistudio-analyze).\n","main","8859218955d9504cd18b59e7892100718039d3b4","data\u002Fskills\u002Fjaganpro-sf-skills\u002Fsf-industry-commoncore-callable-apex\u002Fskills\u002Fsf-industry-commoncore-callable-apex",1,"https:\u002F\u002Fgithub.com\u002Fom-scogo\u002Fskillsh-scraper","https:\u002F\u002Fgithub.com\u002Fom-scogo","SDE-1 @ Scogo ","2026-07-18 12:22:46",{"source":8,"skillName":5,"commands":38,"prompt":48,"zipAvailable":49},[39,42,45],{"tool":40,"command":41},"npx","npx skills add om-scogo\u002Fskillsh-scraper --skill sf-industry-commoncore-callable-apex",{"tool":43,"command":44},"bunx","bunx skills add om-scogo\u002Fskillsh-scraper --skill sf-industry-commoncore-callable-apex",{"tool":46,"command":47},"pnpm","pnpm dlx skills add om-scogo\u002Fskillsh-scraper --skill sf-industry-commoncore-callable-apex","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002Fom-scogo\u002Fskillsh-scraper\u002Fblob\u002Fmain\u002Fdata\u002Fskills\u002Fjaganpro-sf-skills\u002Fsf-industry-commoncore-callable-apex\u002Fskills\u002Fsf-industry-commoncore-callable-apex\u002FSKILL.md",true,[],[52,59,64,71,76,83],{"skillNo":53,"name":54,"nameZh":6,"description":55,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":56,"categories":57,"keywords":58,"publishedAt":19},"01M7D6MC9FAAEV4CMNYX8W7JTG","arxiv-search","Search arXiv physics, math, and computer science preprints using natural language queries. Powered by Valyu semantic search.","https:\u002F\u002Fgithub.com\u002Fom-scogo\u002Fskillsh-scraper\u002Fblob\u002Fmain\u002Fdata\u002Fskills\u002Fyorkeccak-scientific-skills\u002Farxiv-search\u002Fskills\u002Farxiv-search\u002FSKILL.md",[],[],{"skillNo":60,"name":54,"nameZh":6,"description":55,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":61,"categories":62,"keywords":63,"publishedAt":19},"01M7D6M85CKKN87TA98VCQV4H7","https:\u002F\u002Fgithub.com\u002Fom-scogo\u002Fskillsh-scraper\u002Fblob\u002Fmain\u002Fdata\u002Fskills\u002Fyorkeccak-scientific-skills\u002Farxiv-search\u002FSkill.md",[],[],{"skillNo":65,"name":66,"nameZh":6,"description":67,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":68,"categories":69,"keywords":70,"publishedAt":19},"01M7D4ZTCS4DR3CE4JY06X84T2","working-with-legacy-code","Safely change and test untested codebases using Feathers' \"Working Effectively with Legacy Code\". Use when the user mentions \"legacy code\", \"no tests\", \"untested codebase\", \"how do I test this\", \"seams\", \"characterization tests\", \"golden master\", \"sprout method\", \"afraid to change this code\", \"monster method\", \"dependency breaking\", or \"inherited a messy codebase\". Also trigger when changing code without tests safely, getting a class under test when constructors, statics, or singletons block it, adding features to tangled modules, or planning incremental test coverage for an old codebase. Covers the legacy-code change algorithm, seams, characterization tests, sprout\u002Fwrap, and dependency-breaking techniques. For refactoring code that already has tests, see refactoring-patterns. For day-to-day code quality, see clean-code.","https:\u002F\u002Fgithub.com\u002Fom-scogo\u002Fskillsh-scraper\u002Fblob\u002Fmain\u002Fdata\u002Fskills\u002Fwondelai-skills\u002Fworking-with-legacy-code\u002Fworking-with-legacy-code\u002FSKILL.md",[],[],{"skillNo":72,"name":66,"nameZh":6,"description":67,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":73,"categories":74,"keywords":75,"publishedAt":19},"01M7D4ZHZKJD2RSNGAF63V14P4","https:\u002F\u002Fgithub.com\u002Fom-scogo\u002Fskillsh-scraper\u002Fblob\u002Fmain\u002Fdata\u002Fskills\u002Fwondelai-skills\u002Fworking-with-legacy-code\u002FSkill.md",[],[],{"skillNo":77,"name":78,"nameZh":6,"description":79,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":80,"categories":81,"keywords":82,"publishedAt":19},"01M7D4ZB4CJBFW5JE67CPH2QRV","web-typography","Select, pair, and implement typefaces for web projects. Use when the user mentions \"font pairing\", \"which typeface\", \"line height\", \"responsive typography\", \"web font loading\", \"type hierarchy\", \"variable fonts\", \"FOUT\u002FFOIT\", \"typographic scale\", or \"the text is hard to read\". Also trigger when choosing between system fonts and web fonts, optimizing font-loading performance, or designing readable long-form content. Covers readability evaluation, CSS implementation, and performance optimization. For overall UI design systems, see refactoring-ui. For dramatic typographic experiences, see top-design.","https:\u002F\u002Fgithub.com\u002Fom-scogo\u002Fskillsh-scraper\u002Fblob\u002Fmain\u002Fdata\u002Fskills\u002Fwondelai-skills\u002Fweb-typography\u002Fweb-typography\u002FSKILL.md",[],[],{"skillNo":84,"name":78,"nameZh":6,"description":79,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":85,"categories":86,"keywords":87,"publishedAt":19},"01M7D4Z4MVYVY3NMJ18BNV6WNA","https:\u002F\u002Fgithub.com\u002Fom-scogo\u002Fskillsh-scraper\u002Fblob\u002Fmain\u002Fdata\u002Fskills\u002Fwondelai-skills\u002Fweb-typography\u002FSkill.md",[],[]]