---
schema_version: "1"
id: 91550d6eba0891f762add088a2da310118159edea53b89b0aee090a1e11b9ea7
title: Target URL and URL Parameters (Managed Package)
collection: admin
version: current
locale: en-us
portal_url: https://docs.salesforce.com/admin/current/en-us/xcloud/264-0-0/os_target_url_and_url_parameters.md
canonical_url: https://help.salesforce.com/s/articleView?id=xcloud.os_target_url_and_url_parameters.htm&release=264.0.0&type=5
source_site: help.salesforce.com
content_type: documentation
content_hash: a7515af56ec4f4a0bb2f6b9c46747f5ae3d164b6202ca61913c9f23891d8939a
description: For the managed package runtime, to launch Vlocity Omniscripts, Vlocity Cards components, web pages, or external applications from a Vlocity Action, enter an Apex page, or a URL with parameters as the Target URL. LWC components, such as LWC Omniscripts, LWC Cards, and Flexcards, are not URL addressable and so can't be accessed directly from a URL and must embedded on a page.
products:
  - Omnistudio
release: "264"
---
# Target URL and URL Parameters (Managed Package)

For the managed package runtime, to launch Vlocity Omniscripts, Vlocity Cards components, web pages, or external applications from a Vlocity Action, enter an Apex page, or a URL with parameters as the Target URL. LWC components, such as LWC Omniscripts, LWC Cards, and Flexcards, are not URL addressable and so can't be accessed directly from a URL and must embedded on a page.

