How to Improve OmniScript Performance — Best Practices and Tips

Why OmniScript performance matters

OmniScript is a core part of the OmniStudio/Vlocity UI experience. Slow OmniScripts lead to poor user adoption, increased abandonment rates in guided interactions, and higher support costs. This guide provides practical, repeatable techniques to improve OmniScript performance — both front-end rendering and back-end data interactions.

Quick checklist (high-impact optimizations)

Start with these high-impact items that typically yield the largest improvements:

  • Use Integration Procedures instead of multiple DataRaptors where possible
  • Minimize the OmniScript JSON payload — remove unused fields and large arrays
  • Lazy-load UI elements and data (render only when needed)
  • Aggregate server calls into a single call (reduce round-trips)
  • Profile with browser DevTools and OmniStudio logs to find bottlenecks

Detailed strategies

1) Reduce server round-trips

Every server call (DataRaptor, Integration Procedure, HTTP action) adds latency. Combine multiple requests into a single Integration Procedure that returns all the data the OmniScript needs in one call. Use DataRaptor Extract/Transform inside Integration Procedures to keep logic server-side and reduce front-end processing.

2) Prefer Integration Procedures over multiple DataRaptors

Integration Procedures are designed for orchestration and are often much faster than firing multiple separate DataRaptor extracts. Use the Integration Procedure designer to sequence DataRaptors, Map responses, and perform conditional logic in one server operation.

3) Trim the OmniScript JSON

OmniScript definitions (the JSON used by the client) can grow large. Remove unused elements, reduce verbose labels where possible, and avoid embedding large static datasets. Keep only the fields you need for runtime. Smaller JSON => faster download & parsing.

4) Lazy load heavy sections

Defer rendering of rarely used groups or complex pages until the user navigates to them. Use the Conditional View and Post Action patterns to fetch data only when needed rather than pre-loading everything on initial load.

5) Optimize DataRaptor mappings and transforms

Keep DataRaptor mappings lean. Use DataRaptor Transform sparingly and perform heavy transformations inside Integration Procedures or server-side transforms. This reduces client-side processing and simplifies JSON payloads.

6) Use caching for static or slow-changing data

For lookup lists, picklist values, or reference data that changes infrequently, cache results in the browser or use a cache layer in the Integration Procedure (e.g., retrieve from a cached platform data source). Avoid fetching the same reference data on every interaction.

7) Reduce DOM complexity and component count

Minimize nested Group elements and conditional blocks that cause many reflows. Fewer components means less work for the renderer when state changes. Where possible, combine small adjacent elements and use repeaters efficiently.

8) Avoid heavy client-side JavaScript and excessive event wiring

Custom JS can introduce performance overhead. Optimize any JS used in Script Actions or Custom LWC by profiling and removing synchronous long-running logic. Use debouncing on input handlers and limit watchers on value changes.

9) Use asynchronous processing for long-running tasks

For operations that take time (large integrations, heavy calculations), consider offloading to asynchronous processes and returning a status to the OmniScript. Provide UX feedback (progress spinners) and poll for completion if needed.

10) Monitor and profile

Use browser DevTools (Network/Performance) and OmniStudio logs to measure: initial load time, API latency, CPU/time spent rendering, number of XHR/REST calls. Identify hotspots and iterate on the most expensive items first.

Sample pattern — combine calls with an Integration Procedure

Instead of calling two separate DataRaptors from the OmniScript, call one Integration Procedure that performs both extracts and returns a single JSON payload.

// pseudo-request: call Integration Procedure endpoint
fetch('/services/integration/v1/integrationProcedure/YourIPName', {
method: 'POST',
headers: { 'Content-Type': 'application/json' },
body: JSON.stringify({
input: { recordId: '001XXXXXXXXXXXX' }
})
})
.then(res => res.json())
.then(response => {
// response contains all data needed for the OmniScript
console.log(response);
});

Checklist for production readiness

  • Run performance tests in production-like data volumes
  • Measure before/after each optimization to ensure improvement
  • Document Integration Procedures so you can reuse optimized flows
  • Keep OmniScript definitions modular and reuse components

Conclusion

Optimizing OmniScript performance is a combination of reducing client-side payloads, consolidating server calls, and using the right tools (Integration Procedures, DataRaptors transforms, caching). Start with profiling to find the biggest bottlenecks, apply the high-impact changes first (IP consolidation, lazy loading), and iterate using measurement-driven improvements.