Delete Extension Duplicates in ACD Agents Combo in CyDashboard

This article provides instructions to run sql scripts to prune extension duplicates in the ACD agents Extension list in CyDashboard.

  1. Stop CyReport Engine service.

  2. Backup Database ‘CyTrack’

  3. run, against the database:

    • select
      eas.id,
      eas.id_ext,
      eas.extensionnumber,
      e.*

      from
      tblDirExtAcdStationState as eas
      inner join tblDirExt as e on eas.id_ext = e.id

      where extensionnumber in
      (select extensionnumber from tblDirExtAcdStationState
      group by extensionnumber
      having count(*) > 1)
      and eas.extensionnumber != e.num

  4. Run, against the database:

    • delete from tblDirExtAcdStationState where id in
      (select
      eas.id
      from
      tblDirExtAcdStationState as eas
      inner join tblDirExt as e on eas.id_ext = e.id

      where extensionnumber in
      (select extensionnumber from tblDirExtAcdStationState
      group by extensionnumber
      having count(*) > 1)
      and eas.extensionnumber != e.num)

  5. Start CyReport Engine service.

  6. Check ACD Agents combo to ensure extensions are not duplicated any more.