Set a Default Value for an Element (Managed Package)

For the managed package runtime, the Default Value property sets the JSON value of an element to a static value by default and exists on certain elements. The Default Value is overwritten if the element is prefilled from an Omnistudio Data Mapper or JSON response.

For more information on how to dynamically prefill values, see 

Managed Package app icon This information is for Omnistudio for Managed Packages. For Omnistudio on standard runtime, see Omnistudio Help.

Populate Elements (Managed Package).

Beginning with Vlocity Insurance and Health Winter '20 and Vlocity CME Winter '20, Default Value fields in LWC Omniscripts accept merge field syntax. For more information, see Access Omniscript Data JSON with Merge Fields (Managed Package).

  1. Click the element to open its Properties panel.
  2. From the element’s Properties panel, click the Default Value property.
  3. Enter a literal value or a merge field.

    For a merge field, the value in the referenced field must already be present when the element is instantiated. The default value is set only when the element is instantiated for the first time.

    For elements such as Range and Number, the Default Value property only lets you enter a number. To enter a merge field, switch to the JSON editor.

    The date picker lets the user choose a date that is +/- 100 years from the Default Value of a Date element.

    For example, to set the default of a Date element to the value of a JSON node called EffectiveDate, enter the merge field %EffectiveDate% in the Default Value property.
  4. Preview the Omniscript to view the default value in the Data JSON.