I have created a very low tech and simple solution to export stats to a csv file (which you can then use for a web based wallboard display).
For the sake of explanation we're gonna say you want to display some VQs/GVQs only with very few stats, but more complicated export is of course possible.
What you need: A PC that runs ccpulse 24/7 (or within your business hours at least), preferably with an SSD drive (if you have a lot of VQs) and priviliges to create thresholds. No access to statserver etc is required.
Step 1:
Create a Template with all the stats you want for your wallboard, we're gonna go with OCN, ANS and AHT. However, for performance reasons I advise to do as little calculations as possible within the template. Just choose the base values, you can still run calculations later in the wallboard php script or wherever. So instead of calculating AHT in CCPulse, just choose TotalTimeHandled, and later in the wallboard php you can calculate AHT with TotalTimeHandled/ANS.
Also don't set the notification frequency too low, as performance is not great for this method. 60 seconds should be enough, if you have A LOT of VQs (far more than 100) you could even go way higher, like 300 sec etc. Depends on how often your wallboard needs to be updated.
Step2:
Now create a formula in that template that returns all the stats in a single string, like this:
[code]
result.Text = exporttocsv()
function exporttocsv()
{
OCN =
ccpulse.CallStats.N_Offered -
ccpulse.CallStats.N_ShortAban
ANS = ccpulse.CallStats.N_Ans
THAND = ccpulse.QueueStats.TotalTimeQ_Handled
tempstring = OCN + ";" + ANS + ";" + THAND
exportstring = tempstring.replace(/NaN/g,"0")
return exportstring
delete OCN
delete ANS
delete THAND
}
[/code]
Step 3:
Almost done, now create a new Threshold. Thresholds and Actions both support full vbscript functionality, and give access to stat/formula data, so there is almost nothing you can't do. We are gonna build our script entirely as a threshold instead of a threshold/action pair though. Why? Because an action only fires the *first* time a threshold is true, but does not fire again while it remains true. We wan't our script to *always* fire on any stat change, and thresholds evaluate everytime the stat it applies to changes.
Apply this threshold to the formula with all the stats (some explanations as comments in code, you will certainly need to modify some of it).
[code]
if (hour(now) => 0 and hour(now) <= 23) then 'you can adjust this for your business hours
If instr(1,Threshold.StatValue,"0;0;0") = 0 then 'don't export VQs that have no calls. You may want to remove this condition if you want empty vqs in your export
Function GetFormattedDate 'get the current date for later use as part of the filename
strDate = CDate(Date)
strDay = DatePart("d", strDate)
strMonth = DatePart("m", strDate)
strYear = DatePart("yyyy", strDate)
If strDay < 10 Then
strDay = "0" & strDay
End If
If strMonth < 10 Then
strMonth = "0" & strMonth
End If
GetFormattedDate = strYear & "-" & strMonth & "-" & strDay
End Function
Set objFSO=CreateObject("Scripting.FileSystemObject")
inFile="c:\CCPulseExport\CCPulseExport " & GetFormattedDate & ".csv" 'export to THIS file. The folder structure needs to already exist (ie create them by hand)
If not objFSO.FileExists(inFile) then 'create a new file each day
Set objFile = objFSO.CreateTextFile(inFile)
set objFile = nothing
Set objFile = objFSO.OpenTextFile(inFile,2)
objFile.Write "VQNAME;OCN;ANS;THAND" & vblf 'write the header row into the file
objFile.Close
End if
Set objFile = objFSO.OpenTextFile(inFile,1) 'open the file and read it's contents into a string
strText = objFile.ReadAll
objFile.close
set objFile = nothing
If Not instr(1,strText,Threshold.CFGObjectID) = 0 then 'if this vq has been previously written to the file, run a regex on the string that replaces the vq's line with the new values
Set objRegex = new regexp
objRegex.Global = true
objRegex.Pattern = "(VQ).*\n" 'the regex pattern to determine single lines. you may need to adjust this if your vqnames do not all start with "VQ". You could just match for newline.
Set objMatches = objRegex.Execute(strText)
For Each objMatch in objMatches
match = objMatch.Value
if Not instr(1,match,Threshold.CFGObjectID) = 0 then
strText2 = Replace(strText,match,Threshold.CFGObjectID & ";" & Threshold.StatValue & vblf)
end if
Next
else 'if this vq has not been previously written, create a new line
strText2 = strText & Threshold.CFGObjectID & ";" & Threshold.StatValue & vblf
end if
Set objFile = objFSO.OpenTextFile(inFile,2) 'write the modified string back to the file
objFile.Write strText2
objFile.Close
set objFile = nothing
set objFSO = nothing
Threshold.Result = true
else
Threshold.Result = false
end if
end if
[/code]
CCPulse still requires you to attach an action to a threshold when applying it to the formula, but you can just create a completely empty action and call it "do_nothing" or something. Apply the threshold/empty action and you're done. If everything works as it should, export will start basically the moment you apply the threshold. The vbscript write/read operations are not super fast and depending on how many vqs you have might take quite a bit of time, so as mentioned before, don't set the notification frequency too low. Exporting to a SSD helps a lot.
You can now use scheduled tasks or even a second threshold to copy the export file like every minute to a networks share or something for usage by your wallboard webserver.
One more thing: If you are open 24 hours, you should probably run a scheduled task that kills the export ccpulse at 23:59 and restarts it at 00:01 each day, as otherwise some not-yet-updated stats from the previous day may carry over into the next days file.