Changing Avaya Agent Skills with Excel VBA

N0 DICE

New Member
Joined
Oct 22, 2010
Messages
5
I have a code that I was using to change agent skills with VBA. It turns out that the code is to large and I get a compile error. Procedure too large. Can anyone help me with a way to shorten it or possible modify it with a loop of some sort?

This is a piece of the code; I need it to repeat the SetArr piece 700 times. If anyone has any insights they would be greatly appreciated. Also I can send the excel workbook if anyone would like to take a look. It is kinda large (20 Mb)

Code:
Sub ChangeSkills()

Dim agents As String
Dim cvsApp As Object
Dim cvsConn As Object
Dim cvsSrv As Object
Dim SetArr() As Variant
Dim sWarn As String
Dim Skills() As Variant
Dim nSkills As String


Set cvsApp = CreateObject("ACSUP.cvsApplication")
Set cvsConn = CreateObject("ACSCN.cvsConnection")
Set cvsSrv = CreateObject("ACSUPSRV.cvsServer")



UserName = "***"
Password = "****"
AvayaIP = "*****"

If cvsApp.CreateServer(UserName, Password, "", AvayaIP, False, "ENU", cvsSrv, cvsConn) Then
If cvsConn.Login(UserName, Password, AvayaIP, "ENU") Then

On Error Resume Next
Set AgMngObj = cvsSrv.AgentMgmt

ReDim SetArr(12, 3)
SetArr(1, 1) = Range("B2").Value
SetArr(1, 2) = Range("B3").Value
SetArr(1, 3) = 0
SetArr(2, 1) = Range("C2").Value
SetArr(2, 2) = Range("C3").Value
SetArr(2, 3) = 0
SetArr(3, 1) = Range("D2").Value
SetArr(3, 2) = Range("D3").Value
SetArr(3, 3) = 0
SetArr(4, 1) = Range("E2").Value
SetArr(4, 2) = Range("E3").Value
SetArr(4, 3) = 0
SetArr(5, 1) = Range("F2").Value
SetArr(5, 2) = Range("F3").Value
SetArr(5, 3) = 0
SetArr(6, 1) = Range("G2").Value
SetArr(6, 2) = Range("G3").Value
SetArr(6, 3) = 0
SetArr(7, 1) = Range("H2").Value
SetArr(7, 2) = Range("H3").Value
SetArr(7, 3) = 0
SetArr(8, 1) = Range("I2").Value
SetArr(8, 2) = Range("I3").Value
SetArr(8, 3) = 0
SetArr(9, 1) = Range("J2").Value
SetArr(9, 2) = Range("J3").Value
SetArr(9, 3) = 0
SetArr(10, 1) = Range("K2").Value
SetArr(10, 2) = Range("K3").Value
SetArr(10, 3) = 0
SetArr(11, 1) = Range("L2").Value
SetArr(11, 2) = Range("L3").Value
SetArr(11, 3) = 0
SetArr(12, 1) = Range("M2").Value
SetArr(12, 2) = Range("M3").Value
SetArr(12, 3) = 0

sWarn = ""
agents = Range("A2").Value
nSkills = Range("A3").Value

AgMngObj.AcdStartUp -1, "", cvsSrv.ServerKey, -1
AgMngObj.OleAgentSetSkill 1, "" & agents & "", 1, 0, 0, 0, nSkills, SetArr, sWarn ' note the nSKills for # of skills in SetArr

On Error Resume Next
Set AgMngObj = cvsSrv.AgentMgmt

ReDim SetArr(12, 3)
SetArr(1, 1) = Range("B4").Value
SetArr(1, 2) = Range("B5").Value
SetArr(1, 3) = 0
SetArr(2, 1) = Range("C4").Value
SetArr(2, 2) = Range("C5").Value
SetArr(2, 3) = 0
SetArr(3, 1) = Range("D4").Value
SetArr(3, 2) = Range("D5").Value
SetArr(3, 3) = 0
SetArr(4, 1) = Range("E4").Value
SetArr(4, 2) = Range("E5").Value
SetArr(4, 3) = 0
SetArr(5, 1) = Range("F4").Value
SetArr(5, 2) = Range("F5").Value
SetArr(5, 3) = 0
SetArr(6, 1) = Range("G4").Value
SetArr(6, 2) = Range("G5").Value
SetArr(6, 3) = 0
SetArr(7, 1) = Range("H4").Value
SetArr(7, 2) = Range("H5").Value
SetArr(7, 3) = 0
SetArr(8, 1) = Range("I4").Value
SetArr(8, 2) = Range("I5").Value
SetArr(8, 3) = 0
SetArr(9, 1) = Range("J4").Value
SetArr(9, 2) = Range("J5").Value
SetArr(9, 3) = 0
SetArr(10, 1) = Range("K4").Value
SetArr(10, 2) = Range("K5").Value
SetArr(10, 3) = 0
SetArr(11, 1) = Range("L4").Value
SetArr(11, 2) = Range("L5").Value
SetArr(11, 3) = 0
SetArr(12, 1) = Range("M4").Value
SetArr(12, 2) = Range("M5").Value
SetArr(12, 3) = 0

