Skip to content
learning, Omniscript, Omnistudio

Best Practices To Follow for Omnistudio Omniscript

June 11, 2025

Are you looking for the Best Practices To Follow for Omnistudio Omniscript to build smooth and efficient OmniScripts? Here are some simple best practices to keep in mind. From cutting down on Conditional Views and merge fields to using cleaner naming and lighter JSON payloads—these tips will help your OmniScripts run faster, look cleaner, and be easier to manage.

Best Practices To Follow for Omnistudio Omniscript

Let’s break it down!

Limit use of Conditional Views

Problem: Excessive Conditional Views can negatively impact performance as the script needs to evaluate multiple conditions dynamically. 

Solution: 

  • Consolidate logic within DataRaptors, Integration Procedures, or Calculation Procedures instead of replicating conditions directly in the user interface.
  • Utilize Custom Lightning Web Components (LWCs) where complex conditional logic is required, instead of Conditional Views. 

Reduce Merge Fields Usage

Problem: Merge Fields ({data.fieldName} or {mergeCode} syntax) can increase processing load when they are overused, particularly in formulas or repeating structures. 

Solution: Use DataRaptors or Integration Procedures to pre-process and calculate data before rendering in Omniscript, reducing reliance on merge fields in the UI. 

Minimize Complex Formulas

Problem: Formulas in OmniScripts are evaluated in real-time, and overly complex formulas can slow down the performance. 

Solution: 

  1. Delegate calculations to Calculation Procedures, DataRaptors, or Integration Procedures. 
  1. Use simple formulas only for basic transformations (e.g., concatenating strings or basic math). 
  1. Pre-calculate derived values at the server side instead of calculating them dynamically in the script. 

Reduce Number of Elements in Omniscript 

Problem: A large number of elements increases the load time, making the user experience slower and less responsive. 

Solution: Single Omniscript should not have more than 200 components. 
Break down the OmniScript into smaller reusable Child OmniScripts for tasks like Address Capture, Payment Processing, or Document Upload. 

Element Naming Convention

Use Descriptive Names:Element names should clearly describe their purpose or function. Avoid generic names like Step1 or Input1.

Use Camel Case or Pascal Case:
Example: customerDetails, addressCapture, paymentProcessing. 

Avoid Spaces and Special Characters:

  • Use underscores (_) or camelCase instead of spaces. 
  • Example: FirstNameField or first_name_field. 

Use Prefixes/Suffixes for Context:

  • Add prefixes or suffixes to indicate the type or category of the element: 
  • Example: DR_getUserDetails-> DR Stands for Dataraptor 
  • IP_callAPI/callAPI_IP – > IP stands for Integration Procedure 
  • TXT_FirstName -> TXT stands for Text field in Omniscript.

Pass only Required JSON node.

If send JSON path is blank Vlocity OOTB as default sends full JSON structure to each remote call.  

Solution: 
While calling any action like Integration procedure ,Remote Action and Data Raptor send only required data. Select either Send only extra payload checkbox or pass send JSON path and Node. 

Note: Ensure that duplicate requests are avoided by sending the request either through SendJSONPath or Extra Payload, but not both.
VlocityNoRootNode-> If no node required to remove call. Pass null if there is no send JSON path.

Pass only Required JSON node.
Keep Reading

Related Articles and Resources

How to Call Integration Procedure and Data Mapper from Apex Class?
December 11, 2025

How to Call Integration Procedure and Data Mapper from Apex Class?

One of the most powerful aspects of OmniStudio in...

How Enterprises Are Using Revenue Cloud Advanced to Fix Broken Quote-to-Cash Pipelines?
January 12, 2026

How Enterprises Are Using Revenue Cloud Advanced to Fix Broken Quote-to-Cash Pipelines?

If you’ve spent the last three years watching your...

Working with Integration Procedure and FlexCards
October 27, 2024

Working with Integration Procedure and FlexCards

Things that we will cover Weather API — https://www...

Lightning Out 2.0 Salesforce Winter ’26: The Developer’s Guide to Embedding LWCs Beyond Salesforce
December 19, 2025

Lightning Out 2.0 Salesforce Winter ’26: The Developer’s Guide to Embedding LWCs Beyond Salesforce

When you’re building modern applications, you’...

Introduction to Salesforce Flows: The Game-Changer for Business Automation
October 6, 2025

Introduction to Salesforce Flows: The Game-Changer for Business Automation

Here’s a number that might make you pause: businesses lose...

How to do polling in LWC?
July 1, 2025

How to do polling in LWC?

How to do polling in LWC? Polling means repeatedly calling...