- Thank you received: 9
Welcome to the fracta.net forum!
Share your coding ideas or ask questions.
Share your coding ideas or ask questions.
Question Excel VBA macro automate Avaya CMS agent groups
13 years 2 days ago - 13 years 2 days ago #4
by roller
Excel VBA macro automate Avaya CMS agent groups was created by roller
This code will add a new Agent Group to Avaya CMS. First of all you need to add references to the Avaya objects from the VBA menu - Tools/references like in the screen shot below.
Sub AddAgentGroup()
Dim cvsApp As New cvsApplication
Dim cvsConn As New cvsConnection
Dim cvsSrv As New cvsServer
Dim cvsCatalog As New cvsCatalog
Dim Reps As Object
'Dim cvsRpt As New cvsReport
'Dim Info As Object
'Dim Log As Object
Dim b As Object
Const Username As String = "username"
Const Password As String = "password"
Const AgtGrp As String = "test group"
If cvsApp.CreateServer(Username, Password, "", "cms", False, "ENU", cvsSrv, cvsConn) Then
If cvsConn.Login(Username, Password, "cms", "ENU") Then
On Error Resume Next
cvsSrv.Dictionary.ACD = "1"
b = cvsSrv.Dictionary.CreateOperation("Agent Groups", Reps)
If b Then
'this will add a new group called test group I got this to work OK
Reps.SetProperty "grp_name", "test group"
b = Reps.DoAction("Add")
'if you uncomment this section it should create a new agent to Avaya CMS, haven't tested
'but we also want to work out how to add an agent to a group!!!
' b = cvsSrv.Dictionary.CreateOperation("Login Identifications", Reps)
'Reps.SetProperty "login_id", "7844"
' Reps.SetProperty "ag_name", "Leila"
' b = Reps.DoAction("Add")
End If
End If
cvsConn.Logout
cvsConn.Disconnect
End If
cvsSrv.ActiveTasks.Remove Reps.TaskID
Set b = Nothing
Set Op = Nothing
Set Reps = Nothing
Set cvsRpt = Nothing
Set cvsSrv = Nothing
Set cvsConn = Nothing
Set cvsApp = Nothing
End Sub
Sub AddAgentGroup()
Dim cvsApp As New cvsApplication
Dim cvsConn As New cvsConnection
Dim cvsSrv As New cvsServer
Dim cvsCatalog As New cvsCatalog
Dim Reps As Object
'Dim cvsRpt As New cvsReport
'Dim Info As Object
'Dim Log As Object
Dim b As Object
Const Username As String = "username"
Const Password As String = "password"
Const AgtGrp As String = "test group"
If cvsApp.CreateServer(Username, Password, "", "cms", False, "ENU", cvsSrv, cvsConn) Then
If cvsConn.Login(Username, Password, "cms", "ENU") Then
On Error Resume Next
cvsSrv.Dictionary.ACD = "1"
b = cvsSrv.Dictionary.CreateOperation("Agent Groups", Reps)
If b Then
'this will add a new group called test group I got this to work OK
Reps.SetProperty "grp_name", "test group"
b = Reps.DoAction("Add")
'if you uncomment this section it should create a new agent to Avaya CMS, haven't tested
'but we also want to work out how to add an agent to a group!!!
' b = cvsSrv.Dictionary.CreateOperation("Login Identifications", Reps)
'Reps.SetProperty "login_id", "7844"
' Reps.SetProperty "ag_name", "Leila"
' b = Reps.DoAction("Add")
End If
End If
cvsConn.Logout
cvsConn.Disconnect
End If
cvsSrv.ActiveTasks.Remove Reps.TaskID
Set b = Nothing
Set Op = Nothing
Set Reps = Nothing
Set cvsRpt = Nothing
Set cvsSrv = Nothing
Set cvsConn = Nothing
Set cvsApp = Nothing
End Sub
Last edit: 13 years 2 days ago by roller.
Please Log in or Create an account to join the conversation.
- Tyger0951
- Visitor
9 years 9 months ago #408
by Tyger0951
Replied by Tyger0951 on topic Excel VBA macro automate Avaya CMS agent groups
I'm wondering if you have a code or if its even possible to use excel to update agent names "login identifiers". Got a steady amount of new agents coming in weekly and we recycle agent ids and just update the names. I have a spreadsheet that automatically generates a list of new agent names and ids but at the moment I'm manually updating one at a time. Using shortcut keys makes it quick like ctrl+f to find and ctrl+m to modify, but really would like to get excel vba to do this automatically. Thanks to your code to reskill agents I've automated my daily tasks with reskilling and very greatful and hope theres a solution to this problem.
Please Log in or Create an account to join the conversation.
9 years 9 months ago #409
by roller
Replied by roller on topic Excel VBA macro automate Avaya CMS agent groups
I am not sure what the problem you are asking is. Could you use VLOOKUP function to look up the new names from the IDs?
What do you need to match the names, just skill by IDs! Give me a bit more details or example maybe I can suggest something if I know what you need.
What do you need to match the names, just skill by IDs! Give me a bit more details or example maybe I can suggest something if I know what you need.
Please Log in or Create an account to join the conversation.
- Tyger0951
- Visitor
9 years 9 months ago - 9 years 9 months ago #411
by Tyger0951
Replied by Tyger0951 on topic Excel VBA macro automate Avaya CMS agent groups
Last edit: 9 years 9 months ago by Tyger0951.
Please Log in or Create an account to join the conversation.
9 years 9 months ago #412
by roller
Replied by roller on topic Excel VBA macro automate Avaya CMS agent groups
Dam IT guys here disable my Add and Update on my version. I will have to find the IT guy and see if he can enable these for me so I can at least try to work it out. Meanwhile if you can generate the .acsauto script that updates a name and attach here I will have a look. Not sure if you can export the script, try it and attach and let me see. You know about the .acsauto script, right?
Please Log in or Create an account to join the conversation.
9 years 9 months ago #413
by roller
Replied by roller on topic Excel VBA macro automate Avaya CMS agent groups
OK I get permission the code is identical to the above posts but you replace this section:
cvsSrv.Dictionary.ACD = 1
b = cvsSrv.Dictionary.CreateOperation("Login Identifications",Op)
If b Then
Op.SetProperty "login_id","5091"
Op.SetProperty "ag_name","Agent Spare11"
b = Op.DoAction("Modify")
End If
So that changes 5091 to be named "Agent Spare11". So the trick is to do a loop in VBA to go through the entire list and repeat those lines of code for each new name.
cvsSrv.Dictionary.ACD = 1
b = cvsSrv.Dictionary.CreateOperation("Login Identifications",Op)
If b Then
Op.SetProperty "login_id","5091"
Op.SetProperty "ag_name","Agent Spare11"
b = Op.DoAction("Modify")
End If
So that changes 5091 to be named "Agent Spare11". So the trick is to do a loop in VBA to go through the entire list and repeat those lines of code for each new name.
Please Log in or Create an account to join the conversation.
Time to create page: 0.492 seconds