sWarn = ""
agents = Range("A4").Value
nSkills = Range("A5").Value

AgMngObj.AcdStartUp -1, "", cvsSrv.ServerKey, -1
AgMngObj.OleAgentSetSkill 1, "" & agents & "", 1, 0, 0, 0, nSkills, SetArr, sWarn ' note the nSKills for # of skills in SetArr

On Error Resume Next
Set AgMngObj = cvsSrv.AgentMgmt

ReDim SetArr(12, 3)
SetArr(1, 1) = Range("B6").Value
SetArr(1, 2) = Range("B7").Value
SetArr(1, 3) = 0
SetArr(2, 1) = Range("C6").Value
SetArr(2, 2) = Range("C7").Value
SetArr(2, 3) = 0
SetArr(3, 1) = Range("D6").Value
SetArr(3, 2) = Range("D7").Value
SetArr(3, 3) = 0
SetArr(4, 1) = Range("E6").Value
SetArr(4, 2) = Range("E7").Value
SetArr(4, 3) = 0
SetArr(5, 1) = Range("F6").Value
SetArr(5, 2) = Range("F7").Value
SetArr(5, 3) = 0
SetArr(6, 1) = Range("G6").Value
SetArr(6, 2) = Range("G7").Value
SetArr(6, 3) = 0
SetArr(7, 1) = Range("H6").Value
SetArr(7, 2) = Range("H7").Value
SetArr(7, 3) = 0
SetArr(8, 1) = Range("I6").Value
SetArr(8, 2) = Range("I7").Value
SetArr(8, 3) = 0
SetArr(9, 1) = Range("J6").Value
SetArr(9, 2) = Range("J7").Value
SetArr(9, 3) = 0
SetArr(10, 1) = Range("K6").Value
SetArr(10, 2) = Range("K7").Value
SetArr(10, 3) = 0
SetArr(11, 1) = Range("L6").Value
SetArr(11, 2) = Range("L7").Value
SetArr(11, 3) = 0
SetArr(12, 1) = Range("M6").Value
SetArr(12, 2) = Range("M7").Value
SetArr(12, 3) = 0

sWarn = ""
agents = Range("A6").Value
nSkills = Range("A7").Value

AgMngObj.AcdStartUp -1, "", cvsSrv.ServerKey, -1
AgMngObj.OleAgentSetSkill 1, "" & agents & "", 1, 0, 0, 0, nSkills, SetArr, sWarn ' note the nSKills for # of skills in SetArr

On Error Resume Next
Set AgMngObj = cvsSrv.AgentMgmt

ReDim SetArr(12, 3)
SetArr(1, 1) = Range("B8").Value
SetArr(1, 2) = Range("B9").Value
SetArr(1, 3) = 0
SetArr(2, 1) = Range("C8").Value
SetArr(2, 2) = Range("C9").Value
SetArr(2, 3) = 0
SetArr(3, 1) = Range("D8").Value
SetArr(3, 2) = Range("D9").Value
SetArr(3, 3) = 0
SetArr(4, 1) = Range("E8").Value
SetArr(4, 2) = Range("E9").Value
SetArr(4, 3) = 0
SetArr(5, 1) = Range("F8").Value
SetArr(5, 2) = Range("F9").Value
SetArr(5, 3) = 0
SetArr(6, 1) = Range("G8").Value
SetArr(6, 2) = Range("G9").Value
SetArr(6, 3) = 0
SetArr(7, 1) = Range("H8").Value
SetArr(7, 2) = Range("H9").Value
SetArr(7, 3) = 0
SetArr(8, 1) = Range("I8").Value
SetArr(8, 2) = Range("I9").Value
SetArr(8, 3) = 0
SetArr(9, 1) = Range("J8").Value
SetArr(9, 2) = Range("J9").Value
SetArr(9, 3) = 0
SetArr(10, 1) = Range("K8").Value
SetArr(10, 2) = Range("K9").Value
SetArr(10, 3) = 0
SetArr(11, 1) = Range("L8").Value
SetArr(11, 2) = Range("L9").Value
SetArr(11, 3) = 0
SetArr(12, 1) = Range("M8").Value
SetArr(12, 2) = Range("M9").Value
SetArr(12, 3) = 0

