ApexSensei

Blog

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 Complete Guide: FlexCards, OmniScripts, DataRaptors, and Integration Procedures Explained

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:

ComponentWhat It IsPrimary Use Case
FlexCardsDynamic UI cardsDisplaying related data in a contextual panel
OmniScriptsGuided step-by-step processesStructured data entry, user workflows
DataRaptorsData read/write layerQuerying, transforming, and saving Salesforce data
Integration ProceduresBackend orchestrationCalling 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 input
  • TextArea — multi-line text
  • Number — numeric input with formatting
  • Date/DateTime — date pickers
  • Select / Multi-Select — dropdowns
  • Toggle — yes/no switches
  • File Upload — attach documents
  • Lookup — search and select Salesforce records
  • Address — address entry with validation

Display Elements:

  • Text Block — rich text, HTML, or conditional messaging
  • Disclosure — expandable content sections
  • Review — display read-only data

Action Elements:

  • DataRaptor Extract Action — fetch data mid-script
  • DataRaptor Transform/Load Action — save or transform data
  • Integration Procedure Action — call backend logic
  • Navigate — redirect to a URL or record
  • SetValues — set script variables programmatically

Structure Elements:

  • Step — a single page in the wizard
  • Step Group — reusable steps you can import across scripts
  • Conditional View — show/hide elements based on values
  • Loop 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).

TypePurpose
DataRaptor ExtractQuery Salesforce objects and return JSON
DataRaptor LoadCreate or update Salesforce records
DataRaptor TransformConvert data between structures (JSON transformations)
DataRaptor Turbo ExtractOptimized 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

ElementWhat It Does
DataRaptor ExtractFetch Salesforce data
DataRaptor LoadSave to Salesforce
DataRaptor TransformReshape JSON
HTTP ActionCall external REST/SOAP API
Remote ActionCall Apex class
Integration Procedure ActionCall another IP (composability)
Conditional BlockIf/then logic
Loop BlockIterate over list
Set ValuesAssign variables
Response ActionDefine 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:

  1. Trailhead: The OmniStudio module is the official starting point
  2. Developer Org: Sign up for a Salesforce Developer Edition with OmniStudio enabled (free)
  3. Build FlexCards first: They're the simplest component
  4. Then DataRaptors: Understanding the data layer makes everything else click
  5. Then Integration Procedures: The most powerful component
  6. 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. 💬

Practice Apex free on ApexSensei