" /> Query to find folder path of CME objects - Genesys CTI User Forum

Author Topic: Query to find folder path of CME objects  (Read 7127 times)

Manas

  • Guest
Query to find folder path of CME objects
« on: May 14, 2008, 12:08:37 AM »
Advertisement


I am looking for building a query that would return me full folder path of any CME object given it's DBID and type i.e DN /Objective table/agent group etc.

We have the search option in CME that returns the full  folder path , so we should be able to get this from  Config DB. But the problem is without DB schema it's not easy to figure out how this info is stored in Config DB.  Has anybody tried something similar ? Does any one have any document that would  provide relationship between Config  tables ? I know  Genesys  would not provide the schema but if somebody would have figured out it on his/her own ,it would make my life easier. I usually get requirements like this and each time  i have to look through Config DB data to  figure out the relationship between tables to build the query. This takes time .

tony

  • Guest
Re: Query to find folder path of CME objects
« Reply #1 on: May 14, 2008, 09:18:46 AM »
Manas,

I think there are quite a few threads in the Forum, on this subject.  Here's one we prepared earlier (!);

http://www.sggu.com/smf/index.php/topic,2052.0.html

To answer your questions directly; no, there is no overview Schema for the cfg database within itself.  Each Application comes pre-configured to reference individual cfg tables it requires to run and joins them on an ad-hoc basis, so there is (apparently) no need to do this at db level.  (Not even TOAD is able to determine the co-relations between the cfg tables (I've tried...))

I think you are just trying to get information out of the Object Table?  Perhaps you could use a standard processing approach of accessing the cfg_object Table (using a recognized connection approach (not direct ODBC!)) and extrapolate the Folder items, using the key below;

ObjectType/ObjectTypeID
Agent = 0
Group of Agents = 2
Route Point = 4
Queue/Virtual Queue = 5
Group of Queues/DN Group = 6

For example;

Where you want to identify a series of Agents who belong to a particular Agent Group, use the [color=blue]cfg_agent_group [/color] Table to determine the DBID for your AG, then use the DBID result as a look-up in the [color=blue]cfg_object [/color] Table, then use the DBID results and query the [color=blue]cfg_persons [/color] Table.  In that way, you should be able to identify the Agent Group DBID and then extract all of the Agent's who belong to that group and display the details you require (Name, AgentID, etc.)

It's a way of emulating what CME might do, but on a very basic level.

[color=red]***DO NOT ATTEMPT TO UPDATE ANY ITEMS USING THE METHODS DESCRIBED ABOVE - "READ ONLY"!!!***[/color]

- Does this help, at all...?

Tony
« Last Edit: May 14, 2008, 09:22:32 AM by Tony Tillyer »

Marked as best answer by on April 16, 2025, 07:57:20 PM

Offline cwmunn

  • Newbie
  • *
  • Posts: 6
  • Karma: 0
Re: Query to find folder path of CME objects
« Reply #2 on: May 15, 2008, 01:58:17 AM »
  • Undo Best Answer
  • Obtaining this with their new Platform SDK configuration model is actually quite convenient. After you establish connection to ConfigServer you create and configure an instance of RequestReadObjects and provide "object_path" as one of the filter keys. (value doesn't seem to matter).

    The resultant EventObjectsRead provides the full path in the ObjectPath property. They are offering both Java and .NET versions of this API. It is usually a good call to use these APIs to work with Cfg as it guards you against any changes in the schema.

    ~S

    tony

    • Guest
    Re: Query to find folder path of CME objects
    « Reply #3 on: May 15, 2008, 07:13:52 AM »
    Thanks Shadowslain - I think that is the "what" and "how" covered...?

    Tony

    Manas mohanty

    • Guest
    Re: Query to find folder path of CME objects
    « Reply #4 on: May 28, 2008, 09:20:58 PM »
    Thanks for the reply . yeah i would ask my colleague for help who has hands on on these  APIs . But sometimes knowing the schema and directly querying it works faster. usually in cases where some issues is going on in production and we need some info real quick. understanding of Config, CCON and stat server data has helped me many times to pull out some required info quickly. since its always to pull out some info ,it's pretty safe too. I think it's time for me to take a look into these APIs and get some hands on . It would come handy for me .

    By the way the exact  requirement was to prepare a automated report which would show for each access group what kind of access it has on each object of the CME. This would also show what type of object it is and where it is located in CME. I had a Java program written that would output a excel sheet as per the required schedule in which i was using JDBC to directly get all the required info in my report except folder path of each object. That was the missing piece there.