Genesys CTI User Forum > Genesys-related Development
CometD notificiations from WWE using Python
Mr.T:
Anyone have any idea how to receive CometD notifications from WWE using Python?
gen_rtfm:
I imagine there is some python library built to add cometd support to your project, did a quick Google...
Out of curiosity, what's the use case/what are you aiming to do?
Br
Skickat från min Mi MIX 3 5G via Tapatalk
Mr.T:
[quote author=gen_rtfm link=topic=11587.msg52800#msg52800 date=1587142911]
I imagine there is some python library built to add cometd support to your project, did a quick Google...
Out of curiosity, what's the use case/what are you aiming to do?
Br
Skickat från min Mi MIX 3 5G via Tapatalk
[/quote]
I want to get list of all agents from Genesys using WWE API (its done with Python OK), but need more information! I need the last time each one logged in Genesys and looking the Genesys documentation it can be done only using "interactions" (under Interactions History API), but it returns a CometD "refereceid". So I need to establish a "long-pooling" CometD in order to get these asyncrounous messages, but I have no clue how to establish connection with WWE using Comedt. I found Aiocometd lib for python, but both documentatons are very poor and there is no examples. Wondering if someone ever done that before, even in another language (java) or do you if there is another way to get a list of users and last time they logged in using another method besides this API?
Thank you!
gen_rtfm:
Without experience of the API but after sifting through the API description from genesys I'd say that your requirement falls outside the scope of the API.
Based on your description you want data from statserver, not WWE; are you restricted in your access to the environment?
You want your integration to retrieve data for all logged in agents or one specific?
As I understand the mentioned API that's used to fetch agents handling history, i.e. the interactions they've processed. This will not give you timestamps for login, only specifics about what interactions they've handled.
This is kind of secondary to your actual question, how to establish a cometd session between wwe and a python app. Unfortunately I can't help you there, I've never tried.
Skickat från min Mi MIX 3 5G via Tapatalk
Mr.T:
The interaction history API from WWE can provide that info. I get 200OK HTTP response with the "refereceId". I just don't know how to asynchronously refer as cometd connection using that "referenceId"
[code]HTTP response
{
"statusCode":0,
"referenceId":1
}[/code]
https://docs.genesys.com/Documentation/HTCC/latest/API/CHGetAgentInteractions
https://docs.genesys.com/Documentation/HTCC/latest/API/InteractionHistory
Navigation
[0] Message Index
[#] Next page
Go to full version