Genesys CTI User Forum
Genesys CTI User Forum => Genesys CTI Technical Discussion => Topic started by: jnjustice on November 12, 2020, 02:01:19 AM
-
Hello,
I have an alert set to trigger when an agent hits a certain duration bon a call and it works fine.
The alert though only includes the employee ID from the CFGObjectID. Is there a way to get the name as it displays from FormatAgentInfo in the Configuration Options and Parameters setup?
-
http://www.sggu.com/smf/index.php?topic=7814.0
-
@cavagnaro I am using the action script here http://www.sggu.com/smf/index.php/topic,2237.msg8605.html#msg8605 and I added the CFGPerson to the thresholdInfo variable but it still comes up empty. Can you clarify what you're referring to there?
-
Well my injustice...
There are several ways to send a mail, as you provided no information I assumed that you were using IRD for it.
Now that you have clarified what you are doing
Threshold is an object, so you can easily print its values and see what it contains. Maybe you can see the information you are looking for in there.
foreach is a good start
-
I am not quite sure how to do that and my access to info is a bit limited besides what is in CCPulse directly but I thought of using IF statements to compare Threshold.CFGObjectID against the employees known ID # (shown as # where the ID # would be and NAME where the name would be) and setting the name based on that. The test seems to go okay but errors out at the end saying:
Error at
Line: 65
Position:8
Error message: Expected End
My full code is below but I am not sure why I am getting that error. I have the End Sub there for SendMail so it should be fine but it is not...
[code]
Dim msgBody
Dim thresholdInfo
Dim receipAddress
Dim empName
if (Threshold.CFGObjectID = #) then
agentName = "NAME"
if (Threshold.CFGObjectID = #) then
agentName = "NAME"
if (Threshold.CFGObjectID = #) then
agentName = "NAME"
if (Threshold.CFGObjectID = #) then
agentName = "NAME"
thresholdInfo="StatAlias:"+CStr(Threshold.StatAlias)+vbNewLine+"StatValue:"+CStr(round(Threshold.StatValue/60,2))+vbNewLine+"CFGObjectID:"+CStr(Threshold.CFGObjectID)+vbNewLine+"empName:"+CStr(empName)+vbNewLine
receipAddress="email"
'Call our function with recipient, message, and subject
SendMail receipAddress,msgBody+thresholdInfo,"CCPulse Alarm Notification"
Sub SendMail(recipient,msg,subject)
Dim objOutlook
Dim objOutlookMsg
Set objOutlook = CreateObject( "Outlook.Application" )
Set objOutlookMsg = objOutlook.CreateItem(olMailItem)
objOutlookMsg.To = recipient
objOutlookMsg.Subject = subject
objOutlookMsg.Body = thresholdInfo
objOutlookMsg.Importance = 2
objOutlookMsg.Send
Set objOutlookMsg = Nothing
Set objOutlook = Nothing
End Sub
[/code]
-
[quote author=jnjustice link=topic=11894.msg53550#msg53550 date=1605290760]
I am not quite sure how to do that and my access to info is a bit limited besides what is in CCPulse directly but I thought of using IF statements to compare Threshold.CFGObjectID against the employees known ID # (shown as # where the ID # would be and NAME where the name would be) and setting the name based on that. The test seems to go okay but errors out at the end saying:
Error at
Line: 65
Position:8
Error message: Expected End
My full code is below but I am not sure why I am getting that error. I have the End Sub there for SendMail so it should be fine but it is not...
[code]
Dim msgBody
Dim thresholdInfo
Dim receipAddress
Dim empName
if (Threshold.CFGObjectID = #) then
agentName = "NAME"
if (Threshold.CFGObjectID = #) then
agentName = "NAME"
if (Threshold.CFGObjectID = #) then
agentName = "NAME"
if (Threshold.CFGObjectID = #) then
agentName = "NAME"
thresholdInfo="StatAlias:"+CStr(Threshold.StatAlias)+vbNewLine+"StatValue:"+CStr(round(Threshold.StatValue/60,2))+vbNewLine+"CFGObjectID:"+CStr(Threshold.CFGObjectID)+vbNewLine+"empName:"+CStr(empName)+vbNewLine
receipAddress="email"
'Call our function with recipient, message, and subject
SendMail receipAddress,msgBody+thresholdInfo,"CCPulse Alarm Notification"
Sub SendMail(recipient,msg,subject)
Dim objOutlook
Dim objOutlookMsg
Set objOutlook = CreateObject( "Outlook.Application" )
Set objOutlookMsg = objOutlook.CreateItem(olMailItem)
objOutlookMsg.To = recipient
objOutlookMsg.Subject = subject
objOutlookMsg.Body = thresholdInfo
objOutlookMsg.Importance = 2
objOutlookMsg.Send
Set objOutlookMsg = Nothing
Set objOutlook = Nothing
End Sub
[/code]
[/quote]
Aren't you missing the END IF? Those "IF's" aren't with a single inline command.
-
oh duh. I had them in there but must have missed it when I was copying/pasting the lines. it's working now which is awesome, thanks!