Skip to main content

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:

  1. Ticket Sync should be enabled in the CW Manage Plugin.
  2. 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.

Sample Run Image 1

Schedule this script to run every 2 hours in the dashboard. Sample Run Image 2

Variables​

NameDescription
EmailEmail Address(es) to send the Email
SubjectEmail Subject
BodyEmail Content

Global Parameters​

NameDefaultRequiredDescription
Threshold2TrueNumber of past hours to check the unsynced tickets from.

System Properties​

NameExampleRequiredDescription
Unsynced_Ticket_Email_Addressexample@example.comTrueAddress(es) to send the email. Multiple addresses should be separated by a semicolon (;).

Examples:

  • Single Email Address:
    Single Email Example
  • Multiple Email Addresses:
    Multiple Email Example

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

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:
Sample Screenshot

Changelog​

2026-02-18​

  • Initial version of the document