sWarn = ""
agents = Range("A8").Value
nSkills = Range("A9").Value

AgMngObj.AcdStartUp -1, "", cvsSrv.ServerKey, -1
AgMngObj.OleAgentSetSkill 1, "" & agents & "", 1, 0, 0, 0, nSkills, SetArr, sWarn ' note the nSKills for # of skills in SetArr

On Error Resume Next
Set AgMngObj = cvsSrv.AgentMgmt

ReDim SetArr(12, 3)
SetArr(1, 1) = Range("B10").Value
SetArr(1, 2) = Range("B11").Value
SetArr(1, 3) = 0
SetArr(2, 1) = Range("C10").Value
SetArr(2, 2) = Range("C11").Value
SetArr(2, 3) = 0
SetArr(3, 1) = Range("D10").Value
SetArr(3, 2) = Range("D11").Value
SetArr(3, 3) = 0
SetArr(4, 1) = Range("E10").Value
SetArr(4, 2) = Range("E11").Value
SetArr(4, 3) = 0
SetArr(5, 1) = Range("F10").Value
SetArr(5, 2) = Range("F11").Value
SetArr(5, 3) = 0
SetArr(6, 1) = Range("G10").Value
SetArr(6, 2) = Range("G11").Value
SetArr(6, 3) = 0
SetArr(7, 1) = Range("H10").Value
SetArr(7, 2) = Range("H11").Value
SetArr(7, 3) = 0
SetArr(8, 1) = Range("I10").Value
SetArr(8, 2) = Range("I11").Value
SetArr(8, 3) = 0
SetArr(9, 1) = Range("J10").Value
SetArr(9, 2) = Range("J11").Value
SetArr(9, 3) = 0
SetArr(10, 1) = Range("K10").Value
SetArr(10, 2) = Range("K11").Value
SetArr(10, 3) = 0
SetArr(11, 1) = Range("L10").Value
SetArr(11, 2) = Range("L11").Value
SetArr(11, 3) = 0
SetArr(12, 1) = Range("M10").Value
SetArr(12, 2) = Range("M11").Value
SetArr(12, 3) = 0

sWarn = ""
agents = Range("A10").Value
nSkills = Range("A11").Value

AgMngObj.AcdStartUp -1, "", cvsSrv.ServerKey, -1
AgMngObj.OleAgentSetSkill 1, "" & agents & "", 1, 0, 0, 0, nSkills, SetArr, sWarn ' note the nSKills for # of skills in SetArr

Set AgMngObj = Nothing
Else

End If
End If

Set cvsApp = Nothing
Set cvsConn = Nothing
Set cvsSrv = Nothing

cvsConn.Logout
cvsConn.Disconnect


End Sub
 
I can easily help you accomplish this. Just need a few more bits of info and for you gather some data for me and I'll gladly write the code for you (Like the practice).

1) Does your template agent Skills Change ?

2) Go To Dictionary > (Report Tab) > Agent Group Members > Input Group Name (Click ok) > Report > Script
In this window Go to : Report > Script.... > Save Script . Open in notepad ++ by right clicking the file > Upload info here

3) Go to reskill your Template agent and record script and same thing open in notepad ++ and upload code
Agent Administration > Change Agent Skill > Input Template agent > Choose Script and Save and upload here


With number 2 & 3 I can write the code for you and I'll ensure to put extensive comments so you can recreate if needed.
 
Upvote 0

Excel Facts

Round to nearest half hour?
Use =MROUND(A2,"0:30") to round to nearest half hour. Use =CEILING(A2,"0:30") to round to next half hour.
Forgot to ask

Are more than one user going to us this? And if so do you all have access to a network share folder? (Assuming yes to both but just double checking.)

I can easily help you accomplish this. Just need a few more bits of info and for you gather some data for me and I'll gladly write the code for you (Like the practice).

1) Does your template agent Skills Change ?

2) Go To Dictionary > (Report Tab) > Agent Group Members > Input Group Name (Click ok) > Report > Script
In this window Go to : Report > Script.... > Save Script . Open in notepad ++ by right clicking the file > Upload info here

3) Go to reskill your Template agent and record script and same thing open in notepad ++ and upload code
Agent Administration > Change Agent Skill > Input Template agent > Choose Script and Save and upload here


With number 2 & 3 I can write the code for you and I'll ensure to put extensive comments so you can recreate if needed.
 
Upvote 0
Thanks

1. the skills in the agent template will change over time (there will be multiple templates, 1 per agent group, they follow a naming convention incrementing the last digit.)

