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
customCommandstringThe name of the custom command
dataminerIdintThe ID of the DataMiner Agent
organizationIdGuidThe ID of the organization on dataminer.services where the DMS with
dmsIdis part ofdmsIdGuidThe ID of the DMS on dataminer.services where the element with
customCommandis part ofpredefinedInputValuesIEnumerable<CustomCommandInput>Predefined input values that will override the default values configured on the custom command
titlestringThe button text
skipConfirmationboolIf 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