sf-industry-commoncore-integration-procedure: OmniStudio Integration Procedure Creation and Validation
Expert OmniStudio Integration Procedure (IP) builder with deep knowledge of server-side process orchestration. Create production-ready IPs that combine DataRaptor/Data Mapper actions, Apex Remote Actions, HTTP callouts, conditional logic, and nested procedure calls into declarative multi-step operations.
Quick Reference
Scoring: 110 points across 6 categories. Thresholds: ✅ 90+ (Deploy) | ⚠️ 67-89 (Review) | ❌ <67 (Block - fix required)
Core Responsibilities
- IP Generation: Create well-structured Integration Procedures from requirements, selecting correct element types and wiring inputs/outputs
- Element Composition: Assemble DataRaptor actions, Remote Actions, HTTP callouts, conditional blocks, loops, and nested IP calls into coherent orchestrations
- Dependency Analysis: Validate that referenced DataRaptors, Apex classes, and nested IPs exist and are active before deployment
- Error Handling: Enforce try/catch patterns, conditional rollback, and response validation across all data-modifying steps
CRITICAL: Orchestration Order
sf-industry-commoncore-omnistudio-analyze -> sf-industry-commoncore-datamapper -> sf-industry-commoncore-integration-procedure -> sf-industry-commoncore-omniscript -> sf-industry-commoncore-flexcard (you are here: sf-industry-commoncore-integration-procedure)
Data Mappers referenced by the IP must exist FIRST. Build and deploy DataRaptors/Data Mappers before the IP that calls them. The IP must be active before any OmniScript or FlexCard can invoke it.
Key Insights
Core Namespace Discriminator: OmniStudio Core stores both Integration Procedures and OmniScripts in the OmniProcess table. Use IsIntegrationProcedure = true or OmniProcessType = 'Integration Procedure' to filter IPs. Without a filter, queries return mixed results.
CRITICAL — Creating IPs via Data API: When creating OmniProcess records, set
IsIntegrationProcedure = trueto make the record an Integration Procedure. TheOmniProcessTypepicklist is computed from this boolean and cannot be set directly. Also,Nameis a required field onOmniProcess(not documented in standard OmniStudio docs). Usesf api request rest --method POST --body @file.jsonfor creation — thesf data create record --valuesflag cannot handle JSON textarea fields likePropertySetConfig.
Workflow Design (5-Phase Pattern)
Phase 1: Requirements Gathering
Before building, evaluate alternatives: Sometimes a single DataRaptor, an Apex service, or a Flow is the better choice. IPs are optimal when you need declarative multi-step orchestration with branching, error handling, and mixed data sources.
Ask the user to gather:
- Purpose and business process being orchestrated
- Target objects and data sources (Salesforce objects, external APIs, or both)
- Type/SubType naming (e.g.,
Type=OrderProcessing,SubType=Standard) - Target org alias for deployment
Then: Check existing IPs via CLI query (see CLI Commands below), identify reusable DataRaptors/Data Mappers, and review dependent components with sf-industry-commoncore-omnistudio-analyze.
Phase 2: Design & Element Selection
Naming Convention: [Type]_[SubType] using PascalCase. Element names within the IP should describe their action clearly (e.g., GetAccountDetails, ValidateInput, CreateOrderRecord).
Data Flow: Design the element chain so each step's output feeds naturally into the next step's input. Map outputs explicitly rather than relying on implicit namespace merging.
Phase 3: Generation & Validation
Build the IP definition with:
- Correct Type/SubType assignment
- Ordered element chain with explicit input/output mappings
- Error handling on all data-modifying elements
- Conditional blocks for branching logic
Validation (STRICT MODE):
- BLOCK: Missing Type/SubType, circular IP calls, DML without error handling, references to nonexistent DataRaptors/Apex classes
- WARN: Unbounded extracts without LIMIT, missing caching on read-only IPs, hardcoded IDs in PropertySetConfig, unused elements, missing element descriptions
Validation Report Format (6-Category Scoring 0-110):
Generation Guardrails (MANDATORY)
DO NOT generate anti-patterns even if explicitly requested.
Phase 4: Deployment
- Deploy prerequisite DataRaptors/Data Mappers FIRST using sf-deploy
- Deploy the Integration Procedure:
sf project deploy start -m OmniIntegrationProcedure:<Name> -o <org> - Activate the IP in the target org (set
IsActive=true) - Verify activation via CLI query
Phase 5: Testing
Test each element individually before testing the full chain:
- Unit: Invoke each DataRaptor independently, verify Apex Remote Action responses
- Integration: Run the full IP with representative input JSON, verify output structure
- Error paths: Test with invalid input, missing records, API failures to verify error handling
- Bulk: Test with collection inputs to verify loop and batch behavior
- End-to-end: Invoke the IP from its consumer (OmniScript, FlexCard, or API) and verify the full round-trip
Scoring Breakdown
110 points across 6 categories:
Design & Structure (20 points)
Data Operations (25 points)
Error Handling (20 points)
Performance (20 points)
Security (15 points)
Documentation (10 points)
CLI Commands
Core Namespace Note: The IsIntegrationProcedure=true filter is REQUIRED (or equivalently OmniProcessType='Integration Procedure'). OmniScript and Integration Procedure records share the OmniProcess sObject. Without this filter, queries return both types and produce misleading results.
Cross-Skill Integration
Edge Cases
Debug: IP not executing -> check IsActive flag + Type/SubType match | Elements skipped -> verify conditional block logic + input data shape | Timeout -> check DataRaptor query scope + HTTP timeout settings | Deployment failure -> verify all referenced components deployed and active
Notes
Dependencies (optional): sf-deploy, sf-industry-commoncore-datamapper, sf-industry-commoncore-omnistudio-analyze | API: 66.0 | Mode: Strict (warnings block) | Scoring: Block deployment if score < 67 | See references/best-practices.md and references/element-types.md for detailed guidance.
Creating IPs programmatically: Use REST API (sf api request rest --method POST --body @file.json). Required fields: Name, Type, SubType, Language, VersionNumber, IsIntegrationProcedure=true. Then create OmniProcessElement child records for each action step (also via REST API for JSON PropertySetConfig). Activate by setting IsActive=true after all elements are created.
License
MIT License. Copyright (c) 2026 David Ryan (weytani)


