在我工作的联系中心,他们给了我一张工资单,其中包含基于座席和与他们每个人相对应的技能的信息。我需要创建一个VBA代码,以便在工资单中所做的更改会自动复制到CMS Supervisor中,并使该代理能够接收相应技能下的呼叫。 作为参考,我附上一张工资单的图片。Payroll
我找到了几个密码,但与我的工资单不符。
答案 0 :(得分:0)
这是我的工作表的样子:
这是将改变所有人技能的代码(他们只会在这里使用技能,这不会增加技能)
这是我的代码:
Option Explicit
Dim cvsApp As New ACSUP.cvsApplication
Dim cvsConn As New ACSCN.cvsConnection
Dim cvsSrv As New ACSUPSRV.cvsServer
Dim Rep As New ACSREP.cvsReport
Sub SkillAgentes()
Application.ScreenUpdating = False
Set cvsSrv = cvsApp.Servers(1)
Dim LastRow As Long, LastCol As Long
Dim ws As Worksheet
Dim F As Integer, C As Integer, i As Integer, S As Integer, Prtr As Integer, ACD As Integer
Dim Skill As String, Agentes As String
Dim SetArr() As Variant
Dim AgMngObj As Object
Set ws = ThisWorkbook.Sheets("Cambios Skill")
Set AgMngObj = cvsSrv.AgentMgmt
LastRow = ws.Range("B" & ws.Rows.Count).End(xlUp).Row
ACD = 2
For i = 2 To LastRow
S = 1
LastCol = ws.Cells(i, 2).End(xlToRight).Column
Agentes = ws.Cells(i, ws.Cells.Find("login").Column)
ReDim SetArr((LastCol - 2) / 2, 4)
For C = 3 To LastCol Step 2
On Error Resume Next
Skill = ws.Cells(i, C)
Prtr = ws.Cells(i, C + 1)
SetArr(S, 1) = Skill
SetArr(S, 2) = Prtr
SetArr(S, 3) = 0
SetArr(S, 4) = 0
S = S + 1
Next C
AgMngObj.AcdStartUp -1, "", cvsSrv.ServerKey, -1
AgMngObj.OleAgentSetSkill_R16_1 ACD, Agentes, 1, 0, 0, 0, S - 1, SetArr, ""
Next i
ThisWorkbook.Save
MsgBox "Agentes puestos en sus skill de origen."
End Sub
注意2:这适用于交互式应用程序,因此必须打开Avaya并登录用户。