2. Agent Groups.acsup
'LANGUAGE=ENU
'SERVERNAME=10.1.2.131
Public Sub Main()


'## cvs_cmd_begin
'## ID = 1050
'## Description = "Dictionary: Form: Agent Groups: No action"
'## Parameters.Add "No action","_Action"
'## Parameters.Add "Agent Groups","_FormName"
'## Parameters.Add "Dictionary: Form: Agent Groups: No action","_Description"
'## Parameters.Add "Dictionary","_Subsystem"
'## Parameters.Add "Dictionary","_CatalogName"
'## Parameters.Add "1","_ACD"
'## Parameters.Add "True","_Interactive"
'## Parameters.Add "ENU","_Language"
'## Parameters.Add "6625","_Top"
'## Parameters.Add "9600","_Left"
'## Parameters.Add "6000","_Width"
'## Parameters.Add "2500","_Height"
'## Parameters.Add "1","_NumProperties"
'## Parameters.Add "MSC SS_mbr Team 1","grp_name"





On Error Resume Next


cvsSrv.Dictionary.ACD = 1
b = cvsSrv.Dictionary.CreateOperation("Agent Groups",Op)
If b Then
Op.Window.Top = 6625
Op.Window.Left = 9600
Op.Window.Width = 6000
Op.Window.Height = 2500
Op.SetProperty "grp_name","MSC SS_mbr Team 1"


End If


If Not cvsSrv.Interactive Then cvsSrv.ActiveTasks.Remove Op.TaskID
Set Op = Nothing
'## cvs_cmd_end


End Sub


3. ScriptAdmin.acsauto

'LANGUAGE=ENU
'SERVERNAME=10.1.2.131
Public Sub Main()


'## cvs_cmd_begin
'## ID = 8000
'## Description = "Acd Administration, Change Agent Skills 32850 - MSA Skill Template 1"
'## Parameters.Add "Acd Administration","SubSystem"
'## Parameters.Add "Change Agent Skills 32850 - MSA Skill Template 1","FormName"
'## Parameters.Add "-1","DummyType"
'## Parameters.Add "-1","DummyAcd"
'## Parameters.Add "1","Action"
'## Parameters.Add "1","SetSk_Acd"
'## Parameters.Add "32850","SetSk_AgentID"
'## Parameters.Add "1","SetSk_CallHandPref"
'## Parameters.Add "0","SetSk_DirectSkill"
'## Parameters.Add "0","SetSk_DirectFirst"
'## Parameters.Add "0","SetSk_ServiceObjective"
'## Parameters.Add "21","SetSk_NumofSkills"
'## Parameters.Add "14","BeginSetSkills"
'## Parameters.Add "20",""
'## Parameters.Add "1",""
'## Parameters.Add "0",""
'## Parameters.Add "40",""
'## Parameters.Add "1",""
'## Parameters.Add "0",""
'## Parameters.Add "11",""
'## Parameters.Add "6",""
'## Parameters.Add "0",""
'## Parameters.Add "71",""
'## Parameters.Add "6",""
'## Parameters.Add "0",""
'## Parameters.Add "21",""
'## Parameters.Add "6",""
'## Parameters.Add "0",""
'## Parameters.Add "31",""
'## Parameters.Add "6",""
'## Parameters.Add "0",""
'## Parameters.Add "32",""
'## Parameters.Add "5",""
'## Parameters.Add "0",""
'## Parameters.Add "22",""
'## Parameters.Add "6",""
'## Parameters.Add "0",""
'## Parameters.Add "36",""
'## Parameters.Add "6",""
'## Parameters.Add "0",""
'## Parameters.Add "45",""
'## Parameters.Add "6",""
'## Parameters.Add "0",""
'## Parameters.Add "41",""
'## Parameters.Add "6",""
'## Parameters.Add "0",""
'## Parameters.Add "42",""
'## Parameters.Add "5",""
'## Parameters.Add "0",""
'## Parameters.Add "34",""
'## Parameters.Add "6",""
'## Parameters.Add "0",""
'## Parameters.Add "46",""
'## Parameters.Add "6",""
'## Parameters.Add "0",""
'## Parameters.Add "47",""
'## Parameters.Add "6",""
'## Parameters.Add "0",""
'## Parameters.Add "38",""
'## Parameters.Add "6",""
'## Parameters.Add "0",""
'## Parameters.Add "72",""
'## Parameters.Add "6",""
'## Parameters.Add "0",""
'## Parameters.Add "15",""
'## Parameters.Add "4",""
'## Parameters.Add "0",""
'## Parameters.Add "80",""
'## Parameters.Add "6",""
'## Parameters.Add "0",""
'## Parameters.Add "82",""
'## Parameters.Add "4",""
'## Parameters.Add "0",""
'## Parameters.Add "25",""
'## Parameters.Add "6",""
'## Parameters.Add "0",""
'## Parameters.Add "","SetSk_Warning"




