Loading

OmniScript Load Error on Experience Cloud: omniscriptError Undefined

Fecha de publicación: Jun 26, 2026
Descripción

This article explains why OmniScript fails to load on an Experience Cloud site with the error "Failed to find definition for dependency: runtime_omnistudio_omniscript/omniscriptError : undefined" and provides steps to restore normal execution.

This error occurs when a required OmniStudio runtime dependency does not load successfully during the browser session. The OmniScript cannot complete initialization and stops executing. The failure is typically transient — caused by a momentary browser, cache, or network condition — and does not consistently reproduce across users or sessions.

Salesforce OmniStudio includes built-in versioned static assets, cache management, and resilient runtime resource loading to reduce the frequency of this type of failure. However, transient conditions can occasionally prevent a required resource from loading during the initial application load, and recovery within the same browser session is limited without a page refresh.

Who is affected: Users running OmniScripts embedded in Experience Cloud (formerly Community Cloud) sites. The issue typically affects a single user in an isolated session rather than all users simultaneously.

Important: Refreshing the browser or clearing the cache during an active OmniScript session will discard any unsaved user input. Where possible, advise users to save progress before attempting recovery steps.

Solución

The following steps address the immediate error and reduce the likelihood of recurrence. Start with the quickest recovery actions before moving to site-level remediation.

Immediate recovery steps (perform in order):

  1. Refresh the browser page. This reloads all OmniStudio runtime bundles from the server. In most cases, this alone resolves the error. Confirm the OmniScript loads and the error no longer appears in the browser console.
  2. Clear the browser cache and reload. If a simple refresh does not resolve the issue, clear the browser cache to remove stale cached artifacts, then reload the page. Use a supported browser version (Chrome, Firefox, or Edge on their current stable releases) and a stable network connection.
  3. Republish the Experience Site. In Salesforce Setup, navigate to Digital Experiences, open the affected site in Experience Builder, and publish the site. This invalidates CDN caches and ensures users receive the latest runtime resources. Confirm the publish completes without errors.
  4. Deactivate and reactivate the affected OmniScript. In OmniStudio, open the OmniScript, deactivate it, then reactivate it. This triggers recompilation and refreshes the associated runtime metadata. Test the OmniScript on the Experience Site after reactivation to confirm it loads correctly.

 

Best practices to reduce future impact

• Enable Save for Later or Resume functionality in your OmniScript so users can recover their progress after a session interruption.
• Configure autosave on step navigation where your OmniScript implementation supports it.
• Break long OmniScript journeys into shorter, resumable flows to limit data loss if a transient failure occurs.
• Republish the Experience Site after any significant OmniStudio metadata changes, package upgrades, or org deployments to ensure the latest runtime resources are served from the CDN.

Número del artículo de conocimiento

005387748

 
Cargando
Salesforce Help | Article