× Welcome to the fracta.net forum!

Share your coding ideas or ask questions.

Excel VBA script macro to automate Avaya CMS agent groups

8 years 11 months ago - 8 years 11 months ago #49 by roller
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. If you can't work out which ones to add then add anything that is in the ..programfiles/avaya/ directories.

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


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: 8 years 11 months ago by roller.

Please Log in or Create an account to join the conversation.

Time to create page: 0.086 seconds
Powered by Kunena Forum