On Error Resume Next

set AgMngObj = cvsSrv.AgentMgmt
ReDim SetArr (21,3)
SetArr(1,1)= 20
SetArr(1,2)= 1
SetArr(1,3)= 0
SetArr(2,1)= 40
SetArr(2,2)= 1
SetArr(2,3)= 0
SetArr(3,1)= 11
SetArr(3,2)= 6
SetArr(3,3)= 0
SetArr(4,1)= 71
SetArr(4,2)= 6
SetArr(4,3)= 0
SetArr(5,1)= 21
SetArr(5,2)= 6
SetArr(5,3)= 0
SetArr(6,1)= 31
SetArr(6,2)= 6
SetArr(6,3)= 0
SetArr(7,1)= 32
SetArr(7,2)= 5
SetArr(7,3)= 0
SetArr(8,1)= 22
SetArr(8,2)= 6
SetArr(8,3)= 0
SetArr(9,1)= 36
SetArr(9,2)= 6
SetArr(9,3)= 0
SetArr(10,1)= 45
SetArr(10,2)= 6
SetArr(10,3)= 0
SetArr(11,1)= 41
SetArr(11,2)= 6
SetArr(11,3)= 0
SetArr(12,1)= 42
SetArr(12,2)= 5
SetArr(12,3)= 0
SetArr(13,1)= 34
SetArr(13,2)= 6
SetArr(13,3)= 0
SetArr(14,1)= 46
SetArr(14,2)= 6
SetArr(14,3)= 0
SetArr(15,1)= 47
SetArr(15,2)= 6
SetArr(15,3)= 0
SetArr(16,1)= 38
SetArr(16,2)= 6
SetArr(16,3)= 0
SetArr(17,1)= 72
SetArr(17,2)= 6
SetArr(17,3)= 0
SetArr(18,1)= 15
SetArr(18,2)= 4
SetArr(18,3)= 0
SetArr(19,1)= 80
SetArr(19,2)= 6
SetArr(19,3)= 0
SetArr(20,1)= 82
SetArr(20,2)= 4
SetArr(20,3)= 0
SetArr(21,1)= 25
SetArr(21,2)= 6
SetArr(21,3)= 0


AgMngObj.AcdStartUp -1, "", cvsSrv.ServerKey, -1
AgMngObj.OleAgentSetSkill 1, "32850",1, 0,0, 0, 21,SetArr, ""



'## cvs_cmd_end


End Sub


(4.) I was wanting to schedule these scripts nightly, so was thinking of running them as 'CMS' from an administration server (with CMS Supervisor installed).


thanks



Forgot to ask

Are more than one user going to us this? And if so do you all have access to a network share folder? (Assuming yes to both but just double checking.)
 
Upvote 0
Great! I'll start work on it and give me about 24-36 hrs. (Middle of work week)

To just give some reference to my thoughts on your answers :

1) I'll have to check if Avaya can get the skills from the Template agent or if the Skills will have to be saved in excel. Best thing for this would be a sheet in excel that would allows the user to input skill and priority to build the template. THis will be sort of the same since when you would change the template agent you would have to do so manually. So this would eliminate the need to even have template agents in avaya.

2) Since you have multiple groups. We can store the list of all the group names in excel and have the code run through them all.

3) With the further info of multiple groups and multiple templates of skills this also ties into #4 . How many agents are in each group? I wonder this because avaya can ony gate 50 agents at a time (I will test if this is different through code ) at the moment when I'm regating 150+ agents with my code I have to click the dialouge box that appears showing the agents reskilled (Next on my agenda on updating my code is to remove the need for this).

4) Avaya Scripts can be set in windows task scheduler to run. With this in mind could be possible to make excel build the avaya scripts (excel makes all the adjustments to the numbers in the script and saves like editing them in notepad ++ )

Other than the above idea which if its more than fifty agents being gated per group the code would be crazy extensive. I'm thinking having someone do the task of running the sheet would be better.

Reason I asked about the shared folder and multiple users was because avaya scripting is able to save the agent group list as an HTML file allowing to save the need to code more and set excel to get the list of agents from a simple webquery
 
Last edited:
Upvote 0
Tyger0951


1) could use a sheet shared in sharepoint

2) sounds good

3) total of 130 agents, largest group 50

4) is there any difference in the scripts between interactive and scheduled scripts?

Thanks for your efforts
 
