" /> Work out folder path in which an Agent Login is located... - Genesys CTI User Forum

Author Topic: Work out folder path in which an Agent Login is located...  (Read 3481 times)

Offline pinguin

  • Newbie
  • *
  • Posts: 4
  • Karma: 0
Work out folder path in which an Agent Login is located...
« on: September 27, 2015, 05:41:44 AM »
Advertisement
Just wondering if anyone can guide me through the SQL that would return the path to the SWITCH name if I start with the Agent Login value.

So, if the Agent Login in question was in .../SWITCH1/Agent Logins/Top Floor/West Side/Front/123456 (where 123456 is the Agent Login), how would I work out the path between the Agent Login and the Switch if I was given the value 123456 to begin with?

Many thanks!

Offline Dionysis

  • Sr. Member
  • ****
  • Posts: 408
  • Karma: 8
Re: Work out folder path in which an Agent Login is located...
« Reply #1 on: September 29, 2015, 01:34:42 PM »
What are you trying to achieve with this?  Sounds like perhaps you should be using the PSDK for this type of function.

Accessing the database directly is normally frowned upon as Genesys can alter the schema with newer versions.

Offline Tambo

  • Sr. Member
  • ****
  • Posts: 456
  • Karma: 5
Re: Work out folder path in which an Agent Login is located...
« Reply #2 on: September 29, 2015, 01:39:44 PM »
use the search function in CME that will give you the folder path

Offline cavagnaro

  • Administrator
  • Hero Member
  • *****
  • Posts: 7641
  • Karma: 56330
Re: Work out folder path in which an Agent Login is located...
« Reply #3 on: September 29, 2015, 01:49:31 PM »
[quote author=Tambo link=topic=9125.msg41000#msg41000 date=1443533984]
use the search function in CME that will give you the folder path
[/quote]

I think he wants the SQL code...no clue why

Offline Tambo

  • Sr. Member
  • ****
  • Posts: 456
  • Karma: 5
Re: Work out folder path in which an Agent Login is located...
« Reply #4 on: September 29, 2015, 01:52:53 PM »
better hope no-one moves agents about then  ;D

Adam G

  • Guest
Re: Work out folder path in which an Agent Login is located...
« Reply #5 on: September 29, 2015, 09:11:20 PM »
I [i]think [/i]you are asking [i]"How can I get the Switch name of an Agent, by entering their LoginID, using plsql?"[/i]

Make sure you are using this Query to [i]READ ONLY[/i] and run it against your cfg database [i]at your own risk[/i]:

[font=times new roman][color=blue]SELECT CFG_AGENT_LOGIN.LOGIN_CODE,
  CFG_PERSON.FIRST_NAME,
  CFG_PERSON.LAST_NAME,
  CFG_PERSON.EMPLOYEE_ID,
  CFG_PERSON.USER_NAME,
  CFG_SWITCH.NAME AS "SWITCH NAME"
FROM CFG_AGENT_LOGIN
INNER JOIN CFG_LOGIN_INFO
ON CFG_LOGIN_INFO.AGENT_LOGIN_DBID = CFG_AGENT_LOGIN.DBID
INNER JOIN CFG_PERSON
ON CFG_LOGIN_INFO.PERSON_DBID = CFG_PERSON.DBID
INNER JOIN CFG_SWITCH
ON CFG_AGENT_LOGIN.SWITCH_DBID  = CFG_SWITCH.DBID
WHERE CFG_AGENT_LOGIN.LOGIN_CODE = '[b]XXXXXXXXX[/b]'
ORDER BY "SWITCH NAME",
  CFG_PERSON.USER_NAME[/color][/font]
« Last Edit: October 02, 2015, 02:57:54 PM by adamgill »

Adam G

  • Guest
Re: Work out folder path in which an Agent Login is located...
« Reply #6 on: October 02, 2015, 02:58:10 PM »
bump after edit

Offline pinguin

  • Newbie
  • *
  • Posts: 4
  • Karma: 0
Re: Work out folder path in which an Agent Login is located...
« Reply #7 on: January 19, 2016, 07:21:33 AM »
Hi adamgill (and others),

I'm mortified that this thread has languished so long without a reply from me. Apologies.

That's great code, but no, I'm not attempting to identify Agents.

I'm trying to determine the folder structure in which any given Agent Login resides.

I'd like to be able to start with any given Agent Login, and be able to work out the path of the folders between the Switch and the folder in which the Agent Login lives.

In abstract, that might look like: /SWITCH/AGENT LOGINS/FOLDER 1/FOLDER 2/FOLDER 3/123456

Where 123456 is the Agent Login.

I have an idea this information is located in some relationship between CFG_FOLDER and CFG_OBJ_FOLDER, but I haven't been able to work out the relationship, so of course I could be entirely wrong about that.

Thanks again for the code above, it will definitely prove useful to me in other situations.

pinguin