Loading

OmniStudio OmniScript Wrapper Loads Wrong OmniScript in Console App

Publiceringsdatum: Aug 7, 2026
Beskrivning

Issue

In a Lightning console app, launching one OmniScript and then navigating to a record page that embeds a different OmniScript can load the first OmniScript instead of the intended one. The second OmniScript is embedded using the Vlocity LWC OmniScript Wrapper component.

Symptoms

  • OmniScript A is opened in a console app.
  • A navigate action moves the user to a page that embeds OmniScript B through the Vlocity LWC OmniScript Wrapper.
  • The record page renders OmniScript A instead of the expected OmniScript B.
Applies To
  • Salesforce OmniStudio — OmniScript.
  • OmniScripts embedded with the Vlocity LWC OmniScript Wrapper component.
  • Lightning console apps (multiple OmniScripts opened within the same console session).

Root Cause

The Vlocity LWC OmniScript Wrapper component has caching issues when running multiple OmniScripts in the same console app. When more than one OmniScript runs in the same console session, the wrapper can serve the previously loaded OmniScript instead of the one requested by the navigation action, so the earlier OmniScript is displayed on the new page.
Lösning

Use one of the following options to display the correct OmniScript.

Option 1 — Refresh the page

  1. When the wrong OmniScript appears, refresh the record page in the browser.
  2. Confirm the intended OmniScript now loads.
This clears the cached OmniScript immediately but does not prevent the issue from recurring, so it is best as a quick workaround.

Option 2 — Embed the generated OmniScript LWC directly

  1. Locate the Lightning web component that OmniStudio generated for the target OmniScript.
  2. Embed that generated component on the record page instead of the Vlocity LWC OmniScript Wrapper.
  3. Save and re-test the navigation flow to confirm the correct OmniScript loads.

Option 3 — Use a custom wrapper component

Create a simple custom LWC that includes only the target OmniScript and is configured for the utility bar. Because it references a single OmniScript, it does not exhibit the wrapper's multi-OmniScript caching behavior.
  1. Create a Lightning web component whose HTML template includes only the target OmniScript component.
     <template>
       <c-l-w-c-fix-my-street-english></c-l-w-c-fix-my-street-english>
     </template>
  2. In the component's js-meta.xml, set isExposed to true and declare the lightning__UtilityBar target.
     <?xml version="1.0" encoding="UTF-8"?>
     <LightningComponentBundle xmlns="http://soap.sforce.com/2006/04/metadata">
       <apiVersion>55.0</apiVersion>
       <isExposed>true</isExposed>
       <masterLabel>Sample Utility Bar Component</masterLabel>
       <description>This is a demo component.</description>
       <targets>
         <target>lightning__UtilityBar</target>
       </targets>
     </LightningComponentBundle>
  3. Deploy the component and add it where the OmniScript is needed.
  4. Save and re-test the navigation flow to confirm the correct OmniScript loads.

For details on configuring a component for the utility bar, see Configure a Component for the Utility Bar on Salesforce Developers.

Note: Replace c-l-w-c-fix-my-street-english with the kebab-case tag of your own generated OmniScript component, and set the apiVersion to the value your org uses.

Knowledge-artikelnummer

000395465

 
Laddar
Salesforce Help | Article