You are here:
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.
This information is for Omnistudio for Managed Packages. For Omnistudio on standard runtime, see Omnistudio Help.
To deploy Omniscripts to Heroku and other Cloud Application Platforms:
- Set up your developer account with Heroku.
- Once the account is set up, download and install Heroku CLI.
- In Salesforce, visit the Static Resources page and download vlocityomniout.resource.
- Rename the file to .zip and unzip it to a folder.
-
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 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:
-
Log into your Salesforce org and create your Connected App. After creating an app, it can take up to ten minutes to take effect.
-
Modify the following lines in the custom_setting.js file:
-
var CONNECTED_APP_CONSUMER_KEY = 'ConsumerKey'; -
var SFDC_NAMESPACE = 'vlocity_NS';
-
-
-
Standalone App:
-
Modify the custom_setting.js file and uncomment the last two lines:
customVOmniAuth = function(scope){}; -
Modify the index.html file to the following:
angular.module('miniApp', ["forceng", "vlocity-business-process"])
controller('ContactListCtrl', function ($scope, force, $location) {
$scope.showLink = true;
});
-
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> -
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.jsonIf Script Type or ScriptSubType name has spaces in it, replace the spaces with an underscore.
-
-
- Deploy to Heroku using Git.
-
(Optional) To use a local Omniscript definition:
Modify the custom_setting.js file to include this boolean:
window.forceLocalDef = true. -
(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. -
(Optional) Beginning with Vlocity Summer '19, Newport styling is supported. To add
Newport styling to your Heroku deployment:
-
Inside of index.php, rename /index.html to /index_newport.html.
-
Apply any modifications made to /index.html to /index_newport.html.
-

