UCCE Script

Target Type Values Meaning
0 Unknown
1 Service
2 Skill Group
3 Agent
4 Translation Route
5 Agent Administration Group
6 Announcement
7 Call Type
8 Enterprise Service
9 Enterprise Skill Group
10 Region
11 Dialed Number
12 Logical Interface Controller
13 Physical Interface Controller
14 Peripheral
15 Routing Client
16 Trunk Group
17 Route
18 Peripheral Target
19 Label
20 Master Script
21 Script Table
22 Script Table Column
23 Script
24 Schedule
25 ICR View
26 View Column
27 Network Trunk Group
28 Service Array
29 Application Gateway
30 Device Target (deprecated)
31 User Variable
32 User Formula
33 Network VRU Script
34 Scheduled Target
35 Network VRU
36 Skill Group Member
37 Expanded Call Variable
38 Agent Team
39 Campaign
40 Dialer
41 Import Rule
42 Query Rule
43 Campaign Query Rule
44 Dialer Port Map
45 Message Category
46 Message Destination
47 Response Template
48 Enterprise Route
49 Person
50 Media Routing Domain Member
51 Media Routing Domain
52 Application Path
53 Peripheral MRD
54 Script Queue Meters
55 Campaign Target Sequence
56 Microapp Defaults
57 Microapp Currency
58 Microapp Locale
59 Object Call
60 Dialer Skill Group
61 ECC Payload
62 Call Type Skill Group
63 Translation Route Meters
64 Attribute
65 Precision Queue
66 Precision Queue Step
67 Precision Queue Term
68 Precision Queue Step Member
69 Attribute Set
70 Attribute Set Member
71 Precision Queue Member
72 Congestion Control
73 Precision Queue Step Meter
80 Contact Share Group
81 Machine Address
82 Machine Host
83 Machine Service
84 Department
85 Contact Share Rule
86 Contact Share Queue
87 Object Last
SELECT 
 MasterScriptName = MS.EnterpriseName
,ESGName = ESG.EnterpriseName
,CurrentVersion = MS.CurrentVersion
,ScriptVersion = S.Version
,SCR.[ScriptID]
,[LocalID]
,[TargetType]
,[ForeignKey]
 
  FROM [Ref_Script_Cross_Reference] SCR
  LEFT JOIN Ref_Script S ON S.ScriptID = SCR.ScriptID
  LEFT JOIN Ref_Master_Script MS ON MS.MasterScriptID = S.MasterScriptID
  LEFT JOIN Enterprise_Skill_Group ESG ON ESG.EnterpriseSkillGroupID = SCR.ForeignKey
 
  WHERE SCR.TargetType = '9' AND (CurrentVersion = S.Version)
  ORDER BY MS.EnterpriseName

All Scripts (including old scripts) which reference an Enterprise Skillgroup

SELECT 
 MasterScriptName = MS.EnterpriseName
,ESGName = ESG.EnterpriseName
 
 
  FROM [Ref_Script_Cross_Reference] SCR
  LEFT JOIN Ref_Script S ON S.ScriptID = SCR.ScriptID
  LEFT JOIN Ref_Master_Script MS ON MS.MasterScriptID = S.MasterScriptID
  LEFT JOIN Enterprise_Skill_Group ESG ON ESG.EnterpriseSkillGroupID = SCR.ForeignKey
 
  WHERE SCR.TargetType = '9' 
 
  GROUP BY MS.EnterpriseName, ESG.EnterpriseName
  ORDER BY MS.EnterpriseName, ESG.EnterpriseName

Which Enterprise Skillgroups are NOT in any scripts (and can be easily deleted)

SELECT [EnterpriseSkillGroupID]
      ,[EntityID]
      ,[EnterpriseName]
      ,[Description]
      ,[DepartmentID]
      ,[ChangeStamp]
      ,[DateTimeStamp]
      ,myTemp1.ESGID
  FROM [Enterprise_Skill_Group] ESG
  LEFT  JOIN 
  (SELECT DISTINCT
   ESGID = ESG.EnterpriseSkillGroupID
  ,ESGName = ESG.EnterpriseName
  FROM [Ref_Script_Cross_Reference] SCR
  LEFT JOIN Ref_Script S ON S.ScriptID = SCR.ScriptID
  LEFT JOIN Ref_Master_Script MS ON MS.MasterScriptID = S.MasterScriptID
  LEFT JOIN Enterprise_Skill_Group ESG ON ESG.EnterpriseSkillGroupID = SCR.ForeignKey
  WHERE SCR.TargetType = '9') 
  myTemp1 ON myTemp1.ESGID = ESG.EnterpriseSkillGroupID
 
  WHERE myTemp1.ESGID IS NULL
  ORDER BY ESG.EnterpriseName

Calltypes

SELECT 
	 MasterScriptName = MS.EnterpriseName
	,CurrentVersion = MS.CurrentVersion
	,ScriptVersion = S.Version
	,CT.EnterpriseName
	,ScriptID = SCR.[ScriptID]
	,[LocalID] = SCR.LocalID
	,[TargetType] = SCR.TargetType
	,[ForeignKey] = SCR.ForeignKey	
 
  FROM [Ref_Script_Cross_Reference] SCR
  LEFT JOIN Ref_Script S ON S.ScriptID = SCR.ScriptID
  LEFT JOIN Ref_Master_Script MS ON MS.MasterScriptID = S.MasterScriptID
  LEFT JOIN Call_Type CT ON CT.CallTypeID = SCR.ForeignKey
 
  WHERE SCR.TargetType = '7'
  ORDER BY MS.EnterpriseName
This website uses cookies. By using the website, you agree with storing cookies on your computer. Also you acknowledge that you have read and understand our Privacy Policy. If you do not agree leave the website.More information about cookies