Method RunCustomCommand
- Namespace
- Skyline.DataMiner.DcpChatIntegrationHelper.Common
- Assembly
- Skyline.DataMiner.DcpChatIntegrationHelper.dll
RunCustomCommand(string, int, Guid, Guid, IEnumerable<CustomCommandInput>, string, bool)
Creates a button that request the DataMiner bot run the given custom command
The DataMiner bot will prompt the user for inputs when needed for the custom command or with a confirmation before running it depending on skipConfirmation
. Default values defined on the custom command will be filled in automatically. Default value overrides can be added in predefinedInputValues
public static AdaptiveSubmitAction RunCustomCommand(string customCommand, int dataminerId, Guid organizationId, Guid dmsId, IEnumerable<CustomCommandInput> predefinedInputValues = null, string title = "Run Custom Command", bool skipConfirmation = false)
Parameters
customCommand
stringThe name of the custom command
dataminerId
intThe ID of the DataMiner Agent
organizationId
GuidThe ID of the organization on dataminer.services where the DMS with
dmsId
is part ofdmsId
GuidThe ID of the DMS on dataminer.services where the element with
customCommand
is part ofpredefinedInputValues
IEnumerable<CustomCommandInput>Predefined input values that will override the default values configured on the custom command
title
stringThe button text
skipConfirmation
boolIf the confirmation prompt should be skipped when pressing the button and all input values are known
Returns
- AdaptiveSubmitAction
The button that can be added in AdaptiveCards.AdaptiveActionSet.Actions of the AdaptiveCards.AdaptiveActionSet (AdaptiveCards.AdaptiveElement)
Remarks
A custom command is an automation script in a (sub)folder named /bot/
, read more about custom commands on docs.dataminer.services