An issue occurs with Lobby Management where advisors not logging out at night can wreak a little havoc with the advisor reporting their availability or inactivity. The Lobby application does not currently natively support auto-logout of advisors, but we can set up a script to run nightly to automatically log out advisors.
1. In SQL, look for the SQL Server Agent. It will appear at the bottom of the SQL Server Management Studio navigation after you have connected to the SQL server:
1a. If the circle on the SQL Server Agent is red, then you'll need to make sure SQL Server Agent is running. Open up Services on the server by either searching for Services or going to Control Panel.
Make sure the highlighted service item is Running and not set to Disabled.
1b. If you do not see SQL Server Agent, then you may need to log on to SQL as a user with more administrator rights than the currently logged in user.
2. Expand SQL Server Agent. Right-click on Jobs and select New Job...
3. On the General tab, give the job a name, such as Passageways Lobby Advisor SignOut
3a. In the Owner section, select the SQL user being used for Passageways
4. On the Steps tab, click New... to create a new step.
4a. Give the item a name such as Logout Lobby Advisors.
4b. Select the Database for LobbyManagement.
4c. Paste the following script into the Command section:
--START SCRIPT
Declare @LobbySessionID uniqueidentifier
declare c1 cursor for SELECT [LobbySessionID] FROM [Production_Portal_LobbyManagement].[dbo].[LobbyLoginInfo] where logouttime is null
open C1
fetch next from C1 into @LobbySessionID
while @@FETCH_STATUS = 0
begin
UPDATE LobbyLoginInfo SET LogoutTime = GETDATE(), LastActiveTime = GETDATE() WHERE LobbySessionID = @LobbySessionID
fetch next from C1 into @LobbySessionID
end
close C1
deallocate C1
--And to update service status
GO
UPDATE LobbyUsers
SET WaitStatusID = 5
--END SCRIPT
4d. Save the step.
5. On the Schedules tab, click New..
5a. Give this a name, like Logout Lobby Users
5b. Change the Occurs under Frequency to Daily.
5c. Set the Daily Frequency to Occurs once at: and set it at a time that you are comfortable logging out your lobby users.
5d. Hit save.
6. Hit OK to save the Job.
7. Check for the job to complete itself overnight. If it's not working, check out the SQL Job History to see what the error message is or contact tech support and we can check it out with you.
Comments
0 comments
Please sign in to leave a comment.