---
schema_version: "1"
id: 4ea39b359017f4c20cb49bee8d7a2edb8259e31f2f5781f13b35cbcc1bfacc39
title: Use a Local Omniscript Definition in Adobe Experience Manager (Managed Package)
collection: admin
version: current
locale: en-us
portal_url: https://docs.salesforce.com/admin/current/en-us/xcloud/264-0-0/os_add_omniscript_to_page_in_aem_local_def.md
canonical_url: https://help.salesforce.com/s/articleView?id=xcloud.os_add_omniscript_to_page_in_aem_local_def.htm&release=264.0.0&type=5
source_site: help.salesforce.com
content_type: documentation
content_hash: 63d7526f6edf44dec2bfef88d5e89c78dec81394cbe61c0ead52dd5b22e4fe73
description: For the managed package runtime, after creating the Adobe Experience Manager (AEM) page, use a local Omniscript definition in AEM.
products:
  - Omnistudio
release: "264"
---
# Use a Local Omniscript Definition in Adobe Experience Manager (Managed Package)

For the managed package runtime, after creating the Adobe Experience Manager (AEM) page, use a local Omniscript definition in AEM.

![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).

1. From the AEM page, change the mode from **Design** back to **Edit**.
2. To add an Omniscript component, click **Drag Components Here**, click the **\+** icon, and select **Omniscript Universal**.
3. Configure the Omniscript Universal component by selecting the component, and clicking the configuration icon.
4. For the path, enter the query and path you use for your active Omniscript with the following exception:
    
    If it includes merge indicators such as, `{0}`, remove them, or replace them with hardcoded values.
5. (Optional) Apply Newport styling by adding the parameter layout=Newport to the path entered in the previous step. For more information on using Newport to customize templates, see [Branding Omniscripts and Cards Using Vlocity Newport Design System (Managed Package)](https://help.salesforce.com/s/articleView?id=xcloud.os_branding_omniscripts_and_cards_using_vlocity_newport_design_system.htm&release=264.0.0&type=5 "For the managed package runtime, customize the appearance and behavior of Omniscript elements and Card layouts using the Vlocity Newport Design System. Newport includes Storybook.js, a browser-based preview tool that enables you to see your changes in action.").
6. Enable AEM to use the Local Script Definition by using one of the following options:
    
    - **From the AEM GUI**: Click the checkbox labeled **Use Local Script Definition**.
    - **From CRXDE** : Navigate to **apps/vloc/clientlibs/ooutCustom/js**.
        
        - In the **custom\_settings.js** file enter this boolean: `window.forceLocalDef = true`.
        
        Don’t add the **Salesforce Cloud Services Authentication** component when using Omniscripts defined locally. If the Salesforce Cloud Services Authentication exists, the resulting Salesforce connection causes the page to ignore the local definition.

## Use a Local Omniscript Definition with Salesforce Cloud Services Authentication

Beginning with Vlocity Insurance Winter '19, Omniscripts defined locally can connect to the Salesforce backend using the Salesforce Cloud Services Authentication component.

1. From the AEM page, change the mode from Design back to **Edit**.
2. In Edit mode, click **Drag Components Here**, and click the **+** icon.
3. Connect the page to Salesforce by selecting the **Salesforce Cloud Services Authentication** component.
4. Configure the new component by selecting the component, and clicking the configuration icon.
5. In the Edit Dialog window, click the **Configuration** field, select the name of your Connected App, enter a **Salesforce Namespace Override**, and click **Save**.
6. To add an Omniscript component, click **Drag Components Here**, click the **+** icon, and select **Omniscript Universal**.
7. Configure the Omniscript Universal component by selecting the component, and clicking the configuration icon.
8. For the path, enter the query and path you use for your active Omniscript. However, if it includes merge indicators such as `{0}`, remove them or replace them with hardcoded values.
9. (Optional) Apply Newport styling by adding the parameter layout=Newport to the path entered in the previous step. For more information on using Newport to customize templates, see [Branding Omniscripts and Cards Using Vlocity Newport Design System (Managed Package)](https://help.salesforce.com/s/articleView?id=xcloud.os_branding_omniscripts_and_cards_using_vlocity_newport_design_system.htm&release=264.0.0&type=5 "For the managed package runtime, customize the appearance and behavior of Omniscript elements and Card layouts using the Vlocity Newport Design System. Newport includes Storybook.js, a browser-based preview tool that enables you to see your changes in action.").
10. Enable AEM to use the Local Script Definition by using one of these options:
    - From the AEM interface: Click **Use Local Script Definition**.
    - From CRXDE: Navigate to apps/vloc/clientlibs/ooutCustom/js. In the custom\_setting.js file enter this boolean: `window.forceLocalDef = true`.
11. (Optional) To retrieve User information for logged in users, in the custom\_setting.js file enter this boolean: `window.callUserInfo = true`.
12. Save your changes.