Upvote 0
Interactive Script : These are scripts you can write basicly record in avaya that just opens up the what ever you want (Reskilling , Agent Group Reports, VND reports ect ...) They are useful as they open up the windows for you with the data preset in them. If you want to test this the ScriptAdmin.acsauto you created to get the info for me you can run it. (If when you saved it you choose interactive in the drop down more info below on this)

The "script" option found in most avaya windows under Actions will allow you to record. When you save it gives you options of interactive or automatic (may not exact terms but get the point)

The interactive option when ran just creates the window and inputs all the data (i.e. opens reskilling window specific agent already pulled up) but requires the user to complete task by clicking okay.

The automatic option when ran opens no visble windows and runs the task. (ie Reskills agents all agents that had been in the window when recorded)

The automated script file can be set to run through windows task scheduler.

Now the issue with reskilling agents with the automated scripts instead of using excel and vba is that agents in script are locked and cannot be changed nor can the skill sets and priorities . Since call centers are quite dynamic with agents being added, removed, and moved reskilling in this method it not the best idea. These automated scripts in my opinion are best to have reports saved automaticly overnight (scheduled in windows to do so) for review in the morning. Thats why when I mentioned if you wanted to reskill completely automated it would take a lot of work in coding to have excel open the scripts in notepad++ and edit . Using excel vba to control avaya with a user running/monitioring will allow/force them to click ok after each group is gated which allows for verification of completion.

Does each groups Skills and priorities ever change?
a) If they don't then can set the skills and priorities in the vba code
b) If they do change would would need to have a Sheet that allows users to modify the skills and prioritty , then the vba codes uses those to reference.


Side Note to answer the question. Got a good start on your code already since quite dynamic might take bit longer. But will be posting a basic version of it for you and to test. :)
 
Upvote 0
Tyger0951

Thanks, i was wondering if a script created as interactive can be run scheduled?

The agent reset intention is that as agent skill assignments are amended during operating hours depending upon calls then out of hours the agents' skills can be reset using the appropriate templates and be ready for the next day.


a) skills & skill level do change as campaigns come on stream.
b) agree the sheet will need skill level, we don't use reserve.


thanks again


Interactive Script : These are scripts you can write basicly record in avaya that just opens up the what ever you want (Reskilling , Agent Group Reports, VND reports ect ...) They are useful as they open up the windows for you with the data preset in them. If you want to test this the ScriptAdmin.acsauto you created to get the info for me you can run it. (If when you saved it you choose interactive in the drop down more info below on this)

The "script" option found in most avaya windows under Actions will allow you to record. When you save it gives you options of interactive or automatic (may not exact terms but get the point)

The interactive option when ran just creates the window and inputs all the data (i.e. opens reskilling window specific agent already pulled up) but requires the user to complete task by clicking okay.

The automatic option when ran opens no visble windows and runs the task. (ie Reskills agents all agents that had been in the window when recorded)

The automated script file can be set to run through windows task scheduler.

Now the issue with reskilling agents with the automated scripts instead of using excel and vba is that agents in script are locked and cannot be changed nor can the skill sets and priorities . Since call centers are quite dynamic with agents being added, removed, and moved reskilling in this method it not the best idea. These automated scripts in my opinion are best to have reports saved automaticly overnight (scheduled in windows to do so) for review in the morning. Thats why when I mentioned if you wanted to reskill completely automated it would take a lot of work in coding to have excel open the scripts in notepad++ and edit . Using excel vba to control avaya with a user running/monitioring will allow/force them to click ok after each group is gated which allows for verification of completion.

Does each groups Skills and priorities ever change?
a) If they don't then can set the skills and priorities in the vba code
b) If they do change would would need to have a Sheet that allows users to modify the skills and prioritty , then the vba codes uses those to reference.


Side Note to answer the question. Got a good start on your code already since quite dynamic might take bit longer. But will be posting a basic version of it for you and to test. :)
 
Upvote 0
An interactive script can be set to run but as mentioned before INTERACTIVE means user needs to be present to click notification boxes after script completes. If you save the script as Automatic script (*.acsauto) instead of Interactive Script (*.acsup) you can use windows task scheduler to run the acsauto script. So if you record a script regating a group of agents you can schedule windows to run that nightly. Problem with this is that the agents stored in the script cannot be changed unless you edit the script in notepad ++. So any time have agents move groups you would have to update the scripts vs using excel to pull the agent lists.
 
Upvote 0
Here is a test code for you to try. I've encountered some errors in my code when I have not skilled an agent when starting avaya for my day. So before you run this code make sure you gate someone as you normally would.

