OmniScript
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
assessmentDefinitionMetadata
- Field Type: AssessmentDefinitionMetadata[]
- Description: Metadata associated with an assessment definition. Available in API version 64.0 and later.
customHtmlTemplates
- Field Type: string
- Description: The angular OmniScript template definitions.
customJavaScript
- Field Type: string
- Description: The custom JavaScript used for an OmniScript.
designerCustomizationType
- Field Type: string
- Description: The Omnistudio designer customization type.
elementTypeComponentMapping
- Field Type: string
- Description: Overrides all elements of one type with a custom Lightning web component by mapping the element type to the Custom LWC.
isActive
- Field Type: boolean
- Description: Indicates whether the OmniScript is active (true) or not (false).
- Default value: false
isIntegrationProcedure
- Field Type: boolean
- Description: Indicates whether OmniScript is an Integration Procedure (true) or OmniScript metadata (false).
- Default value: false
isManagedUsingStdDesigner
- Field Type: boolean
- Description: Indicates whether Omniscript is managed using standard designer (true) or not (false). Available in API version 64.0 and later.
isMetadataCacheDisabled
- Field Type: boolean
- Description: Indicates whether metadata cache for the integration procedure is disabled (true) or not (false).
- Default value: false
isOmniScriptEmbeddable
- Field Type: boolean
- Description: Indicates whether the OmniScript can be embedded in other OmniScripts (true) or not (false).
- Default value: false
isTestProcedure
- Field Type: boolean
- Description: Indicates whether OmniScript is a test procedure setting (true) or not (false).
- Default value: false
isWebCompEnabled
- Field Type: boolean
- Description: Indicates whether web component OmniScript (not Angular) is enabled (true) or not (false).
- Default value: false
language
- Field Type: string
-
Description: Required.
The language of the OmniScript.
lastPreviewPage
- Field Type: string
- Description: The last page previewed in the OmniScript designer.
name
- Field Type: string
-
Description: Required.
The name of the OmniScript.
namespace
- Field Type: string
- Description: The namespace associated with this OmniScript record.
omniAssessmentTasks
- Field Type: OmniAssessmentTaskMetadata[]
-
Description: The omniAssessmentTasks associated with the OmniScript. Available in API version 63.0
and later.
This field is available only if the Dynamic Assessment Access license is enabled.
omniProcessElements
- Field Type: OmniProcessElement[]
- Description: The OmniProcessElements associated with the OmniScript.
omniProcessKey
- Field Type: string
- Description: The integration procedure Type_SubType value.
omniProcessType
overrideKey
- Field Type: string
- Description: Reserved for future use.
propertySetConfig
- Field Type: string
- Description: The configuration information associated with the OmniScript.
uniqueIndex
- Field Type: string
-
Description: The developer name of the assessment question in the
OmniScript.
This field is relevant only for Omniscripts with designerCustomizationType as discoveryframework.
requiredPermission
- Field Type: string
- Description: The required permissions to execute the integration procedure.
responseCacheType
- Field Type: string
- Description: Response cache used for the integration procedure (session or Org).
subType
- Field Type: string
-
Description: Required.
The OmniScript sub type value.
type
- Field Type: string
-
Description: Required.
The OmniScript type value.
uniqueName
- Field Type: string
-
Description: Required.
The unique name for the OmniScript as Type_SubType_Language_VersionNumber.
versionNumber
- Field Type: string
-
Description: Required.
The OmniScript version number.
webComponentKey
- Field Type: string
- Description: Internal unique key for the generated Lightning Web Components (LWC).
AssessmentDefinitionMetadata
Represents the metadata associated with the assessment definition.
approvalDateTime
- Field Type: dateTime
- Description: The date and time when this version of the assessment definition was approved.
displayType
- Field Type: string
- Description: The way this assessment is displayed in a user interface.
effectiveFromDate
- Field Type: dateTime
- Description: The date and time from which the assessment definition becomes active and can be used.
effectiveToDate
- Field Type: dateTime
- Description: The date and time until when this assessment definition is effective.
lastRevisedDateTime
- Field Type: dateTime
- Description: The date and time when this assessment definition was last modified.
performerType
- Field Type: string
- Description: The type of user, role, or system qualified or intended to complete the assessment.
purpose
- Field Type: string
- Description: Reason for the assessment.
OmniAssessmentTaskMetadata
Represents the omni assessment tasks associated with the OmniScript.
name
- Field Type: string
- Description: Required. The name of the omni assessment task.
status
uniqueName
- Field Type: string
- Description: A unique name for the omni assessment task.
OmniProcessElement
Represents the OmniScript element associated with the OmniScript.
childElements
- Field Type: OmniProcessElement[]
- Description: The child elements associated with the OmniProcessElement.
description
- Field Type: string
- Description: The description of the OmniProcessElement.
designerCustomizationType
- Field Type: string
-
Description: The Omnistudio designer customization type.
To create assessment questions using the Discovery Framework feature, use the customization type as discoveryframework.
discoveryFrameworkUsageType
- Field Type: string
- Description: The usage type for industries that use the Discovery Framework. For example, the value for Health Cloud is HcUsageType. The value for no specific industry is Default.
embeddedOmniScriptKey
- Field Type: string
- Description: The ID of the embedded OmniScript
isActive
- Field Type: boolean
- Description: Indicates whether the status of the OmniProcessElement is active (true) or not (false).
isOmniScriptEmbeddable
- Field Type: boolean
- Description: Indicates whether the OmniScript with the OmniProcessElement can be embedded in other OmniScripts (true) or not (false).
level
- Field Type: double
- Description: The vertical level in which the OmniProcessElement occurs on the OmniScript.
name
- Field Type: string
-
Description: Required.
The name of the OmniProcessElement.
omniProcessVersionNumber
- Field Type: double
- Description: The related OmniProcess version.
parentElementName
- Field Type: string
- Description: The name of the parent OmniProcessElement.
parentElementType
- Field Type: string
- Description: The type of the parent OmniProcessElement.
propertySetConfig
- Field Type: textarea
- Description: The property set of the OmniProcessElement.
sequenceNumber
- Field Type: double
- Description: The horizontal level in which the OmniProcessElement occurs on the OmniScript.
type
- Field Type: string
- Description: The OmniProcessElement type. For example, Text and TextArea.
uniqueIndex
- Field Type: string
-
Description: The developer name of the assessment question in the
OmniScript.
This field is relevant only for Omniscripts with designerCustomizationType as discoveryframework.
Declarative Metadata Sample Definition
Here’s an example of an Omniscript component.
1<?xml version="1.0" encoding="UTF-8"?>
2<OmniScript
3 xmlns="http://soap.sforce.com/2006/04/metadata">
4 <designerCustomizationType>Discovery Framework</designerCustomizationType>
5 <discoveryFrameworkUsageType>0</discoveryFrameworkUsageType>
6 <elementTypeComponentMapping>{"ElementTypeToHTMLTemplateList":[]}</elementTypeComponentMapping>
7 <isActive>false</isActive>
8 <isIntegrationProcedure>false</isIntegrationProcedure>
9 <isManagedUsingStdDesigner>false</isManagedUsingStdDesigner>
10 <isMetadataCacheDisabled>false</isMetadataCacheDisabled>
11 <isOmniScriptEmbeddable>false</isOmniScriptEmbeddable>
12 <isTestProcedure>false</isTestProcedure>
13 <isWebCompEnabled>true</isWebCompEnabled>
14 <language>English</language>
15 <name>Base Discovery Framework</name>
16 <omniProcessElements>
17 <discoveryFrameworkUsageType>0</discoveryFrameworkUsageType>
18 <isActive>true</isActive>
19 <isOmniScriptEmbeddable>false</isOmniScriptEmbeddable>
20 <level>0.0</level>
21 <name>Save-Responses</name>
22 <omniProcessVersionNumber>0.0</omniProcessVersionNumber>
23 <propertySetConfig>{"controlWidth":12,"label":"Save","remoteClass":"discoveryfrmwrk.StoreResponses","remoteMethod":"invokeMethod","remoteOptions":{"preTransformBundle":"","postTransformBundle":""},"remoteTimeout":30000,"preTransformBundle":"","postTransformBundle":"","sendJSONPath":"","sendJSONNode":"","responseJSONPath":"","responseJSONNode":"","extraPayload":{},"inProgressMessage":"In Progress","postMessage":"Submitted Successfully","failureNextLabel":"Continue","failureAbortLabel":"Abort","failureGoBackLabel":"Go Back","failureAbortMessage":"Are you sure?","validationRequired":"Step","redirectPageName":"","redirectTemplateUrl":"vlcAcknowledge.html","redirectNextLabel":"Next","redirectNextWidth":3,"redirectPreviousLabel":"Previous","redirectPreviousWidth":3,"showPersistentComponent":[true,false],"show":null,"HTMLTemplateId":"","wpm":false,"ssm":false,"message":{},"pubsub":false,"svgSprite":"","svgIcon":"","errorMessage":{"custom":[],"default":null},"enableDefaultAbort":false,"enableActionMessage":false,"useContinuation":false,"businessCategory":"","businessEvent":""}</propertySetConfig>
24 <sequenceNumber>1.0</sequenceNumber>
25 <type>Remote Action</type>
26 </omniProcessElements>
27 <omniProcessElements>
28 <childElements>
29 <designerCustomizationType>Discovery Framework</designerCustomizationType>
30 <discoveryFrameworkUsageType>0</discoveryFrameworkUsageType>
31 <isActive>true</isActive>
32 <isOmniScriptEmbeddable>false</isOmniScriptEmbeddable>
33 <level>1.0</level>
34 <name>Age</name>
35 <omniProcessVersionNumber>0.0</omniProcessVersionNumber>
36 <propertySetConfig>{"controlWidth":12.0,"label":"Age v5","showInputWidth":false,"inputWidth":12.0,"required":false,"repeat":false,"repeatClone":false,"repeatLimit":null,"readOnly":false,"defaultValue":null,"help":false,"helpText":"","pattern":"","ptrnErrText":"","placeholder":"","mask":null,"show":null,"conditionType":"Hide if False","accessibleInFutureSteps":false,"debounceValue":0.0,"HTMLTemplateId":"","hide":false,"disOnTplt":false}</propertySetConfig>
37 <sequenceNumber>2.0</sequenceNumber>
38 <type>Number</type>
39 <uniqueIndex>Age</uniqueIndex>
40 </childElements>
41 <childElements>
42 <designerCustomizationType>Discovery Framework</designerCustomizationType>
43 <discoveryFrameworkUsageType>0</discoveryFrameworkUsageType>
44 <isActive>true</isActive>
45 <isOmniScriptEmbeddable>false</isOmniScriptEmbeddable>
46 <level>1.0</level>
47 <name>First_Name</name>
48 <omniProcessVersionNumber>0.0</omniProcessVersionNumber>
49 <propertySetConfig>{"controlWidth":12.0,"label":"First Name","showInputWidth":false,"inputWidth":12.0,"required":false,"repeat":false,"repeatClone":false,"repeatLimit":null,"readOnly":false,"defaultValue":null,"help":false,"helpText":"","mask":"","pattern":"","ptrnErrText":"","minLength":0.0,"maxLength":255.0,"placeholder":"","show":null,"conditionType":"Hide if False","accessibleInFutureSteps":false,"debounceValue":0.0,"HTMLTemplateId":"","hide":false,"disOnTplt":false}</propertySetConfig>
50 <sequenceNumber>0.0</sequenceNumber>
51 <type>Text</type>
52 <uniqueIndex>First_Name</uniqueIndex>
53 </childElements>
54 <childElements>
55 <designerCustomizationType>Discovery Framework</designerCustomizationType>
56 <discoveryFrameworkUsageType>0</discoveryFrameworkUsageType>
57 <isActive>true</isActive>
58 <isOmniScriptEmbeddable>false</isOmniScriptEmbeddable>
59 <level>1.0</level>
60 <name>Last_Name</name>
61 <omniProcessVersionNumber>0.0</omniProcessVersionNumber>
62 <propertySetConfig>{"controlWidth":12.0,"label":"Last Name","showInputWidth":false,"inputWidth":12.0,"required":false,"repeat":false,"repeatClone":false,"repeatLimit":null,"readOnly":false,"defaultValue":null,"help":false,"helpText":"","mask":"","pattern":"","ptrnErrText":"","minLength":0.0,"maxLength":255.0,"placeholder":"","show":null,"conditionType":"Hide if False","accessibleInFutureSteps":false,"debounceValue":0.0,"HTMLTemplateId":"","hide":false,"disOnTplt":false}</propertySetConfig>
63 <sequenceNumber>1.0</sequenceNumber>
64 <type>Text</type>
65 <uniqueIndex>Last_Name</uniqueIndex>
66 </childElements>
67 <designerCustomizationType>Discovery Framework</designerCustomizationType>
68 <discoveryFrameworkUsageType>0</discoveryFrameworkUsageType>
69 <isActive>true</isActive>
70 <isOmniScriptEmbeddable>false</isOmniScriptEmbeddable>
71 <level>0.0</level>
72 <name>Step1</name>
73 <omniProcessVersionNumber>0.0</omniProcessVersionNumber>
74 <propertySetConfig>{"label":"Base Discovery Framework","validationRequired":true,"previousLabel":"Previous","previousWidth":3,"nextLabel":"Enter","nextWidth":3,"cancelLabel":"Cancel","cancelMessage":"Are you sure?","saveLabel":"","saveMessage":"","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>
75 <sequenceNumber>0.0</sequenceNumber>
76 <type>Step</type>
77 </omniProcessElements>
78 <omniProcessType>OmniScript</omniProcessType>
79 <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"}</propertySetConfig>
80 <subType>Framework</subType>
81 <type>Discovery</type>
82 <uniqueName>Discovery_Framework_English_1</uniqueName>
83 <versionNumber>1.0</versionNumber>
84</OmniScript>The following is an example package.xml that references the previous definition.
1<?xml version="1.0" encoding="UTF-8"?>
2<Package
3 xmlns="http://soap.sforce.com/2006/04/metadata">
4 <types>
5 <members>*</members>
6 <name>OmniScript</name>
7 </types>
8 <version>63.0</version>
9</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.