Open Other Pages from Omniscripts with the Navigate Action

To open various Salesforce pages, apps, and resources from Omniscript, use the Navigate element.

  1. From the elements panel, drag the Navigate action element to the canvas.
    • If the Navigate Action renders in a Step, it becomes a clickable button.
    • If the Navigate Action is between Steps, it fires automatically.
  2. If the Navigate Action renders in a Step, select the button style.
    1. Determine the style of the button by selecting an SLDS Button variant.
      In addition to SLDS Button variants, you can select Link to render the Navigate Action as an HTML anchor tag.
    2. Display an SLDS Icon in the button.
      For example, to add the standard_account Icon, enter Standard:Account.
  3. If desired, replace the existing entry in the browser history by enabling the Replace property.
    If the Replace property is enabled, users can’t navigate back to the Omniscript.
    Note
    Note

    By default, a Navigate Action in a Console App opens the page reference type in a new subtab. If you use more than one Navigate Action, only the first navigation action redirects to a new tab. Even if the Replace property is disabled, subsequent Navigate Actions replace the tab.

    But if the Replace property is disabled, the page reference doesn’t replace existing entries in the browser history. Users can navigate back and forth between Omniscripts in the same tab.

    After a Navigate Action completes, the Steps and other Omniscript elements that follow it run. However, if the user navigates away from the Omniscript, an asynchronously invoked Integration Procedure stops running.

  4. To send messages from the Omniscript to separate Lightning web components, use Pub/Sub messages and add a message key-value pair.
    Each Navigate Action must pass all required parameters to subsequent Lightning web components. For example, the first Navigate Action passes the c__ContextId parameter to a second Omniscript as c__ContextId=ContextId. A Navigate Action in the second Omniscript passes the parameter to a third Omniscript as c__ContextId=%ContextId%. All Navigate Actions must continue to pass the parameter to subsequent Omniscripts for as long as the parameter is needed.
  5. Determine the Salesforce experience that the Navigate Action directs to by selecting a page reference type.

    PageReference Type

    Description

    Task Documentation

    App

    Direct users from an Omniscript to a standard App, a custom App, or a page within an App. Connected apps aren’t supported.

    Navigate to an App

    Component

    Navigate from an Omniscript to a Lightning web component.

    Navigate to a Component

    Current Page

    Trigger a page update on the Current Page after a user completes an Omniscript.

    Navigate to the Current Page

    Knowledge Article

    Display a Knowledge Article in an Omniscript.

    Navigate to a Knowledge Article

    Login or Logout

    Direct users from an Omniscript to a Community Login or Logout page.

    Navigate to an Experience Cloud Login or Logout

    Named Page

    Navigate from an Omniscript to a Named Page or a Community Named Page.

    Navigate to a Named Page or Community Named Page

    Navigation Item

    Navigate from an Omniscript to a page that displays mapped content on a CustomTab.

    Navigate to a Navigation Item

    Object

    Navigate from an Omniscript to a standard or custom Object page.

    Navigate to an Object Page

    Omniscript by pageReference Type

    Navigate to an Omniscript by using a page reference type.

    Navigate to an Omniscript by Using a Page Reference Type

    Omniscript by custom Lightning web component

    Navigate to an Omniscript by using a custom Lightning web component.

    Navigate to an Omniscript by Using a Custom Lightning Web Component

    Record

    Navigate from an Omniscript to a Record page.

    Navigate to a Record Page

    Record Relationship

    Navigate from an Omniscript to a page that interacts with a Record Relationship.

    Navigate to a Record Relationship Page

    Restart Omniscript

    Navigate to a new instance of the same Omniscript that resets the Omniscript data.

    Restart an Omniscript

    Web Page

    Open an external Web page from an Omniscript.

    Navigate to a Web Page

Navigate to an App

Direct users from an Omniscript to a standard app, custom app, or a page within an app with the App PageReference Type. Verify the app is available in the Salesforce App Launcher.

property description
Page Reference Type App
App Name Enter the appId, or enter the appDeveloperName with the appropriate namespace.

For appId, use the AppDefinition object's DurableId.

For appDeveloperName, use a concatenation of the app’s namespace and developer name. The app's namespace is standard, custom, or a managed package namespace. The Developer name is viewable in the App Manager. For more information on appDeveloperName, see PageReference Type

Syntax Examples:

Standard: standard__Account

Custom: vlocity_cmt__CustomAccountApp

Additional Parameters Enter JSON to specify the app page and additional attributes.

In the designer for a managed package, enter the JSON in the Target Parameters field. The Target Page field represents the App's pageRef property.

{"type": "standard__navItemPage","attributes": {"apiName": "standard__Account"}}

Navigate to an Experience Cloud Login or Logout

Direct users from an Omniscript to a Community Login or Logout page for authentication.

To preview an Omniscript with the community login, activate the Omniscript and place it in a Experience Cloud page. For more information, see Add Your Omniscript to a Lightning Page and Add Your Omniscript to an Experience Cloud Page.

property description
Page Reference Type Login
Action Login or Logout

Navigate to a Component

Navigate to Lightning web components from an Omniscript with the Component PageReference Type.

Property description
Page Reference Type Component
Component Name

Enter a component name in the format namespace__componentName, where namespace is the namespace in standard runtime.

For Omnistudio, the namespace is omnistudio. This field supports merge fields.

This field supports merge fields.

Additional Parameters

