Genesys CTI User Forum

Genesys CTI User Forum => Genesys CTI Technical Discussion => Topic started by: eisefr on April 12, 2022, 09:29:32 AM

Title: [CCPulse+] Save the agent group name to a variable in Threshold.Action
Post by: eisefr on April 12, 2022, 09:29:32 AM
Hiiii..

I would like to save the agent-group - name into a variable.

My action script .. very simple:
[code]
Parameter = "BRS_CLS"
Aktion = "zero"
Dim ObjShell
Set ObjShell= CreateObject("WScript.Shell")
ObjShell.Run "C:\Windows\System32\WindowsPowerShell\v1.0\powershell.exe c:\anwend\Skripte\Agentengruppen_ungleich_1.ps1 " & Parameter + " " + Aktion
[/code]

I would like to add a row like
[code]
Group = Agentgroupname
[/code]

I would like to pass this variable "Group" to a powershell skript.


Is this possible somehow ?

Title: Re: Save the agent group name to a variable in Threshold.Action
Post by: hsujdik on April 12, 2022, 02:04:04 PM
I'm assuming you are talking about CCPulse+ here.


Have you tried something like this?
[code]
Dim AgentGroupName = Threshold.CFGObjectID
[/code]
Title: Re: Save the agent group name to a variable in Threshold.Action
Post by: eisefr on May 04, 2022, 09:48:00 AM
I get an error when I try this.

[quote]Error at
Line: 1
Position: 20
Error Message: Expected end of statement[/quote]

Maybe it's just something simple.
I am very new to this.
Title: Re: [CCPulse+] Save the agent group name to a variable in Threshold.Action
Post by: cavagnaro on May 04, 2022, 12:13:49 PM
Post your whole code pls

Enviado de meu SM-N9600 usando o Tapatalk

Title: Re: [CCPulse+] Save the agent group name to a variable in Threshold.Action
Post by: eisefr on May 12, 2022, 10:41:58 AM
Parameter = "KSC_Test"
Aktion = "zero"
Dim ObjShell
Set ObjShell= CreateObject("WScript.Shell")
[b][color=red]Dim AgentGroupName = Threshold.CFGObjectID[/color][/b]
ObjShell.Run "C:\Windows\System32\WindowsPowerShell\v1.0\powershell.exe c:\anwend\Skripte\Agentengruppen_ungleich_1.ps1 " & [color=Blue]Parameter [/color]+ " " + Aktion

If row#5 would work, I could replace [color=blue]Parameter [/color]with AgentGroupName
Title: Re: [CCPulse+] Save the agent group name to a variable in Threshold.Action
Post by: eisefr on May 12, 2022, 02:44:39 PM
I got it to work now.
This is how it works here:


[quote][color=red]Dim thresholdInfo
Parameter = CStr(Threshold.CFGObjectID)[/color]
Aktion = "Anmeldung"
Dim ObjShell
Set ObjShell= CreateObject("WScript.Shell")
ObjShell.Run "C:\Windows\System32\WindowsPowerShell\v1.0\powershell.exe c:\anwend\Skripte\Agentengruppen.ps1 " & Parameter + " " + Aktion
[/quote]

Thank you all for your time and help.
Title: Re: [CCPulse+] Save the agent group name to a variable in Threshold.Action
Post by: cavagnaro on May 12, 2022, 02:45:40 PM
Thanks for sharing the solution

Enviado de meu SM-N9600 usando o Tapatalk