Neurons Bots Stages
Stages are used to build a bot. On the Neurons Bot editor page drag a stage on to the work area. The Stage settings panel displays for you to define the settings for the action or query. The stages must be connected to create the workflow in the bot, refer to Connection settings. You can select a stage from the Stages categories. You can also create Custom stages and User stages for use with the bot.
Stage categories
The overview below does not list every individual stage. Listed stages may not be available in every configuration path.
Used to present and filter information from devices that meet the specified criteria. The output and context from this query stage can be passed through subsequent stages in the bot.
For example, show devices with less than 10% free disk space.
Action stages leverage Automation Fabric to perform actions. Use of variables is available for some actions. Learn more about Stage variables.
- Filter Results: You can filter query results based on customizable properties. Once you connect a built-in Query Stage to a Filter, the Property drop-down lists all available properties that can be selected. To view details of the properties, go to the query Stage Settings panel and select Stage Information.
- You can also use the Preview Query functionality to assess all targeted devices, and use the results table to view the format and range of values that can be filtered.
- You have the ability to join multiple queries together in sequence. If this is done, all results are combined and available to filter on, or use in Action Stages. You can change the comparison behavior of the connected filter so that it either applies either AND or the OR logic to determine the results.
- Join: Use this stage to re-merge a bot that has split down separate branches. In the Stage settings, select the join behavior; Any state, All succeeded, At least one succeeded.
- Set Variable: Use this stage to provide a consistent reference point that can be configured with default values and updated by stages based on results. This is useful when you want to use a single variable to reference a field which might be updated from queries across different branches. The variables that you can set are defined in Define variables.
Stages for early access are available here. Beta stages are offered to enable Ivanti to gather feedback and data around upcoming features.
Custom stages allow you to execute a custom script. You can choose from the following scripting templates:
- osquery: an open source SQL based language that can be used to query and retrieve information from devices and supports Windows and macOS devices.
- PowerShell Query: can be used to query Windows and macOS devices. It can run as system or logged-on user.
- Bash Action: can be used to perform actions on macOS devices.
- Command Action: executes Windows command prompt commands on the target endpoint. It can run as system or the logged-in user.
- Powershell Action: can be used to perform actions on Windows devices.
Learn more about Custom Stages
List function stages allow you to perform actions on stage results that are a list. You can, for example, filter, sort, count, or sum the list.
If the result of a List function stage is again a list, you can add another List function to further refine the result.
In the work area, you can recognize a stage that (is expected to) return a list result by the List tag.
To apply a List function stage in your workflow:
-
Add a stage that has a list result.
-
Add the desired List function.
-
Using , connect the stages from step 2 and 3.
This will populate the value(s) for Select List on the List function stage. -
Select the List on which you want to perform the List function.
-
Depending on the List function, complete the remaining configuration of the stage.
-
Complete the rest of your bot workflow and save your changes.
Interaction stages allow a bot to interact with and collect input from end users using Microsoft Teams. You can choose from the following interaction stages:
- MS Teams Interaction: Allows a bot to interact and collect input from an end user through Microsoft Teams. The message comprises a title, a message, and a choice of interaction: buttons or free text input.
- MS Teams Message: Allows a bot to send one-way messages to end users using Microsoft Teams. The message comprises a title and a message.
- MS Teams Rating: Allows a bot to interact and collect ratings from an end user through Microsoft Teams. The message comprises a title, a question, and a rating.
- MS Teams Sentiment: Allows a bot to interact and collect input from an end user through Microsoft Teams. The message comprises a title, a message, and a choice of interaction: buttons or free text input.
To learn more, refer to MS Teams Stages.
User stages are custom scripted stages. They are saved and made available in this User section for multiple reuse in bot creation.
Learn more about User Stages.
Stage variables
Variables can be used in the Stage settings to pass information between stages and pass the output of an action into the input of another action.
Inserting variables
To insert a variable open the Stage settings. Any field that supports variables will display the text Ctrl + Space. Select Ctrl + Space to select and insert a variable from the list.
When you define variables as script inputs in PowerShell, use the $myvar syntax to reference those variables within your script.
Bot Name: Name of the current bot.
Initiation User: Name of the user who initiated the bot. This will either be a user, or a Neurons service.
Initiation User ID: User ID of the initiating user. This will either be a user ID, or a Neurons service.
Timestamp (ISO): Current timestamp in ISO format.
Device Name: Gets the device name for current device within the current stage. Device names returned are separated by commas.
All Device Data: Gets all data for current device within the current stage. This will be a JSON object.
Given Name: Name of the logged on end user.
Display Name: Full name of the end user.
Email: Email for the end user.
There are templates ready to use with the variables. For more complex requirements, javascript is supported using handlebarsjs.
Stage settings
When you drag a stage onto the work area and it is highlighted, the Stage settings panel displays. Use the settings to configure and customize each stage.
You can customize the settings by using the User Stage scripting function. Learn more about User Stages.
Each stage is given a unique numerical ID. If the bot uses the same stage more than once, this ID can be used to identify the stages individually.
Click View stage information to display the Stage Information panel, which shows a description of the stage and all the associated properties. These can be used as criteria to filter the query results.
Enable the toggle for Result influences the DEX score to display the Surveys section on the device page.
If the settings for a stage have not been set correctly, or some information is missing, the stage will have a red border, as will the setting that needs attention. Once the setting has been correctly completed the red border is removed.
Deprecated stages
If a newer version of a stage in a bot is available, a yellow banner displays Action required: This bot contains x stage that has been deprecated. The border of the deprecated stage will be yellow.
Select Update to upgrade the stage to the newer version. Once complete, the banner is dismissed and the stage border will no longer be yellow.
Disabled stages
If a stage in a bot has been deleted and is no longer available, a red banner displays Action required: This bot contains x stage that has been disabled. The border of the disabled stage will be red.
You must remove the stage from the bot. Once complete the banner is dismissed.
Pinned stages
Use the Pinned category to group your most-used stages.
To pin a stage, hover over the stage, select the pin icon .
To unpin a stage, click the pinned icon .
Stage Information
Use the information icon on any stage to display a description of what the stage does, operating system specific information, and settings details.