Pass additional target parameters by using a URL query string format. Parameters must have a c__ prefix. This field supports merge fields.

When navigating to a component in a console app, add a Console Tab Icon and a Console Tab Label by setting the c__tabIcon and c__tabLabel parameters. The c__tabIcon accepts SLDS Icon and c__tabLabel accepts plain text. For example, &c__tabLabel=Custom Label&c__tabIcon=standard:account renders the console tab shown in this example image.

Navigate to the Current Page

Update and navigate to the current page from an Omniscript by using the Current Page PageRefrence Type in a Navigate Action.

property description
Page Reference Type Current Page
Additional Parameters Apply updates to the current page by passing parameters that use a URL query string format.

In the designer for a managed package, add parameters to the Target Params field.

Parameters must have a c__ prefix. This field supports Merge fields.

For example, an Omniscript has 10 steps, and you insert a Navigate Action between Step 1 and Step 2 with the page reference type as Current Page and the target as c__step=Step7. At run time, clicking the Next button on Step 1 navigates the user to Step 7.

Navigate to a Knowledge Article

Display a Knowledge Article in an Omniscript by selecting the Navigate Action's Knowledge Article page reference type.

property description
Page Reference Type Knowledge Article
Article URL Enter the Knowledge Article's urlName. This field supports merge fields.
Article Type Enter the articleType API name. Find the articleType API Name by removing __kav from the API Name of the Knowledge Object.

Communities ignore Article Type.

Navigate to an Omniscript by Using a Page Reference Type

Navigate to an Omniscript page reference type. Omniscripts on Experience Cloud site pages must be accessed by using the Community Named Page page reference type.

property description
Page Reference Type Omniscript
Omniscript Layout Select how the Omnscript is styled.
Type

Sub Type

Language

As an Omniscript's name is defined by its Type, SubType, and Language, enter these value for the specific Omniscript to open.
Fields to Prefill Omniscript Pass parameters by using a URL query string format.

Parameters must have a c__ prefix. This field supports merge fields.

Example: c__firstName=%firstName%

Navigate to an Omniscript by Using a Custom Lightning Web Component

Navigate to an Omniscript by embedding the Omniscript in a custom Lightning web component. You can navigate to an Omniscript this way whether the Managed Package Runtime setting is enabled or disabled.

  1. Create a custom Lightning web component (LWC).
  2. Add this code to the appropriate button click handler in the component, replacing the type, subtype, language, and context ID with your values.
    pageReference = {
      type: 'standard__featurePage',
      attributes: {
        featureName: 'omnistudio',
        pageName: 'omniscript'
      },
      state: {
        omniscript__type: os_type,
        omniscript__subType: os_subtype,
        omniscript__language: os_language,
        omniscript__recordId: contextId
      }
    };
    
    this[NavigationMixin.GenerateUrl](pageReference).then(url => {
      window.open(url, "_blank");
    });

Navigate to a Named Page or Community Named Page

Direct users to a standard or Experience Cloud page.

property description
Page Reference Type Named Page

For an Experience Cloud page, select Community Named Page.

Page Name Enter the API for the page name. API Names for custom pages must include __c in the API Name. This field supports merge fields.

Navigate to a Navigation Item

Navigate from an Omniscript to a custom tab displaying mapped content with the Navigate Action Navigation Item PageReference Type.

property description
Page Reference Type Navigation Item
Tab Name Enter the Custom Tab's Tab Name and Namespace prefix with the format NS__TabName, where NS is the namespace of the Tab.

For more information on tabs, see Create Lightning Page Tabs. This field supports merge fields.

Navigate to an Object Page

Navigate from an Omniscript to an Object page by using the Navigate Action's Object page reference type.

property description
Page Reference Type Object
Object API Name Enter the API name of the object. This field supports Merge fields.
Action Select an action to invoke. The New action opens a modal dialogue.
Filter Name Enter the Id of the Object page. This field supports merge fields.

Navigate to a Record Page

Navigate from an Omniscript to a Record page by using Navigate Action's Record PageReference Type.

property description
Page Reference Type Record
Record ID Enter the record ID to navigate to. This field supports Merge fields.
Record Action Select a record action to invoke.

Clone and Edit actions open a modal dialogue.

Object API Name Enter the API name of the object. This field supports merge fields.

Navigate to a Record Relationship Page

Navigate from an Omniscript to pages interacting with a record relationship by using the Record Relationship page reference type.

property description
Page Reference Type Record Relationship
Record ID Enter the record ID to navigate to. This field supports Merge fields.
Object API Name Enter the API name of the object defining the Relationship. This field supports Merge fields.
Relationship Object API Name Enter the API name of the relationship.

Navigate to a Web Page

Navigate to a web page from an Omniscript with the Web Page PageReference Type.

property description
Page Reference Type Web Page
URL Enter the full URL for a web page.

For example, to navigate to Google, enter https://google.com.

The referring tab with the Omniscript is replaced. To refresh the web page, navigate to or reload the page.

Restart an Omniscript

Navigate a user to a new instance of the same Omniscript. Use this option to enable a user to start over or repeat a process. Place the Navigate Action in a step to render it as a button or outside of a step to run it automatically or conditionally.

property description
Page Reference Type Web Page

Time tracking and the Messaging Framework aren't supported options for this page reference type.

Conditional View Add a condition to run, or display, the action conditionally. See Conditionally Display Omniscript Elements.