---
schema_version: "1"
id: 826b58d86bd2beaa3ee072d568c0a1ff6a17ed2eb837e5d23dc5688d63f949e2
title: Deploying Omniscripts to Cloud Application Platforms (Managed Package)
collection: admin
version: current
locale: en-us
portal_url: https://docs.salesforce.com/admin/current/en-us/xcloud/264-0-0/os_deploying_omniscripts_to_cloud_application_platforms.md
canonical_url: https://help.salesforce.com/s/articleView?id=xcloud.os_deploying_omniscripts_to_cloud_application_platforms.htm&release=264.0.0&type=5
source_site: help.salesforce.com
content_type: documentation
content_hash: 12a19e1c50082fc14abceea2fcfb913a53de91234574300d4e15d3eb544fa123
description: For the managed package runtime, Cloud Application Platforms host Omniscripts by connecting to Salesforce as a Connected App or as a standalone app. In the example Heroku deployment below, steps that are not exclusive to Heroku can be applied to most Cloud Application Platform deployments.
products:
  - Omnistudio
release: "264"
---
# Deploying Omniscripts to Cloud Application Platforms (Managed Package)

For the managed package runtime, Cloud Application Platforms host Omniscripts by connecting to Salesforce as a Connected App or as a standalone app. In the example Heroku deployment below, steps that are not exclusive to Heroku can be applied to most Cloud Application Platform deployments.

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

To deploy Omniscripts to Heroku and other Cloud Application Platforms:

1. Set up your developer account with [Heroku](https://signup.heroku.com/?c=70130000001x9jEAAQ).
2. Once the account is set up, download and install [Heroku CLI](https://devcenter.heroku.com/articles/heroku-cli).
3. In Salesforce, visit the Static Resources page and download **vlocityomniout.resource**.
4. Rename the file to .zip and unzip it to a folder.
5. Copy the **sample\_custom\_setting.js** file and rename the new file to **custom\_setting.js; you must apply all** custom modifications to the **custom\_setting.js** file. Heroku and Omniscript can be run in two different ways, either as a [Connected App](https://developer.salesforce.com/page/Connected_Apps) or as a standalone app. Standalone apps can be used if you do not wish to directly connect to Salesforce, you'll need to connect to your backend server in order for the app to function.
    
    - Connected App:
        
        1. Log into your Salesforce org and [create your Connected App](https://developer.salesforce.com/page/Connected_Apps). After creating an app, it can take up to ten minutes to take effect.
        2. Modify the following lines in the **custom\_setting.js** file:
            
            - `var CONNECTED_APP_CONSUMER_KEY = 'ConsumerKey';`
            - `var SFDC_NAMESPACE = 'vlocity_NS';`
    - Standalone App:
        
        1. Modify the **custom\_setting.js** file and uncomment the last two lines:
            
            `customVOmniAuth = function(scope){};`
        2. Modify the **index.html** file to the following:
            
            angular.module('miniApp', \["forceng", "vlocity-business-process"\])
            
            controller('ContactListCtrl', function ($scope, force, $location) {
            
            $scope.showLink = true;
            
            });
        3. In **index.html**, add links to launch different scripts. Add the link as an anchor tag to the template using the following syntax:
            
            `<a href="#/OmniScriptType/ExampleType/OmniScriptSubType/ExampleSubType/OmniScriptLang/English/ContextId//PrefillDataRaptorBundle//false" target="_self">Click Here</a>`
        4. To launch scripts from the links in your HTML file, include the script's definition in the scripts folder, file naming convention:
            
            `ScriptType_ScriptSubType_ScriptLang.json`
            
            If Script Type or ScriptSubType name has spaces in it, replace the spaces with an underscore.
6. Deploy to [Heroku using Git](https://devcenter.heroku.com/articles/git).
7. (Optional) To use a local Omniscript definition:
    
    Modify the **custom\_setting.js** file to include this boolean: `window.forceLocalDef = true`.
8. (Optional) Beginning with Vlocity Insurance Winter '19, User information for logged in Users can be retrieved by Omniscripts defined locally. To retrieve the User information:
    
    Modify the **custom\_setting.js** file to include this boolean: `window.callUserInfo = true`.
9. (Optional) Beginning with Vlocity Summer '19, Newport styling is supported. To add Newport styling to your Heroku deployment:
    
    1. Inside of **index.php**, rename **/index.html** to **/index\_newport.html**.
    2. Apply any modifications made to **/index.html** to **/index\_newport.html**.