Hi Community,
I want to respond to a notification send by DataMiner to Teams to take the ownership of an alarm.
Open some varius link from a button works fine, but using a button with a submit action ends up in a "Sorry, I did not understand that. You can type help to see all my available commands." response of the chatbot, no matter what command I use (here: Show DMS).
Questions:
- Is there any way to run a command directly from a notification via submit action or other ways to achieve it?
- Is it possible to add additional parameters (e.g. alarm id) as a response to the notification or when running a custom command (e.g.: "run command Take Ownership alarmId:12345,agentId:1")?
Notification:
Action Code Part:
Hi Felix,
Currently we don't support adding Actions (nor functional inputs) in the Adaptive Cards via the DataMiner bot ChatOps.
As you found out there is a way to still add Actions and it indeed does work for URLs. In your use case, for example, a URL to the monitoring app via remote access would allow a user to take Ownership of the alarm or Mask it there: https://<dms>-<organization>.on.dataminer.services/monitoring/alarm/<dmaId>/<rootAlarmId>/<alarmId(optional, redirects to latest alarm if not defined)>
At this moment it's not possible to have a button that behaves like a command issued by the user. But we do agree that this could be a powerful feature and we might consider adding it in the future.
Wkr
Thank you Jordy,
I’ll see if it works for me to take ownership via the URL.
It would be really nice if you could add the reply feature in the future.
Do you have an answer to the 2nd question:
Is it possible to add additional parameters to the query when a custom command is executed (e.g.: “run command Take ownership alarmId:12345,agentId:1”) so that the user doesn’t have to enter it in the run dialog?
Sorry for not answering the second question directly. Unfortunately that is also not possible right now.
It looks like it is already possible to run another command from out of a notification if the syntax is valid.
new AdaptiveSubmitAction()
{
Title = “Change DMS”,
Id = “Action.Submit”,
DataJson = “{“CustomActionId”:”NewChangeDmsId”}”
}
works fine
Yes, we are aware. This is how the buttons work that the DataMiner bot uses in its own adaptive cards. Before, we didn’t have the intention to define this as something we will be backwards compatible with, up until your question came in. This way you would also be possible to add a button to execute a custom command (with inputs or predefined parameters!). If we would document and support this, we will surely let you know here.
Yes, it’s already working with custom commands. I posted it as new answer because I cannot attach pictures to a comment.
Hi, I’ll have a look and come back to you shortly.