Avaya Support Forums  

Go Back   Avaya Support Forums > Contact Center Applications

Reply
 
Thread Tools Search this Thread Display Modes
  #1  
Old 01-05-2017, 01:52 AM
rnicul rnicul is offline
Member
 
Join Date: Jan 2017
Posts: 3
rnicul has 10 reputation points
Default CMS Avaya to VBA report - Set up timezone

Hello guys,

Right now i am working on a new project where i have to automatize a dashboard.
This dashboard is getting information from avaya scripts.

I searched for the last 2 weeks a script in VBA that actually gets info from avaya reports and imports them to excel file in a certain sheet.

Well, my problem is that i have to export 1 report with 6 different timezones.

For example:
Historical\Designer\Multi Date Multi Split Skill interval - Europe/Brussels timezone
Historical\Designer\Multi Date Multi Split Skill interval - US/Eastern
etc.

Below is my VBA code that works with my cms but it does not take in account that my timezone is set as Europe/Brussels and it exports in default timezone.

Please, help me out so i can ease my work with few hours a week

Code:
Code:
Sub EMEA()


Dim cvsApp As Object
Dim cvsConn As Object
Dim cvsSrv As Object
Dim Rep As Object
Dim Info As Object, Log As Object, b As Object
Dim CMSRunning As String
Dim objWMIcimv2 As Object
Dim objProcess As Object
Dim objList As Object


CMSRunning = "acsSRV.exe"


Set objWMIcimv2 = GetObject("winmgmts:" _
& "{impersonationLevel=impersonate}!\\.\root\cimv2") 'Connect to CIMV2 Namespace


Set objList = objWMIcimv2.ExecQuery _
("select * from win32_process where name='" & CMSRunning & "'") 'determine if CMS is running


If objList.Count = 0 Then 'If 0 then process isn't running


End If


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




Application.ScreenUpdating = 0


Set cvsSrv = cvsApp.Servers(1)
Application.ScreenUpdating = 1


AgGrp = InputBox("Enter Agent Group Name", "Agent Group", "952;953;271;270;221;222;223;224;231;233;232;234;235;246;241;243;242;247;249;245;244;248;255;258;256;259;257;261;262;260") 'change as needed for variables to enter into report
RpDate = InputBox("Enter Date", "Date", "-1") 'change as needed for variables to enter into report




'Start code from CMS Export script
On Error Resume Next


cvsSrv.Reports.ACD = 1
Set Info = cvsSrv.Reports.Reports("Historical\Designer\Multi Date Multi Split Skill interval")


b = cvsSrv.Reports.CreateReport(Info, Rep)
If b Then


Rep.Window.Top = 1830
Rep.Window.Left = 975
Rep.Window.Width = 17610
Rep.Window.Height = 11910


Rep.SetProperty "Splits/Skills", AgGrp 'change as needed for report variables


Rep.SetProperty "Dates", RpDate 'change as needed for report variables
Rep.SetProperty "Times", "00:00-23:30"
Rep.TimeZone = "Europe/Brussels"
b = Rep.ExportData("", 9, 0, True, True, True)
Rep.Quit


If Not cvsSrv.Interactive Then cvsSrv.ActiveTasks.Remove Rep.TaskID
Set Rep = Nothing
End If


Set Info = Nothing


' End code from CMS Export Script




cvsConn.logout
cvsConn.Disconnect
cvsSrv.Connected = False
Set Log = Nothing
Set Rep = Nothing
Set cvsSrv = Nothing
Set cvsConn = Nothing
Set cvsApp = Nothing
Set Info = Nothing




    Range("A1").Select
    ActiveSheet.Paste
    
    End Sub
Thank you guys.
Reply With Quote
  #2  
Old 01-05-2017, 10:49 PM
shaikht shaikht is offline
Genius
.
 
Join Date: Feb 2010
Posts: 246
shaikht has 25 to 49 reputation pointsshaikht has 25 to 49 reputation pointsshaikht has 25 to 49 reputation points
Default

Hi,

I have no exposure to VB scripting but depending on supervisor design you need to make changes in your script to ask timezone from user or script need to pick it from list. Whenever we pull report from supervisor, it will pull report on default timezone (set on CMS server), if user want different timezone, user need to manually pick it from the configured list and then pull report.

I hope it helps.
Reply With Quote
  #3  
Old 01-06-2017, 02:26 AM
rnicul rnicul is offline
Member
 
Join Date: Jan 2017
Posts: 3
rnicul has 10 reputation points
Default

Hello, i am 100% positive that it works. Someone gave me a tip but it didn't work.

I know that i have to take it manually but unfortunately all the reports i have to get from CMS are based on different timezones, meaning i waste a lot of time doing this instead of automatize it.

Thank you for your response and maybe someone else will have another idea.
Reply With Quote
  #4  
Old 01-09-2017, 12:44 AM
rnicul rnicul is offline
Member
 
Join Date: Jan 2017
Posts: 3
rnicul has 10 reputation points
Default

Hello guys,

None of you use this way of reporting from avaya cms?

Maybe you have another way of reporting automatically from cms.. please share.

Thanks
Razvan
Reply With Quote
  #5  
Old 03-14-2017, 12:33 PM
fernandez12 fernandez12 is offline
Aspiring Member
 
Join Date: Mar 2017
Posts: 1
fernandez12 has 10 reputation points
Default

Quote:
Originally Posted by rnicul View Post
Hello guys,

None of you use this way of reporting from avaya cms?

Maybe you have another way of reporting automatically from cms.. please share.

Thanks
Razvan
Well I've to make a change on a .acsauto file that we have, luckily it can be edited via TXT notepad
I've found an entry in it:
Rep.TimeZone = "default" which can be of course edited
I've revised the timezones from the dropdown on the (almost)lower left corner of the 'select a report screen' and considering i have to update it to GMT-4 i should change that to 'US/Pacific' as it's specified on the report.

I want to know if I'm being overly simple regarding it or if any of you has encountered issues about it.

Thanks a lot for the hand!
Reply With Quote
  #6  
Old 04-04-2017, 10:29 PM
ramos214 ramos214 is offline
Member
 
Join Date: Mar 2017
Posts: 8
ramos214 has 10 reputation points
Default

I've used this method before when I had the same problem with the timezone. Haven't encountered any issues with since.
Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -7. The time now is 02:05 AM.

This Forum is provided solely for the use and convenience of Avaya customers and partners. Use of the Forum is subject to the Terms and Use and Privacy Statement found at www.avaya.com. No other use is permitted. The Forum including all content posted is “AS IS” and Avaya expressly disclaims all warranties and/or guarantees as to its accuracy, reliability, usefulness, quality or non-infringement of intellectual property. Avaya reserves the right to remove any content posted on the Forum at any time and for whatever reason.

Avaya will not be liable for any content posted on this Forum, including, without limitation, any errors or omissions or for any losses or damages of any kind incurred as a result of use or reliance on any content, regardless of its origin.

You expressly understand and agree that you assume all risks associated with use or reliance on this content.