Create a sheet and name it GroupNames and in Cell A2 input MSC SS_mbr Team 1 and run code after updating the two sections specified below.

This is only a test to gather the one groups agents list and gate them to the MSC SS_mbr Team 1 gating scheme. I have not made it yet for multiple gating schemes nor the sheet to set the array.

Make sure to update these in the code

Code:
Surl = "C:\Users\tguzman\Desktop\ReskillTest\AgentList.HTML" 'Location to save file  < Update to your save location


and

Code:
With ActiveSheet.QueryTables.Add(Connection:= _
       "URL;file:///C:/Users/tguzman/Desktop/ReskillTest/Agentlist.HTML", Destination _
        :=Range("$A$1")) ' Update to Surl location



Code:
Sub ChangeAllSkills()
 
Dim Agents As String
Dim cvsApp As Object
Dim cvsConn As Object
Dim cvsSrv As Object
Dim SetArr() As Variant
Dim sWarn As String
Dim Skills() As Variant
Dim myrange As Range
 
Set cvsApp = CreateObject("ACSUP.cvsApplication")
Set cvsConn = CreateObject("ACSCN.cvsConnection")
 
  
Set cvsSrv = cvsApp.Servers(1) ' Uses current avayacms open Note if you get blanks on skilling ensuure to manually gate an agent this stores the info in the active avaya instance
 
Surl = "C:\Users\tguzman\Desktop\ReskillTest\AgentList.HTML" 'Location to save file  < Update to your save location
Set myrange = Sheets("GroupNames").Range("A2", Range("A2").End(xlDown)) ' Sets length of group names.
 
For Each cell In myrange
ActiveCell = Cell
If Cell = "" Then Exit Sub

   cvsSrv.Dictionary.ACD = 1
   Set Info = cvsSrv.Dictionary.Reports("Dictionary\\Agent Group Members")
' possible to move create report out of for to use all same window need to test
       b = cvsSrv.Dictionary.CreateReport(Info, Rep) 'Opens Report window
       If b Then
          Rep.SetProperty "Agent Group", "" & cell & ""  ' In puts the Group Name into blank
         b = Rep.SaveHTML("" & Surl & "", False, "") ' Saves List of agent names and id to Location specified in Surl
          Rep.Quit ' Closes Window
              If Not cvsSrv.Interactive Then cvsSrv.ActiveTasks.Remove Rep.TaskID
          Set Rep = Nothing ' clears rep so could be used again
       End If
Set Info = Nothing
 
' Pull Data from Saved Location
 
Worksheets.Add.Name = "AgentList" ' Addes new worksheet
Sheets("AgentList").Select ' Makes active sheet for query
 
With ActiveSheet.QueryTables.Add(Connection:= _
       "URL;file:///C:/Users/tguzman/Desktop/ReskillTest/Agentlist.HTML", Destination _
        :=Range("$A$1")) ' Update to Surl location
        .Name = "AgentList"
        .FieldNames = True
        .RowNumbers = False
        .FillAdjacentFormulas = False
        .PreserveFormatting = True
        .RefreshOnFileOpen = False
        .BackgroundQuery = True
        .RefreshStyle = xlInsertDeleteCells
        .SavePassword = False
        .SaveData = True
        .AdjustColumnWidth = True
        .RefreshPeriod = 0
        .WebSelectionType = xlAllTables
        .WebFormatting = xlWebFormattingNone
        .WebPreFormattedTextToColumns = True
        .WebConsecutiveDelimitersAsOne = True
        .WebSingleBlockTextImport = False
        .WebDisableDateRecognition = False
        .WebDisableRedirections = False
        .Refresh BackgroundQuery:=False
    End With
   
 
Application.ScreenUpdating = False ' Turns off screenupdating to make update to sheet faster
  
 
Range("b2").Select 'Selects first id
 
For Each Item In Range("B2:B900") ' Range of id's
ActiveCell.Offset(1, 0).EntireRow.Insert ' Insert Row
ActiveCell.Offset(1, 0).Value = ";"  ' add ;
ActiveCell.Offset(2, 0).Select ' Selects next id or possible next
        If ActiveCell = "" Then
        ActiveCell.Offset(-1, 0).Delete
        Exit For  ' If no then delete previous ; and move on
    End If
    Next Item
 
