Custom Steps

InSkill supports custom steps that allow you to build customizable workflows and behaviors. If a step has script or web tags, the body will have js that can take actions.

Editor Overview

A. Editor Views - Custom steps are edited in the "Advanced" tab and can be previewed using the "Preview" tab
B. Maximize - Maximize/minimize editing window
C. Upload Image - Upload an image and add it to the step body
D. Editors

  • Visual Editor - Edit step body using editor tools (basic formatting, tables, etc.)
  • Text Editor - Edit step body as raw html (add custom styles and scripts)

Styling Custom Steps

Html styling can be applied to individual steps using style tags in the step body or at the account/product level by uploading a css file in the settings page.

Inline Styles

Account Styles

Product Styles

Scripting

Use script tags to include custom javascript in a step's body

The following Inskill variables/utilities are accessible to scripts defined in the step body via the Inskill namespace.

  • Session
    • task
    • data
    • message
  • Utils
    • waitscreen

Session Data

Sends the json data to the task to add/change data. In the example below, the variable pressure is set to 33.8.

// Access data for current session
console.log(Inskill.Session.task);

// Add/update data for current session
Inskill.Session.data({ "pressure": 33.8, "pump.voltage": 120 });
inskill_data({ "pressure": 33.8 }); // (legacy version)

Session Commands

Continue - advances the session to the next step, like if the user pressed the continue button.

// Advance session to the next step
Inskill.Session.message({ "continue": '' });
inskill_message({ "continue": '' }); // (legacy version)

Finished ends the session, like if the user pressed the Finished button.

// End the session
Inskill.Session.message({ "finished": '' });
inskill_message({ "finished": '' }); // (legacy version)

End says this is the last step, so don't show any buttons to the user (such as continue, not solved, or finished buttons).

// Hide default session buttons
Inskill.Session.message({ "end": '' });
inskill_message({ "end":'' }); // (legacy version)

Utilities

waitscreen

// Display a waitscreen spinner to the user
Inskill.Utils.waitscreen(true);

// Stop the waitscreen spinner (after 5 seconds)
 setTimeout(() => Inskill.Utils.waitscreen(false), 5000);