Navigation Between Steps (Managed Package)

For the managed package runtime, beginning with Vlocity Insurance and Health Winter '20, learn which mixins you can set on the steps of an Omniscript so that users can navigate between those steps.

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

omniNextStep()

Advances users to the next step in the Omniscript.

JS Example HTML Example
nextButton(evt) {
        if (evt) {
            this.omniNextStep();
        }
    }
<button onclick={nextButton}>Custom Next Button </button>

omniPrevStep()

Takes users to the previous step in the Omniscript.

JS Example HTML Example
prevButton(evt) {
        if (evt) {
            this.omniPrevStep();
        }
    }
<button onclick={prevButton}>Custom Prev Button </button>

omniNavigateTo(step)

Takes users to a specific step in the Omniscript by passing an argument. The argument passed into the function can be a number that refers to the step's index in the Omniscript or a step's element name passed as a hardcoded string. The index for the current step is accessible using the property this.omniScriptHeaderDef.asIndex.

Note
Note You can’t auto-advance to a step more than one step ahead.
JS Example HTML Example
goToStep(evt) {
        if (evt) {
            this.omniNavigateTo(this.omniScriptHeaderDef.asIndex - 2);
        }
    }
<button onclick={goToStep}>Custom Step Button </button>