OmniStudio Complete Guide: FlexCards, OmniScripts, DataRaptors, and Integration Procedures Explained
By Firus Hanov · · 12 min read
Complete guide to Salesforce OmniStudio: FlexCards, OmniScripts, DataRaptors, and Integration Procedures explained with architecture examples and best practices.

OmniStudio is one of the most powerful — and most misunderstood — toolsets in the Salesforce ecosystem. Originally built by Vlocity and acquired by Salesforce in 2020, OmniStudio is now included in several Salesforce clouds including Health Cloud, Financial Services Cloud, Communications Cloud, and others.
If you're working in an industry cloud or you've seen FlexCards or OmniScripts in an org and wondered how they work — this guide is for you. I'm going to walk through every major OmniStudio component, what it does, when to use it, and how they all connect. 🔥
What is OmniStudio?
OmniStudio is a suite of low-code tools designed to build guided user interactions, dynamic UI components, and complex data integrations — without writing traditional Apex or LWC code (though you can extend it with both).
The four core components are:
| Component | What It Is | Primary Use Case |
|---|---|---|
| FlexCards | Dynamic UI cards | Displaying related data in a contextual panel |
| OmniScripts | Guided step-by-step processes | Structured data entry, user workflows |
| DataRaptors | Data read/write layer | Querying, transforming, and saving Salesforce data |
| Integration Procedures | Backend orchestration | Calling APIs, chaining logic, complex data operations |
These components work together like building blocks. A FlexCard displays data. A DataRaptor fetches that data. An OmniScript guides a user through a process. An Integration Procedure handles the backend work.
FlexCards: Dynamic Context-Aware UI Panels
What Are FlexCards?
FlexCards are display components that show structured information in card format. Think of them as smart info panels — they can show Salesforce data, call external APIs, include actions, and even embed other FlexCards or OmniScripts.
They appear on record pages, Experience Cloud sites, and mobile apps.
Key FlexCard Concepts
Data Sources: FlexCards can pull data from multiple sources:
- DataRaptor Extract — query Salesforce data
- Integration Procedure — complex data from multiple sources or external APIs
- Apex Remote — call an Apex class method
- SOQL — direct queries
Child Cards: A FlexCard can contain other FlexCards nested inside it. This lets you build composite UIs where each card handles one context.
Actions: FlexCards can include action buttons that launch OmniScripts, navigate to records, call APIs, or run Integration Procedures directly.
States: Conditional states let you show different content based on field values. For example: show a "Delinquent" warning panel if Account.Payment_Status__c = 'Overdue'.
FlexCard Architecture Example
Account FlexCard (parent)
├── Account Summary (header info)
├── Open Cases Child FlexCard
│ ├── Case list
│ └── "Create Case" action → Case Creation OmniScript
├── Recent Orders Child FlexCard
│ └── Order list from external ERP (via Integration Procedure)
└── Payment Status Child FlexCard
└── Shows warning state if overdue
When to Use FlexCards
- Displaying multi-source contextual information on a record page
- Building 360-degree customer views that include external data
- Creating action launchers for common workflows
- Replacing dense Visualforce pages with clean, modern card layouts
OmniScripts: Guided Step-by-Step Processes
What Are OmniScripts?
OmniScripts are guided process wizards — multi-step forms and workflows that walk users through complex interactions.
Common use cases:
- Customer onboarding flows
- Service case submission
- Quote generation wizards
- Address verification processes
- Claim submission workflows
OmniScript Components (Elements)
Input Elements:
Text— single-line text inputTextArea— multi-line textNumber— numeric input with formattingDate/DateTime— date pickersSelect/Multi-Select— dropdownsToggle— yes/no switchesFile Upload— attach documentsLookup— search and select Salesforce recordsAddress— address entry with validation
Display Elements:
Text Block— rich text, HTML, or conditional messagingDisclosure— expandable content sectionsReview— display read-only data
Action Elements:
DataRaptor Extract Action— fetch data mid-scriptDataRaptor Transform/Load Action— save or transform dataIntegration Procedure Action— call backend logicNavigate— redirect to a URL or recordSetValues— set script variables programmatically
Structure Elements:
Step— a single page in the wizardStep Group— reusable steps you can import across scriptsConditional View— show/hide elements based on valuesLoop Block— iterate over a list
OmniScript Data Flow
User fills Step 1 → Data stored in JSON context
User fills Step 2 → More data added to context
DataRaptor Action → Saves context data to Salesforce
Integration Procedure → Calls external API with context data
Navigate Action → Redirect to confirmation page
The "context" is the OmniScript's internal data structure — a JSON object that accumulates all user inputs and action results as the script runs.
Sample OmniScript Architecture: Case Creation
Step 1: Contact Lookup
└── Lookup element: Search for existing contact
└── DataRaptor Extract: Load contact's recent cases
Step 2: Issue Description
└── Select: Issue category
└── TextArea: Description
└── Conditional View: Show "Escalate?" toggle if category = 'Billing'
Step 3: Review & Submit
└── Review block: Show summary of inputs
└── DataRaptor Load Action: Create Case record
└── Integration Procedure Action: Send confirmation email
└── Navigate: Go to new Case record
DataRaptors: The Data Layer
What Are DataRaptors?
DataRaptors are the data access layer for OmniStudio. They handle reading data from Salesforce (Extract), writing data to Salesforce (Load), and transforming data between formats (Transform).
| Type | Purpose |
|---|---|
| DataRaptor Extract | Query Salesforce objects and return JSON |
| DataRaptor Load | Create or update Salesforce records |
| DataRaptor Transform | Convert data between structures (JSON transformations) |
| DataRaptor Turbo Extract | Optimized SOQL-based extract for performance |
DataRaptor Extract Example
A DataRaptor Extract to get an Account and its open Opportunities:
Object: Account
Filter by: Id = %accountId% (the input parameter)
Output JSON structure:
{
"AccountName": "Acme Corp",
"BillingCity": "San Francisco",
"Opportunities": [
{ "Name": "Deal A", "Amount": 25000, "CloseDate": "2026-06-30" }
]
}
DataRaptor Load Example
A DataRaptor Load to create a Case from OmniScript input:
OmniScript Context Path → Salesforce Field
caseDescription → Description
selectedCategory → Type
contactId → ContactId
DataRaptor Transform
Transforms let you reshape JSON without writing Apex. Common uses:
- Mapping external API responses to Salesforce field names
- Flattening nested JSON structures
- Building request payloads for outbound API calls
- Merging data from multiple sources
Integration Procedures: The Backend Orchestrator
What Are Integration Procedures?
Integration Procedures are the most powerful OmniStudio component. They run on the server and can:
- Call external REST/SOAP APIs
- Chain multiple DataRaptors together
- Call other Integration Procedures
- Call Apex classes
- Perform conditional logic
- Process loops over lists
- Handle errors and set response outputs
Think of Integration Procedures as "Apex without writing Apex" for data orchestration.
Integration Procedure Elements
| Element | What It Does |
|---|---|
DataRaptor Extract | Fetch Salesforce data |
DataRaptor Load | Save to Salesforce |
DataRaptor Transform | Reshape JSON |
HTTP Action | Call external REST/SOAP API |
Remote Action | Call Apex class |
Integration Procedure Action | Call another IP (composability) |
Conditional Block | If/then logic |
Loop Block | Iterate over list |
Set Values | Assign variables |
Response Action | Define what the IP returns |
Real-World Integration Procedure: Insurance Renewal
Input: policyId, renewalType
Step 1: DataRaptor Extract → Get Policy + Customer data
Step 2: DataRaptor Transform → Build renewal request payload
Step 3: HTTP Action → POST to Underwriting API → Get premium quote
Step 4: Conditional Block
└── If quote success:
└── DataRaptor Load → Create Renewal_Quote__c record
└── HTTP Action → POST to DocuSign → Generate renewal document
└── Response: { success: true, quoteId: ... }
└── If quote failure:
└── DataRaptor Load → Create Error_Log__c
└── Response: { success: false, errorMessage: ... }
This entire flow — Salesforce queries, external API calls, conditional logic, record creation — runs in a single Integration Procedure. No Apex required.
Calling an Integration Procedure from Apex
public class IntegrationProcedureInvoker {
public static Map<String, Object> invoke(
String ipName,
Map<String, Object> inputMap
) {
Map<String, Object> outputMap = new Map<String, Object>();
Map<String, Object> optionsMap = new Map<String, Object>();
omnistudio.IntegrationProcedureService ipService =
(omnistudio.IntegrationProcedureService)
omnistudio.IntegrationProcedureService.newInstance();
ipService.call(ipName, inputMap, outputMap, optionsMap);
return outputMap;
}
}
// Usage:
Map<String, Object> inputs = new Map<String, Object>{
'policyId' => policyId,
'renewalType' => 'Annual'
};
Map<String, Object> result = IntegrationProcedureInvoker.invoke('Insurance_RenewPolicy', inputs);
How the Components Work Together: A Complete Example
Scenario: A call center agent opens an Account record and needs to see recent service history and start a new service request.
FlexCard on Account page:
- Calls an Integration Procedure to fetch recent cases + open orders
- Displays them in organized card sections
- Has a "New Service Request" button
"New Service Request" button launches an OmniScript:
- Step 1: Auto-populates customer info (DataRaptor Extract)
- Step 2: Agent selects issue type and priority
- Step 3: Agent describes the issue
- Step 4: Review summary
- Submit: Triggers Integration Procedure that creates Case, assigns to right queue, and sends confirmation SMS via external API
All of this — from data display to guided process to backend orchestration — without a single line of Apex. That's the power of OmniStudio.
OmniStudio Best Practices
Performance
- Use DataRaptor Turbo Extract instead of standard Extract for high-volume reads
- Use Responsive FlexCards and OmniScripts for mobile compatibility
- Cache Integration Procedure results where data doesn't change frequently
Testing
- Use OmniScript Preview to test your scripts without deploying
- Use Integration Procedure Preview with test input JSON
- Test with realistic data volumes
Naming Conventions
Follow a consistent naming pattern:
- FlexCards:
ObjectName_ContextDescription(e.g.,Account_ServiceHistory) - OmniScripts:
Action_ObjectName(e.g.,Create_ServiceRequest) - DataRaptors:
Type_ObjectName_Description(e.g.,Extract_Account_WithCases) - Integration Procedures:
Domain_ActionDescription(e.g.,Insurance_RenewPolicy)
Where to Start Learning OmniStudio
If you're new to OmniStudio:
- Trailhead: The OmniStudio module is the official starting point
- Developer Org: Sign up for a Salesforce Developer Edition with OmniStudio enabled (free)
- Build FlexCards first: They're the simplest component
- Then DataRaptors: Understanding the data layer makes everything else click
- Then Integration Procedures: The most powerful component
- OmniScripts last: Once you understand the data layer, OmniScripts make complete sense
Summary
OmniStudio is a complete toolkit for building enterprise-grade Salesforce applications with minimal code:
- FlexCards — dynamic display components for contextual data
- OmniScripts — guided multi-step processes for users
- DataRaptors — read/write/transform data layer
- Integration Procedures — backend orchestration for complex logic and API integrations
These components work together to handle everything from simple record display to complex multi-system integrations.
Want hands-on OmniStudio training? Book a session with ApexSensei and I'll walk you through building your first FlexCard, DataRaptor, and Integration Procedure from scratch. Start practicing on ApexSensei →
Are you just getting started with OmniStudio or working in an Industry Cloud? Tell me your scenario in the comments. 💬