Range("c2").Select 'Selects Cell to paste agent ids in correct format
 
  ActiveCell.Formula = "=CONCATENATE(B2,B3,B4,B5,B6,B7,B8,B9,B10,B11,B12,B13,B14,B15,B16,B17,B18,B19,B20,B21,B22,B23,B24,B25,B26,B27,B28,B29,B30,B31,B32,B33,B34,B35,B36,B37,B38,B39,B40,B41,B42,B43,B44,B45,B46,B47,B48,B49,B50,B51,B52,B53,B54,B55,B56,B57,B58,B59,B60,B61,B62,B63,B64,B65,B66,B67,B68,B69,B70,B71,B72,B73,B74,B75,B76,B77,B78,B79,B80,B81,B82,B83,B84,B85,B86,B87,B88,B89,B90,B91,B92,B93,B94,B95,B96,B97,B98,B99,B100) " ' Formula to combine ids and ; for gating list
 
Application.ScreenUpdating = True ' Turns back on screenupdating
 
 
ReDim SetArr(21, 3)
SetArr(1, 1) = 20
SetArr(1, 2) = 1
SetArr(1, 3) = 0
SetArr(2, 1) = 40
SetArr(2, 2) = 1
SetArr(2, 3) = 0
SetArr(3, 1) = 11
SetArr(3, 2) = 6
SetArr(3, 3) = 0
SetArr(4, 1) = 71
SetArr(4, 2) = 6
SetArr(4, 3) = 0
SetArr(5, 1) = 21
SetArr(5, 2) = 6
SetArr(5, 3) = 0
SetArr(6, 1) = 31
SetArr(6, 2) = 6
SetArr(6, 3) = 0
SetArr(7, 1) = 32
SetArr(7, 2) = 5
SetArr(7, 3) = 0
SetArr(8, 1) = 22
SetArr(8, 2) = 6
SetArr(8, 3) = 0
SetArr(9, 1) = 36
SetArr(9, 2) = 6
SetArr(9, 3) = 0
SetArr(10, 1) = 45
SetArr(10, 2) = 6
SetArr(10, 3) = 0
SetArr(11, 1) = 41
SetArr(11, 2) = 6
SetArr(11, 3) = 0
SetArr(12, 1) = 42
SetArr(12, 2) = 5
SetArr(12, 3) = 0
SetArr(13, 1) = 34
SetArr(13, 2) = 6
SetArr(13, 3) = 0
SetArr(14, 1) = 46
SetArr(14, 2) = 6
SetArr(14, 3) = 0
SetArr(15, 1) = 47
SetArr(15, 2) = 6
SetArr(15, 3) = 0
SetArr(16, 1) = 38
SetArr(16, 2) = 6
SetArr(16, 3) = 0
SetArr(17, 1) = 72
SetArr(17, 2) = 6
SetArr(17, 3) = 0
SetArr(18, 1) = 15
SetArr(18, 2) = 4
SetArr(18, 3) = 0
SetArr(19, 1) = 80
SetArr(19, 2) = 6
SetArr(19, 3) = 0
SetArr(20, 1) = 82
SetArr(20, 2) = 4
SetArr(20, 3) = 0
SetArr(21, 1) = 25
SetArr(21, 2) = 6
SetArr(21, 3) = 0
 
Agents = Sheets("AgentList").Range("C2").Value 'Uses agent id list in correct id;id;id format
 
Set AgMngObj = cvsSrv.AgentMgmt
AgMngObj.AcdStartUp -1, "", cvsSrv.ServerKey, -1
AgMngObj.OleAgentSetSkill_R16_1 2, "" & Agents & "", 1, 0, 0, 0, 21, SetArr, "" ' OleAgentSetSkill instead of OleAgentSetSkill_R_16_1_2
 
 Sheets("AgentList").Delete

Cell.Offset(1, 0).Select
 
 
 Next  ' starts next group
 
Set AgMngObj = Nothing
Set cvsApp = Nothing
Set cvsConn = Nothing
Set cvsSrv = Nothing
 
End Sub


This code will grab the group name in sheet GroupNames in cell A2 open and save the list of agents , then input the agents into a new page, reformat the list to proper format for gating then gates those agents with MSC SS_mbr Team 1 gating scheme.


Make sure to have all References set in vba

Connection Component
Server Component
Report Component
Catalog Component
Application Component
 
Last edited:
Upvote 0
Thanks,

that explains it clearly.


An interactive script can be set to run but as mentioned before INTERACTIVE means user needs to be present to click notification boxes after script completes. If you save the script as Automatic script (*.acsauto) instead of Interactive Script (*.acsup) you can use windows task scheduler to run the acsauto script. So if you record a script regating a group of agents you can schedule windows to run that nightly. Problem with this is that the agents stored in the script cannot be changed unless you edit the script in notepad ++. So any time have agents move groups you would have to update the scripts vs using excel to pull the agent lists.
 
Upvote 0

Forum statistics

Threads
1,217,383
Messages
6,136,244
Members
450,001
Latest member
KWeekley08

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top