---
schema_version: "1"
id: 4077e04fedac3aedff1074a21cde0304f41d454401e58b701964a0a0aaf0e3d6
title: Use a local Omniscript Definition with Salesforce Cloud Services Authentication (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_sf_clloud.md
canonical_url: https://help.salesforce.com/s/articleView?id=xcloud.os_add_omniscript_to_page_in_aem_sf_clloud.htm&release=264.0.0&type=5
source_site: help.salesforce.com
content_type: documentation
content_hash: ba3d2de1a741cf874cd989fca0fdd5353f6b10d54a30a764a86a0bd0f8bc0c42
description: For the managed package runtime, beginning with Vlocity Insurance Winter '19, Omniscripts defined locally can connect to the Salesforce backend using the Salesforce Cloud Services Authentication component. Use a local Omniscript definition with Salesforce Cloud Services Authentication.
products:
  - Omnistudio
release: "264"
---
# Use a local Omniscript Definition with Salesforce Cloud Services Authentication (Managed Package)

For the managed package runtime, beginning with Vlocity Insurance Winter '19, Omniscripts defined locally can connect to the Salesforce backend using the **Salesforce Cloud Services Authentication** component. Use a local Omniscript definition with **Salesforce Cloud Services Authentication**.

![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. Once in **Edit** mode, click on **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 on the configuration icon.
5. In the **Edit Dialog** modal, 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 on **Drag Components Here**, click the **\+** icon, and select **Omniscript Universal**.
7. Configure the Omniscript Universal component by selecting the component, and clicking on the configuration icon.
8. For the path, enter the query and path you use for your active Omniscript with the following exception:
    
    If it includes merge indicators, e.g., `{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 the following options:
    
    - **From the AEM interface:** Click the checkbox labeled **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 the configuration.