Skip to main content

CWRMM Ticket Management for Monitors

Summary​

The CWRMM Ticket Management for Monitors trigger serves as a dedicated webhook endpoint designed to bridge CW RMM monitoring scripts and ConnectWise ticketing workflows.

Instead of relying on native RMM ticketing tasks, monitoring scripts (such as Enhanced Drive Space, CPU Threshold, and Memory Threshold monitors) evaluate device telemetry locally and send a structured JSON payload to this trigger only when a ticket state change is required. This allows monitors to implement a robust local state machine, tracking which alerts already have open tickets and firing webhooks exclusively to create new tickets or close resolved ones.

Key Benefits:

  • Prevents Ticket Duplication: By offloading ticket tracking to the monitor's local state files, it ensures that sustained alerts (e.g., a drive sitting at 95% full for hours) do not generate duplicate tickets on every monitor run.
  • Automated Resolution: When an alert condition clears (e.g., CPU drops below the low threshold), the monitor automatically fires a Close action webhook, allowing ConnectWise to auto-resolve the ticket without technician intervention.
  • Decoupled Architecture: Monitoring logic and ticketing actions are cleanly separated. Monitors focus purely on threshold evaluation and state management, while the ConnectWise workflow handles the API calls to Create, Close, or Comment on tickets based on the payload.

Valid actions recognized by this trigger are Create, Close, and Comment.

Details​

Trigger NameDescriptionTagsSecure user access
CWRMM Ticket Management For MonitorsCreate and Close a Ticket based on Action from a monitor. Valid actions are Create, Close and Comment.TicketingNo Auth

Request Body​

These are the fields that will be collected in order for the custom workflow action to get executed.

Payload Schema​

Field TypeSetup optionField Caption
Json/complex dataPayload Schema

Data​

Json Path NameDisplay NameRequiredData FormatDefault ValueValid OptionsVisibility
ActionActionTrueStringCreate, Close, CommentShown
TicketBodyTicketBodyTrueStringShown
TicketSubjectTicketSubjectTrueStringShown
DeviceIdDeviceIdTrueStringShown

Usage Example​

$webhookUrl = 'https://webhook.xyz.net/sampleUrl'

$action = 'Create'
$ticketSubject = 'A Sample Ticket for {0}' -f $env:ComputerName
$ticketBody = 'This ticket is created to test the functionality of the trigger'

$deviceId = (Get-ItemProperty -Path 'HKLM:\SOFTWARE\WOW6432Node\ITSPlatform').privateendpointid

$payload = [ordered]@{
Action = $action
TicketSubject = $ticketSubject
TicketBody = $ticketBody
DeviceId = $deviceId
}
$jsonPayload = $payload | ConvertTo-Json -Depth 2

Invoke-RestMethod -Uri $webhookUrl -Method Post -Body $jsonPayload -ContentType 'application/json'

Dependencies​

Trigger Setup Path​

  • Tasks Path: Automation ➞ Workflows ➞ Custom Triggers

Trigger Creation​

Install the CWRMM Ticket Management for Monitors workflow from the ProVal - Content Community to automatically install this trigger as well.

Changelog​

2025-07-23​

  • Initial version of the document