OmniScript
This type extends the Metadata metadata type and inherits its fullName field.
File Suffix and Directory Location
OmniScript components have the suffix omniScript and are stored in the omniScripts folder.
Version
OmniScript components are available in API version 56.0 and later.
Special Access Rules
To use this metadata type, you must have an OmniStudio license and the Discovery Framework feature enabled in your Salesforce org.
Fields
Field Name | Description |
---|---|
customHtmlTemplates |
|
customJavaScript |
|
designerCustomizationType |
|
elementTypeComponentMapping |
|
isActive |
|
isIntegrationProcedure |
|
isMetadataCacheDisabled |
|
isOmniScriptEmbeddable |
|
isTestProcedure |
|
isWebCompEnabled |
|
language |
|
lastPreviewPage |
|
name |
|
namespace |
|
omniAssessmentTasks |
|
omniProcessElements |
|
omniProcessKey |
|
omniProcessType | |
overrideKey |
|
propertySetConfig |
|
questionDevName |
|
requiredPermission |
|
responseCacheType |
|
subType |
|
type |
|
uniqueName |
|
versionNumber |
|
webComponentKey |
|
OmniAssessmentTask
Represents the omni assessment tasks associated with the OmniScript.
Field Name | Description |
---|---|
name |
|
status | |
uniqueName |
|
OmniProcessElement
Represents the OmniScript element associated with the OmniScript.
Field Name | Description |
---|---|
childElements |
|
description |
|
designerCustomizationType |
|
discoveryFrameworkUsageType |
|
embeddedOmniScriptKey |
|
isActive |
|
isOmniScriptEmbeddable |
|
level |
|
name |
|
omniProcessVersionNumber |
|
parentElementName |
|
parentElementType |
|
propertySetConfig |
|
QuestionDevName |
|
sequenceNumber |
|
type |
|
uniqueIndex |
|
Declarative Metadata Sample Definition
The following is an example of a OmniScript component.
<?xml version="1.0" encoding="UTF-8"?>
<OmniScript
xmlns="http://soap.sforce.com/2006/04/metadata">
<elementTypeComponentMapping>{"ElementTypeToHTMLTemplateList":[]}</elementTypeComponentMapping>
<isActive>false</isActive>
<isIntegrationProcedure>false</isIntegrationProcedure>
<isMetadataCacheDisabled>false</isMetadataCacheDisabled>
<isOmniScriptEmbeddable>false</isOmniScriptEmbeddable>
<isTestProcedure>false</isTestProcedure>
<isWebCompEnabled>true</isWebCompEnabled>
<language>English</language>
<name>OS5</name>
<omniProcessElements>
<parentElementType></parentElementType>
<parentElementName></parentElementName>
<description>test</description>
<isActive>true</isActive>
<isOmniScriptEmbeddable>false</isOmniScriptEmbeddable>
<embeddedOmniScriptKey>key</embeddedOmniScriptKey>
<designerCustomizationType></designerCustomizationType>
<level>0.0</level>
<name>Step1</name>
<omniProcessVersionNumber>0.0</omniProcessVersionNumber>
<propertySetConfig>{"label":"Step 1","validationRequired":true,"previousLabel":"Previous","previousWidth":3,"nextLabel":"Next","nextWidth":3,"cancelLabel":"Cancel","cancelMessage":"Are you sure?","saveLabel":"Save for later","saveMessage":"Are you sure you want to save it for later?","completeLabel":"Complete","completeMessage":"Are you sure you want to complete the script?","instruction":"","showPersistentComponent":[true,false],"remoteClass":"","remoteMethod":"","remoteTimeout":30000,"remoteOptions":{},"knowledgeOptions":{"language":"English","publishStatus":"Online","keyword":"","dataCategoryCriteria":"","remoteTimeout":30000,"typeFilter":""},"show":null,"conditionType":"Hide if False","HTMLTemplateId":"","instructionKey":"","chartLabel":null,"allowSaveForLater":true,"errorMessage":{"custom":[],"default":null},"wpm":false,"ssm":false,"message":{},"pubsub":false,"businessCategory":"","businessEvent":""}</propertySetConfig>
<sequenceNumber>0.0</sequenceNumber>
<type>Step</type>
<questionDevName></questionDevName>
</omniProcessElements>
<omniProcessElements>
<isActive>true</isActive>
<level>0.0</level>
<name>Step2</name>
<omniProcessVersionNumber>0.0</omniProcessVersionNumber>
<isOmniScriptEmbeddable>false</isOmniScriptEmbeddable>
<propertySetConfig>{"label":"Step2","validationRequired":true,"previousLabel":"Previous","previousWidth":3,"nextLabel":"Next","nextWidth":3,"cancelLabel":"Cancel","cancelMessage":"Are you sure?","saveLabel":"Save for later","saveMessage":"Are you sure you want to save it for later?","completeLabel":"Complete","completeMessage":"Are you sure you want to complete the script?","instruction":"","showPersistentComponent":[true, false],"remoteClass":"","remoteMethod":"","remoteTimeout":30000,"remoteOptions":{},"knowledgeOptions":{"language":"English","publishStatus":"Online", "keyword":"","dataCategoryCriteria":"","remoteTimeout":30000,"typeFilter":""},"show":null,"conditionType":"Hide if False","HTMLTemplateId":"","instructionKey":"","chartLabel":null,"allowSaveForLater":true,"errorMessage":{"custom":[],"default":null},"wpm":false,"ssm":false,"message":{},"pubsub":false,"businessCategory":"","businessEvent":""}</propertySetConfig>
<sequenceNumber>1.0</sequenceNumber>
<type>Step</type>
<questionDevName></questionDevName>
</omniProcessElements>
<omniProcessElements>
<isActive>true</isActive>
<level>0.0</level>
<name>Step3</name>
<omniProcessVersionNumber>0.0</omniProcessVersionNumber>
<isOmniScriptEmbeddable>false</isOmniScriptEmbeddable>
<propertySetConfig>{"label":"Step3","validationRequired":true,"previousLabel":"Previous","previousWidth":3,"nextLabel":"Next","nextWidth":3,"cancelLabel":"Cancel","cancelMessage":"Are you sure?","saveLabel":"Save for later","saveMessage":"Are you sure you want to save it for later?","completeLabel":"Complete","completeMessage":"Are you sure you want to complete the script?","instruction":"","showPersistentComponent":[true, false],"remoteClass":"","remoteMethod":"","remoteTimeout":30000,"remoteOptions":{},"knowledgeOptions":{"language":"English","publishStatus":"Online", "keyword":"","dataCategoryCriteria":"","remoteTimeout":30000,"typeFilter":""},"show":null,"conditionType":"Hide if False","HTMLTemplateId":"","instructionKey":"","chartLabel":null,"allowSaveForLater":true,"errorMessage":{"custom":[],"default":null},"wpm":false,"ssm":false,"message":{},"pubsub":false,"businessCategory":"","businessEvent":""}</propertySetConfig>
<sequenceNumber>2.0</sequenceNumber>
<type>Step</type>
<questionDevName></questionDevName>
</omniProcessElements>
<omniProcessType>OmniScript</omniProcessType>
<propertySetConfig>{"persistentComponent":[{"render":false,"label":"","remoteClass":"","remoteMethod":"","remoteTimeout":30000,"remoteOptions":{"preTransformBundle":"","postTransformBundle":""},"preTransformBundle":"","postTransformBundle":"","sendJSONPath":"","sendJSONNode":"","responseJSONPath":"","responseJSONNode":"","id":"vlcCart","itemsKey":"cartItems","modalConfigurationSetting":{"modalHTMLTemplateId":"vlcProductConfig.html","modalController":"ModalProductCtrl","modalSize":"lg"}},{"render":false,"dispOutsideOmni":false,"label":"","remoteClass":"","remoteMethod":"","remoteTimeout":30000,"remoteOptions":{"preTransformBundle":"","postTransformBundle":""},"preTransformBundle":"","postTransformBundle":"","id":"vlcKnowledge","itemsKey":"knowledgeItems","modalConfigurationSetting":{"modalHTMLTemplateId":"","modalController":"","modalSize":"lg"}}],"allowSaveForLater":true,"saveNameTemplate":null,"saveExpireInDays":null,"saveForLaterRedirectPageName":"sflRedirect","saveForLaterRedirectTemplateUrl":"vlcSaveForLaterAcknowledge.html","saveContentEncoded":false,"saveObjectId":"%ContextId%","saveURLPatterns":{},"autoSaveOnStepNext":false,"elementTypeToHTMLTemplateMapping":{},"seedDataJSON":{},"trackingCustomData":{},"enableKnowledge":false,"bLK":false,"lkObjName":null,"knowledgeArticleTypeQueryFieldsMap":{},"timeTracking":false,"hideStepChart":false,"mergeSavedData":false,"visualforcePagesAvailableInPreview":{},"cancelType":"SObject","allowCancel":true,"cancelSource":"%ContextId%","cancelRedirectPageName":"OmniScriptCancelled","cancelRedirectTemplateUrl":"vlcCancelled.html","consoleTabLabel":"New","wpm":false,"ssm":false,"message":{},"pubsub":false,"autoFocus":false,"currencyCode":"","showInputWidth":false,"rtpSeed":false,"consoleTabTitle":null,"consoleTabIcon":"custom:custom18","errorMessage":{"custom":[]},"stylesheet":{"newport":"","lightning":"","newportRtl":"","lightningRtl":""},"stepChartPlacement":"right","disableUnloadWarn":true,"scrollBehavior":"auto","currentLanguage":"en_US"}</propertySetConfig>
<subType>SBT5</subType>
<type>Type5</type>
<omniProcessKey>Type5_SBT5</omniProcessKey>
<uniqueName>Type5_SBT5_English_1</uniqueName>
<versionNumber>1.0</versionNumber>
<nameSpace></nameSpace>
<lastPreviewPage>LastPage</lastPreviewPage>
<customHtmlTemplates></customHtmlTemplates>
<customJavaScript></customJavaScript>
<description>TestOS</description>
<requiredPermission>OmniStudioAdmin</requiredPermission>
<responseCacheType>Org Cache</responseCacheType>
<designerCustomizationType></designerCustomizationType>
<webComponentKey>WebComponentKey</webComponentKey>
<overrideKey></overrideKey>
</OmniScript>
The following is an example package.xml that references the previous definition.
<?xml version="1.0" encoding="UTF-8"?>
<Package
xmlns="http://soap.sforce.com/2006/04/metadata">
<types>
<members>*</members>
<name>OmniScript</name>
</types>
<version>63.0</version>
</Package>
Wildcard Support in the Manifest File
This metadata type supports the wildcard character * (asterisk) in the package.xml manifest file. For information about using the manifest file, see Deploying and Retrieving Metadata with the Zip File.
Usage Type
Before you retrieve or deploy Discovery Framework OmniScripts, we recommend that you review these considerations.
- If the DesignerCustomizationType of the OmniScript is discoveryframework, then the questions in the OmniScript must be within the <uniqueIndex> tag in the metadata definition file.
- When deploying the OmniScript of type Discovery Framework, enable Discovery Framework Metadata Enabled setting.
- OmniScripts of type Discovery Framework don't support IDX Workbench.
- If any question associated with the OmniScript doesn’t exist in the target org or, if the active version of that question doesn’t exist in the target org, then deploying the OmniScript fails.