0

在我工作的联络中心,他们给了我一份工资单,其中包含基于座席的信息以及与每个人相对应的技能。我需要创建一个 VBA 代码,以便在 CMS Supervisor 中自动复制对该工资单所做的更改,并且代理将能够接收相应技能下的呼叫。供您参考,我附上了一张我的工资单的图片。工资单

我找到了几个代码,但它们与我的工资单不匹配。

4

1 回答 1

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

注意:为此,您需要检查这些库(带有“FALTA”的库) 图书馆

注意 2:这适用于交互式应用程序,因此 Avaya 必须打开并且用户登录。

于 2019-05-06T19:45:23.943 回答