Table of Contents

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 string

The name of the custom command

dataminerId int

The ID of the DataMiner Agent

organizationId Guid

The ID of the organization on dataminer.services where the DMS with dmsId is part of

dmsId Guid

The ID of the DMS on dataminer.services where the element with customCommand is part of

predefinedInputValues IEnumerable<CustomCommandInput>

Predefined input values that will override the default values configured on the custom command

title string

The button text

skipConfirmation bool

If 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