Connect Send Credits - Notification

Hello,

is there a possibility to check the remaining Connect Send clicks programmatically in Workflow?

Our customer wants to get an email as soon as the remaining Connect Send credits level goes under 10.000 credits.

Thanks
Thomas

As far as I know, you can’t access the value programmatically. The best you can do is count the number of pages that have been printed by using the Get Data task and specifying parameters that allow the task to filter the results. You can then use a script to sum up the values for each individual job. For instance, when the task’s output is set to XML, you could use a script like this:

var xmlDoc = new ActiveXObject("msxml2.DOMDocument.3.0");
xmlDoc.async = false;
xmlDoc.load(Watch.GetJobFileName());
var allPages =  xmlDoc.getElementsByTagName("PAGES");
var totalPrinted = 0;
for(i=0;i<allPages.length;i++){
  totalPrinted += parseInt(allPages[i].text);
}


Watch.log("TOTAL: "+totalPrinted,2);

That is bad, because it is not as accurate as I would prefer. But it is better than nothing.
Nevertheless many thanks for that workaround. I will give it a try.

The remaining clicks are reported in Workflow’s log. Look for a line with this format:
The job sent by user “«username»” from machine “«machine name»” can be processed in license mode “clickcharge”. «credit amount» pages will be left

No doubt this can be looked for automatically as well (using Workflow for instance).