Send Email for each Unsynced Tickets
Summary
The purpose of the script is to send an email notification for each ticket that failed to sync with PSA in the past X hours. X is the number of hours set for the Global Parameter Threshold.
Default: 2
Requirements:
- Ticket Sync should be enabled in the CW Manage Plugin.
- The System Property 'Unsynced_Ticket_Email_Address' MUST be manually created. The script will NOT function without this property.
Note:
- All locations and clients that are 'Ignored' within the CW Manage Plugin will NOT report unsynced tickets for those locations/clients.
- It will detect the tickets that were generated at least 30 minutes ago to avoid false positives.
Sample Run
It is a client script and should be scheduled to run once per X hours. X is the number of hours set for the script's Global Parameter Threshold.
Schedule this script to run every 2 hours in the dashboard.

Variables
| Name | Description |
|---|---|
| Email Address(es) to send the Email | |
| Subject | Email Subject |
| Body | Email Content |
Global Parameters
| Name | Default | Required | Description |
|---|---|---|---|
| Threshold | 2 | True | Number of past hours to check the unsynced tickets from. |
System Properties
| Name | Example | Required | Description |
|---|---|---|---|
| Unsynced_Ticket_Email_Address | example@example.com | True | Address(es) to send the email. Multiple addresses should be separated by a semicolon (;). |
Examples:
- Single Email Address:

- Multiple Email Addresses:

Note: The script will not create the system property. Hence, this system property should be created before scheduling/running the script. Otherwise, the script will not work.
Output
Email
Subject: 'Ticket Sync Failed - %subject%'
Body:
Client: [Client Name]
Location: [Location Name]
Computer: [Computer Name]
CWA Ticket #: [Ticket ID of the CWA ticket that was unsyned]
Ticket Creation Date: [When ticket got created]
Ticket Status: [Status of the ticket]
Attachment: [Whether there is any attachment enclosed in the ticket]
Ticket Body:
%body%
[Body message of the ticket that failed to sync to PSA]
Sample Screenshot:
