Genesys Cloud - Main

 View Only

Sign Up

Expand all | Collapse all

agents connected check - architect

  Thread closed by the administrator, not accepting new replies.
  • 1.  agents connected check - architect

    Posted 05-13-2019 11:15
    No replies, thread closed.
    Hello,

    Would it be possible from architect to check if the agents are connected, otherwise we suggest the client to switch to a queue that speaks another language other than his native one.

    Yours
    #Routing(ACD/IVR)

    ------------------------------
    Charaf Eddine Chemlal
    Dimension Data France
    ------------------------------


  • 2.  RE: agents connected check - architect

    Posted 05-13-2019 12:35
    No replies, thread closed.
    You can write a data action the accesses the purecloud api.

    I use the /api/v2/analytics/queues/observations/query endpoint and this as the query body (replace the fake queueId with yours):
    {
    	"metrics": [
    		"oOnQueueUsers"
    	],
    	"filter": {
    		"type": "and",
    		"clauses": [{
    			"type": "and",
    			"predicates": [{
    				"type": "dimension",
    				"dimension": "queueId",
    				"value": "00000000-1111-2222-3333-444444444444"
    			}]
    		}]
    	}
    }

    The response looks like:
    {
      "results": [
        {
          "group": {
            "queueId": "00000000-1111-2222-3333-444444444444"
          },
          "data": [
            {
              "metric": "oOnQueueUsers",
              "qualifier": "INTERACTING",
              "stats": {
                "count": 1
              }
            },
            {
              "metric": "oOnQueueUsers",
              "qualifier": "IDLE",
              "stats": {
                "count": 1
              }
            },
            {
              "metric": "oOnQueueUsers",
              "qualifier": "COMMUNICATING",
              "stats": {
                "count": 1
              }
            },
            {
              "metric": "oOnQueueUsers",
              "qualifier": "NOT_RESPONDING",
              "stats": {
                "count": 0
              }
            }
          ]
        }
      ]
    }


    https://help.mypurecloud.com/articles/about-purecloud-data-actions-integration/

    ------------------------------
    Melissa Bailey
    Genesys - Employees
    ------------------------------



  • 3.  RE: agents connected check - architect

    Posted 05-13-2019 14:05
    Edited by Charaf Eddine Chemlal 05-13-2019 14:22
    No replies, thread closed.
    @Melissa Bailey

    I think this request is about the agents who are in a specific queue, whereas I would like to see if there are agents connected on PureCloud, not necessarily queued  !

    Is there a way to check only the agent's status ? 

    Agents connected == 0  --->  We suggest customer to switch to another queue to treat his demand.

    Yours



    ------------------------------
    Charaf Eddine Chemlal
    Dimension Data France
    ------------------------------



  • 4.  RE: agents connected check - architect

    Posted 05-13-2019 15:18
    No replies, thread closed.
    You can use the /api/v2/analytics/users/details/query endpoint to get users with certain status(es).  This request will find all users who are available or on queue in the given interval.
    {
    	"interval": "2019-05-13T17:00:00.000Z/2019-05-13T18:00:00.000Z",
    	"order": "asc",
    	"presenceFilters": [{
    		"type": "or",
    		"predicates": [{
    				"type": "dimension",
    				"dimension": "systemPresence",
    				"operator": "matches",
    				"value": "ON_QUEUE"
    			},
    			{
    				"type": "dimension",
    				"dimension": "systemPresence",
    				"operator": "matches",
    				"value": "AVAILABLE"
    			}
    		]
    	}]
    }


    ------------------------------
    Melissa Bailey
    Genesys - Employees
    ------------------------------



  • 5.  RE: agents connected check - architect

    Posted 05-14-2019 11:13
    Edited by Charaf Eddine Chemlal 05-14-2019 11:23
    No replies, thread closed.
    @Melissa Bailey

    Can I use this request without using a specific interval ? 
    My agents status test will be conditioned from the moment of the call and not from a given interval !

    in your last request, I do not see where to indicate the Queue Id for my testing ?

    ------------------------------
    Charaf Eddine Chemlal
    Dimension Data France
    ------------------------------



  • 6.  RE: agents connected check - architect

    Posted 05-14-2019 11:36
    No replies, thread closed.
    The /api/v2/analytics/users/details/query endpoint requires a time interval.  If you care about the queue, use the 1st query I gave you.

    ------------------------------
    Melissa Bailey
    Genesys - Employees
    ------------------------------



  • 7.  RE: agents connected check - architect

    Posted 05-14-2019 12:02
    No replies, thread closed.
    So in your example, you have set "interval": "2019-05-13T17:00:00.000Z/2019-05-13T18:00:00.000Z" . This is not a dynamic call, you have put a specific interval, I imagine that the request won't be valid two days later?

    ------------------------------
    Charaf Eddine Chemlal
    Dimension Data France
    ------------------------------



  • 8.  RE: agents connected check - architect

    Posted 05-14-2019 12:12
    No replies, thread closed.
    The data action would have an input value to specify the time interval

    ------------------------------
    Melissa Bailey
    Genesys - Employees
    ------------------------------



  • 9.  RE: agents connected check - architect

    Posted 05-15-2019 14:49
    No replies, thread closed.
    hello @Melissa Bailey

    Now that I've created a request that corresponds to my needs to check agent status in Developer Tools.

    How can I use it inside architect ? I believe that I need to add a new custom PureCloud Data Action, I don't know what to put in Input/Output Contract ?

    Yours,





    ------------------------------
    Charaf Eddine Chemlal
    Dimension Data France
    ------------------------------



  • 10.  RE: agents connected check - architect

    Posted 05-16-2019 10:32
    No replies, thread closed.
    The input value would be the queue id.  Ultimately what you want to know is the number of users, which is the count field but you also need to know the metric & qualifier so you know which status the count is for.

    ------------------------------
    Melissa Bailey
    Genesys - Employees
    ------------------------------



  • 11.  RE: agents connected check - architect

    Posted 12-22-2020 05:02
    Edited by Gennaro Montanino 12-22-2020 05:27
    No replies, thread closed.

    Hi Melissa

    I am trying to get a specific presence for a user and with this API

    GET /api/v2/users/{userId}/presences/{sourdeId}

    Where sourceId is always purecloud.

    It works well



    ------------------------------
    Gennaro Montanino
    ------------------------------