![Managed Package app icon](https://sf-zdocs-cdn-prod.zoominsoftware.com/tdta-xcloud-omnistudio_for_managed_packages-264-0-0-production-enus/aa2554ec-624a-4ee6-8da4-6435670e6e62/resources-global/_corporate/images/managedpackageicon.png) This information is for Omnistudio for Managed Packages. For Omnistudio on standard runtime, see [Omnistudio Help](https://help.salesforce.com/s/articleView?id=xcloud.os_omnistudio_standard.htm&language=en_US).

![Important](https://sf-zdocs-cdn-prod.zoominsoftware.com/tdta-xcloud-omnistudio_for_managed_packages-264-0-0-production-enus/aa2554ec-624a-4ee6-8da4-6435670e6e62/images/icon_important.png)

Important

For out-of-the-box Vlocity Actions, such as **View Record**, the Target URL/{0} does not work outside of Salesforce Classic. To navigate to a page in Salesforce Lightning Experience, update the URL to /lightning/r/\[ObjectName\]/{0}/view, where `ObjectName` is the API name of the sObject such as Account.

## Available Visualforce Pages to Launch Omniscripts

Vlocity provides these Visualforce pages to launch Omniscripts:

- OmniScriptUniversalPage
- OmniScriptUniversalPageWHeader
- OmniScriptUniversalPageWHeaderSidebar.
- OmniScriptUniversalMobilePage (for use with Mobile only)
- OmniScriptUniveralPageConsole (for use in the Industry Console)
- OmniScriptUniversalCommunitiesPage (for use in Communities)

## Formatting the Target URL

For a Target URL that launches a Vlocity Card component or a Vlocity Omniscript, the first part of the URL is the apex page, followed by the PageName, such as `/apex/<PageName>`. The second part of the Target URL is a list of parameters defined in the **URL Parameters** field and is available to any URL types Vlocity Actions support, including web pages and external applications.

The following example shows how to format the URL:

```
//Example Target URL for launching an OmniScript 

/apexNS__[PageName]?id={0}#/OmniScriptType/AAA1/OmniScriptSubType/AAA2/OmniScriptLang/AAA3/layout/[LayoutName]/ContextId/{0}/PrefillDataRaptorBundle/[BundleName]/[verticalMode]

//Example Target URL for launching a Card component

/apex/NS__[PageName]?id={0}#/layout=[LayoutName]

//Example External URL

https://www.domainName.com/?id={0}/


```

Beginning with Vlocity Version 12, an alternative URL pattern is available:

```
//Example Target URL for launching an OmniScript 

/apexNS__[PageName]?id={0}&OmniScriptType=AAA1&OmniScriptSubType=AAA2&OmniScriptLang=AAA3&layout=[LayoutName]]&PrefillDataRaptorBundle=[BundleName]&scriptMode=[verticalMode]

//Example Target URL for launching a Card component

/apex/NS__[PageName]?id={0}&layout=[LayoutName]

//Example External URL

https://www.domainName.com/?id={0}/

```

![Note](https://sf-zdocs-cdn-prod.zoominsoftware.com/tdta-xcloud-omnistudio_for_managed_packages-264-0-0-production-enus/aa2554ec-624a-4ee6-8da4-6435670e6e62/images/icon_note.png)

Note

While both URL patterns are valid, the advantage of the alternative pattern is that it is mobile-friendly and enables adding additional URL parameters directly into the Omniscript Data JSON. For example, appending **&customerSLALevel=gold** to the URL would add a node to the root of the Omniscript Data JSON, such as **"customerSLALevel":"gold"**.

## Target URL Variable Descriptions

This table lists descriptions for the variables from the Target URL examples on this page:

<table class="slds-table slds-table_bordered slds-max-medium-table_stacked slds-m-bottom_small ">
        <colgroup>
          <col style="width:33.33333333333333%">
          <col style="width:33.33333333333333%">
          <col style="width:33.33333333333333%">
        </colgroup>
        <thead class="slds-text-title_caps ">
          <tr class="">
            <th scope="col" class="slds-cell-wrap" style="vertical-align:top;" id="d139938e170">
              <p style="margin-bottom:0;">Variable</p>
            </th>
            <th scope="col" class="slds-cell-wrap" style="vertical-align:top;" id="d139938e176">
              <p style="margin-bottom:0;">Description</p>
            </th>
            <th scope="col" class="slds-cell-wrap" style="vertical-align:top;" id="d139938e182">
              <p style="margin-bottom:0;">Available For</p>
            </th>
          </tr>
        </thead>
        <tbody>
          <tr class="">
            <td data-label="Variable" class="slds-cell-wrap" style="vertical-align:top;" headers="d139938e170 ">
              <p style="margin-bottom:0;"><strong class="uicontrol">NS</strong>__</p>
            </td>

            <td data-label="Description" class="slds-cell-wrap" style="vertical-align:top;" headers="d139938e176 ">
              <p style="margin-bottom:0;">Namespace of the installed package. Use when referencing a Universal Visualforce page.</p>
            </td>

            <td data-label="Available For" class="slds-cell-wrap" style="vertical-align:top;" headers="d139938e182 ">
              <p style="margin-bottom:0;">Omniscript, Card</p>
            </td>

          </tr>
          <tr class="">
            <td data-label="Variable" class="slds-cell-wrap" style="vertical-align:top;" headers="d139938e170 ">
              <p style="margin-bottom:0;">[<strong class="uicontrol">PageName</strong>]</p>
            </td>

            <td data-label="Description" class="slds-cell-wrap" style="vertical-align:top;" headers="d139938e176 ">
              <p style="margin-bottom:0;">Universal Visualforce page, OmniScriptUniversalPage, OmniScriptUniversalPageWHeader, OmniScriptUniversalPageWHeaderSidebar, or OmniScriptUniversalMobilePage) or another Visualforce page containing the Omniscript.</p>
            </td>

            <td data-label="Available For" class="slds-cell-wrap" style="vertical-align:top;" headers="d139938e182 ">
              <p style="margin-bottom:0;">Omniscript, Card</p>
            </td>

          </tr>
          <tr class="">
            <td data-label="Variable" class="slds-cell-wrap" style="vertical-align:top;" headers="d139938e170 ">
              <p style="margin-bottom:0;">
                <strong class="uicontrol">{0}</strong>
              </p>
            </td>

            <td data-label="Description" class="slds-cell-wrap" style="vertical-align:top;" headers="d139938e176 ">
              <p style="margin-bottom:0;">The first parameter listed in the URL Parameters field and is often the
                Context Id of an sObject. See <cite>URL Parameters</cite> on this
                page.</p>
            </td>

            <td data-label="Available For" class="slds-cell-wrap" style="vertical-align:top;" headers="d139938e182 ">
              <p style="margin-bottom:0;">Omniscript, Card</p>
            </td>

          </tr>
          <tr class="">
            <td data-label="Variable" class="slds-cell-wrap" style="vertical-align:top;" headers="d139938e170 ">
              <p style="margin-bottom:0;">
                <strong class="uicontrol">AAA1</strong>
              </p>
            </td>

            <td data-label="Description" class="slds-cell-wrap" style="vertical-align:top;" headers="d139938e176 ">
              <p style="margin-bottom:0;">Omniscript Type</p>
            </td>

            <td data-label="Available For" class="slds-cell-wrap" style="vertical-align:top;" headers="d139938e182 ">
              <p style="margin-bottom:0;">Omniscript</p>
            </td>

          </tr>
          <tr class="">
            <td data-label="Variable" class="slds-cell-wrap" style="vertical-align:top;" headers="d139938e170 ">
              <p style="margin-bottom:0;">
                <strong class="uicontrol">AAA2</strong>
              </p>
            </td>

            <td data-label="Description" class="slds-cell-wrap" style="vertical-align:top;" headers="d139938e176 ">
              <p style="margin-bottom:0;">Omniscript Sub Type</p>
            </td>

            <td data-label="Available For" class="slds-cell-wrap" style="vertical-align:top;" headers="d139938e182 ">
              <p style="margin-bottom:0;">Omniscript</p>
            </td>

          </tr>
          <tr class="">
            <td data-label="Variable" class="slds-cell-wrap" style="vertical-align:top;" headers="d139938e170 ">
              <p style="margin-bottom:0;">
                <strong class="uicontrol">AAA3</strong>
              </p>
            </td>

            <td data-label="Description" class="slds-cell-wrap" style="vertical-align:top;" headers="d139938e176 ">
              <p style="margin-bottom:0;">Omniscript Language</p>
            </td>

            <td data-label="Available For" class="slds-cell-wrap" style="vertical-align:top;" headers="d139938e182 ">
              <p style="margin-bottom:0;">Omniscript</p>
            </td>

          </tr>
          <tr class="">
            <td data-label="Variable" class="slds-cell-wrap" style="vertical-align:top;" headers="d139938e170 ">
              <p style="margin-bottom:0;">[<kbd>LayoutName</kbd>]</p>
            </td>

            <td data-label="Description" class="slds-cell-wrap" style="vertical-align:top;" headers="d139938e176 ">
              <ul>
                <li>
                  <p>(Optional) For Omniscript: <strong class="uicontrol">lightning</strong> or <strong class="uicontrol">Newport</strong>. Defines which layout theme to use. The default is lightning.</p>
                </li>

                <li>
                  <p>(Optional) For Card: Defines which card layout to use.</p>
                </li>

              </ul>
            </td>

            <td data-label="Available For" class="slds-cell-wrap" style="vertical-align:top;" headers="d139938e182 ">
              <p style="margin-bottom:0;">Omniscript, Card</p>
            </td>

          </tr>
          <tr class="">
            <td data-label="Variable" class="slds-cell-wrap" style="vertical-align:top;" headers="d139938e170 ">
              <p style="margin-bottom:0;">[<strong class="uicontrol">BundleName</strong>]</p>
            </td>

            <td data-label="Description" class="slds-cell-wrap" style="vertical-align:top;" headers="d139938e176 ">
              <p style="margin-bottom:0;">(Optional) Omnistudio Data Mapper Bundle name used for prefilling fields in the script.</p>
            </td>

            <td data-label="Available For" class="slds-cell-wrap" style="vertical-align:top;" headers="d139938e182 ">
              <p style="margin-bottom:0;">Omniscript</p>
            </td>

          </tr>
          <tr class="">
            <td data-label="Variable" class="slds-cell-wrap" style="vertical-align:top;" headers="d139938e170 ">
              <p style="margin-bottom:0;">[<strong class="uicontrol">verticalMode</strong>]</p>
            </td>

            <td data-label="Description" class="slds-cell-wrap" style="vertical-align:top;" headers="d139938e176 ">
              <p style="margin-bottom:0;">(Optional) <strong class="uicontrol">true</strong> or <strong class="uicontrol">false</strong>. If true, all the steps in an Omniscript are vertically stacked. If false, all the steps in an Omniscript are horizontally navigated. Default is true.</p>
            </td>

            <td data-label="Available For" class="slds-cell-wrap" style="vertical-align:top;" headers="d139938e182 ">
              <p style="margin-bottom:0;">Omniscript</p>
            </td>

          </tr>
        </tbody>
      </table>

## URL Parameters

In a Target URL, the {0} represents the indexed position of a parameter in the list of parameters in the **URL Parameter** field. The parameter is the field API name in the applicable object, such as AccountId, or ID in Contact.

Specify the parameters as a comma-delimited string, in the sequence in which you want to replace the parameters in the Target URL. For example, **AccountId,vlocity\_ins\_\_PrimaryContactId\_\_c**, replaces {0} in the Target URL with the AccountId, and replaces {1} in the Target URL with the vlocity\_ins\_\_PrimaryContactId\_\_c.

You can also use attributes from the User object, such as User.ContactId to get the Id of the current user.

![Note](https://sf-zdocs-cdn-prod.zoominsoftware.com/tdta-xcloud-omnistudio_for_managed_packages-264-0-0-production-enus/aa2554ec-624a-4ee6-8da4-6435670e6e62/images/icon_note.png)

Note

Beginning with CME Fall '18, Vlocity supports the Salesforce object edit URL format of /{3 character sobject prefix}/e'.

![example](https://sf-zdocs-cdn-prod.zoominsoftware.com/tdta-xcloud-omnistudio_for_managed_packages-264-0-0-production-enus/aa2554ec-624a-4ee6-8da4-6435670e6e62/images/icon_note.png)

example

URL Parameter Example

```
//Example Target URL for launching a Card component

/apex/vlocity_ins__OmniScriptUniversalPage?id={0}&OmniScriptType=AppointmentApplication&OmniScriptSubType=IndependentAgentAppointmentApplication&OmniScriptLang=English&layout=lightning

//Example Target URL for launching a Card component

/apex/NameSpace__ConsoleCards?id={0}&layout=lex-layout
```

## Navigating URLs in Lightning and Lightning Community

Navigating to Lightning pages and from Lightning Containers requires the relative path to have a prefix.

To use proper URL syntax, follow these requirements :

- To use relative URLs in the Lightning Console (LEX), prefix the **Target URL** with `ltng:`, and make sure the **Open URL in** value is set to **New Tab / Window** so that the relative URL link will open in a new window. For example, `ltng:/apex/NewLandingPage`, will open the New Landing Page in a new window.
- To redirect to a Lightning or Lightning Community Page, prefix the relative URL with `ltngpage:`. For example, `ltngpage:/Home` will redirect to your community home page.
- To open a Visualforce page from Salesforce's Lightning container, prefix the relative URL with `ltng:`. For example, `ltng:/apex/CustomVFPage`, will redirect to the CustomVFPage.