---
schema_version: "1"
id: ffa12252ab53b5b0358cea93844ad989ed17a22f41750b67d1847302f2af268d
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_1.md
canonical_url: https://help.salesforce.com/s/articleView?id=xcloud.os_target_url_and_url_parameters_1.htm&release=264.0.0&type=5
source_site: help.salesforce.com
content_type: documentation
content_hash: a061f5171cb85f135e3327761f41948aa13e4fe3bc15b651b7965f655b78d733
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.
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.

![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} doesn’t 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.

LWC components, such as LWC Omniscripts, LWC Cards, and Omnistudio Flexcards aren’t URL addressable and so can't be accessed directly from a URL and must be embedded on a page. See [Vlocity Actions (Managed Package)](https://help.salesforce.com/s/articleView?id=xcloud.os_vlocity_actions.htm&release=264.0.0&type=5 "For the managed package runtime, Vlocity Actions are automatically generated URLS that launch Vlocity Omniscripts, Vlocity Cards components, web pages, or external applications. Actions are typically specific to a given object type, such as Account, Contact, Policy, or Asset.").

## 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’s 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="d250559e180">
              <p style="margin-bottom:0;">Variable</p>
            </th>
            <th scope="col" class="slds-cell-wrap" style="vertical-align:top;" id="d250559e186">
              <p style="margin-bottom:0;">Description</p>
            </th>
            <th scope="col" class="slds-cell-wrap" style="vertical-align:top;" id="d250559e192">
              <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="d250559e180 ">
              <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="d250559e186 ">
              <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="d250559e192 ">
              <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="d250559e180 ">
              <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="d250559e186 ">
              <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="d250559e192 ">
              <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="d250559e180 ">
              <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="d250559e186 ">
              <p style="margin-bottom:0;">The first parameter listed in the URL Parameters field and is often the
                Context Id of an sObject. </p>
            </td>

            <td data-label="Available For" class="slds-cell-wrap" style="vertical-align:top;" headers="d250559e192 ">
              <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="d250559e180 ">
              <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="d250559e186 ">
              <p style="margin-bottom:0;">Omniscript Type</p>
            </td>

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

          </tr>
          <tr class="">
            <td data-label="Variable" class="slds-cell-wrap" style="vertical-align:top;" headers="d250559e180 ">
              <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="d250559e186 ">
              <p style="margin-bottom:0;">Omniscript Sub Type</p>
            </td>

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

          </tr>
          <tr class="">
            <td data-label="Variable" class="slds-cell-wrap" style="vertical-align:top;" headers="d250559e180 ">
              <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="d250559e186 ">
              <p style="margin-bottom:0;">Omniscript Language</p>
            </td>

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

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

            <td data-label="Description" class="slds-cell-wrap" style="vertical-align:top;" headers="d250559e186 ">
              <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="d250559e192 ">
              <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="d250559e180 ">
              <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="d250559e186 ">
              <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="d250559e192 ">
              <p style="margin-bottom:0;">Omniscript</p>
            </td>

          </tr>
          <tr class="">
            <td data-label="Variable" class="slds-cell-wrap" style="vertical-align:top;" headers="d250559e180 ">
              <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="d250559e186 ">
              <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="d250559e192 ">
              <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 opens in a new window. For example, `ltng:/apex/NewLandingPage`, opens 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.