Genesys Cloud - Main

 View Only

Discussion Thread View
Expand all | Collapse all

Dúvida com relação a requisição

  • 1.  Dúvida com relação a requisição

    Posted 01-10-2020 07:11
    Olá, bom diaOlá, bom diaEstou fazendo uma requisição post para esta url: https://api.mypurecloud.com/api/v2/analytics/conversations/aggregates/queryE de acordo com o body abaixo, estou tentando pegar as chamadas receptivas e ativas nos userIds também abaixoSegue o link para o devolper tools e o body da requisição com os user ids
    Acredito que os campos seriam o TalkInboundTime e TalkOutboundTime
    Minha dúvida seria tem algo errado com a requisição ou devo acrescentar algo?

    https://developer.mypurecloud.com/developer-tools/#/api-explorerbody:{  "interval": "2019-10-31T00:00:00.000Z/2019-10-31T23:59:59.000Z",  "groupBy": [  "userId"  ],  "metrics": [  "nOutboundConnected",  "tAnswered",  "tAbandon",  "tHandle",  "Ttalkcomplete"  ],  "filter": {    "type": "and",    "predicates": [      {        "dimension": "userId",        "value": "a17d33a4-ee20-4c18-8e5b-ebd485afa112",        "operator": "Matches"      },            {        "type": "Dimension",        "dimension": "Outboundcontactlistid",        "operator": "Exists"      },      {      "type": "Dimension",        "dimension": "Originatingdirection",        "operator": "Matches",        "value": "outbound"      }    ]  }}
    #Reporting/Analytics

    ------------------------------
    Raphael Sens
    Flex Contact Center Atend. A Clientes e Tecnologia Ltda
    ------------------------------


  • 2.  RE: Dúvida com relação a requisição

    Posted 01-11-2020 00:24
    I would suggest you use something like this to break the tTalkComplete by direction per user:

    Te sugiero que uses algo como esto para romper el tTalkComplete por dirección por usuario:
    {
     "interval": "2020-01-10T08:00:00.000Z/2020-01-11T08:00:00.000Z",
     "groupBy": [
      "userId",
      "direction"
     ],
     "views": [],
     "metrics": [
      "tTalkComplete"
     ]
    }



    ------------------------------
    Robert Wakefield-Carl
    Avtex Solutions, LLC
    Contact Center Innovation Architect
    robertwc@avtex.com
    https://www.Avtex.com
    https://RobertWC.Blogspot.com
    ------------------------------



  • 3.  RE: Dúvida com relação a requisição

    Posted 01-13-2020 08:51
    Good day
    I tried putting on postman with this change, still response empty

    {{  "interval": "2019-10-31T00:00:00.000Z/2019-10-31T23:59:59.000Z",  "groupBy": [  "userId",  "direction"  ],  "views": [],  "metrics": [  "nOutboundConnected",  "tAnswered",  "tAbandon",  "tHandle",  "tTalkcomplete"  ],  "filter": {    "type": "and",    "predicates": [      {        "dimension": "userId",        "value": "a17d33a4-ee20-4c18-8e5b-ebd485afa112",        "operator": "Matches"      },            {        "type": "Dimension",        "dimension": "Outboundcontactlistid",        "operator": "Exists"      },      {      "type": "Dimension",        "dimension": "Originatingdirection",        "operator": "Matches",        "value": "outbound"      }    ]  }}

    ------------------------------
    Raphael Sens
    Flex Contact Center Atend. A Clientes e Tecnologia Ltda
    ------------------------------



  • 4.  RE: Dúvida com relação a requisição

    Posted 01-13-2020 09:41
    Can you try removing this part and see if you get a result: 

     , { "type": "Dimension", "dimension": "Outboundcontactlistid", "operator": "Exists" }, { "type": "Dimension", "dimension": "Originatingdirection", "operator": "Matches", "value": "outbound" }

    Also, use the analytics tools under the Developer Tools to test what will actually work.



    Robert Wakefield-Carl
    Sr. Director – Innovation Architects | Avtex
    RobertWC@avtex.com
    T: 949-268-5104
    C: 310-350-2010
    Teams: robertwc@avtex.com
    Schedule:https://freebusy.link/RobertWC
    Blog: https://RobertWC.blogspot.com
    Subscribe to Avtex Thoughts

     





  • 5.  RE: Dúvida com relação a requisição

    GENESYS
    Posted 01-13-2020 10:12
    I copied over your query, and only got results when I went through the Performance>Queues Activity view and drilled down to find an agent that definitely had calls during the interval specified. 

    {
       "interval": "2019-12-01T00:00:00/2019-12-31T23:59:59",
       "groupBy": ["userId"],
       "metrics": [ "nOutboundConnected",  "tAnswered",  "tAbandon",  "tHandle",  "tTalkComplete"],
       "filter": {
          "type": "and",
          "predicates":  [      
            {
              "type": "dimension",
              "dimension": "userId",
              "operator": "matches",
              "value": "faa61d4e-c811-478a-a58d-b4eb56e90d36"},
            {
              "type": "dimension",
              "dimension": "outboundContactListId",
              "operator": "exists"
            },
            {
              "type": "dimension",
              "dimension": "originatingDirection",
              "operator": "matches",
              "value": "Outbound"      
            }
            ]
       }
    }

    {
      "results": [
        {
          "group": {
            "mediaType": "voice",
            "userId": "faa61d4e-c811-478a-a58d-b4eb56e90d36"
          },
          "data": [
            {
              "interval": "2019-12-01T00:00:00.000Z/2019-12-31T23:59:59.000Z",
              "metrics": [
                {
                  "metric": "nOutboundConnected",
                  "stats": {
                    "count": 4165
                  }
                },
                {
                  "metric": "tAnswered",
                  "stats": {
                    "max": 36399,
                    "min": 1071,
                    "count": 4165,
                    "sum": 5748082
                  }
                },
                {
                  "metric": "tHandle",
                  "stats": {
                    "max": 318360,
                    "min": 804,
                    "count": 4165,
                    "sum": 710571379
                  }
                },
                {
                  "metric": "tTalkComplete",
                  "stats": {
                    "max": 297463,
                    "min": 804,
                    "count": 4165,
                    "sum": 657517379
                  }
                }
              ]
            }
          ]
        }
      ]
    }


    ------------------------------
    George Ganahl GCP (PureCloud), ICCE
    Principal Technology Consultant
    Genesys
    ------------------------------



  • 6.  RE: Dúvida com relação a requisição

    Posted 01-13-2020 12:47
    Hello George
    What method on the developer you use?

    Thanks

    ------------------------------
    Raphael Sens
    Flex Contact Center Atend. A Clientes e Tecnologia Ltda
    ------------------------------



  • 7.  RE: Dúvida com relação a requisição

    GENESYS
    Posted 01-13-2020 13:22
    Eu testei com /api/v2/analytics/conversations/aggregates/query de https://developer.mypurecloud.com/developer-tools/#/api-explorer

    ------------------------------
    George Ganahl GCP (PureCloud), ICCE
    Principal Technology Consultant
    Genesys
    ------------------------------



  • 8.  RE: Dúvida com relação a requisição

    Posted 01-13-2020 13:33
    estranho
    testei desta forma postada e continua me enviando uma resposta vazia

    https://developer.mypurecloud.com/developer-tools/#/api-explorer?share=N4IgDghgLgFiBc4D2BnKBBAdhANgTygEsBjFAYSUwDcBTAJxWkMpXQHM26a3oaUBFAK708IADQgAtjVhIAJgmRpxIQXUKKA9BDCFNVAEzbs+IqU3FKtBkxbaOXHlD6aAjsLqiJkOhEkA1XGEUBFAAI3lRRGAAHToYzAACZJiQQkxnOipcVPhE1IMABgBGAE4AWmKDcpKAFULC+Aamws0issrqgGZi2oMu+ABWUqHS1LE4hOT8kE4kQTAAITxcxIBtVMEUegBJOVSAXQn4pJSpGXVSVbWZzAB5QSgIwUw5CkxMGmJnffEzjEwKAA7vQaL8xP90GEIK9KON/gAJGFyHA0eEzKC1XAAawokjAqOch2OUzOADNCDhMqtYidptNUlA8GA0QgZsjxpNTvTUmAuHISLwUKt1vSUnSxclaaTJf9may8qkBdJAcxMJyJbKZsqaKq4WzNts6HsNTLZakkCzfFAkPEDVJoMQYHxTdzzSBsjhhKtUmSIBAAGzFOQAFho5WIAA5isVyiGAOyRiDlCCDSNycphMNhQYBmilQpyLoB1IAXxJbvp0srYsZ8p9IB1evV4i5WrOTZQaob8ye81e7ygEG+ABlCGgTa3Ne7LfRoLaGzQAB7jqDCkBt2XlzeS6vtjH1+2d7tTs2SpWEFVd/WKkC2whsdJMTBsAAihC43xPFf3Fqt87tW9JEdZ11x/dtUk9b17QePsXl+c9p3pUsdzFA4dxQk5SxAUtSyAA===



    ------------------------------
    Raphael Sens
    Flex Contact Center Atend. A Clientes e Tecnologia Ltda
    ------------------------------



  • 9.  RE: Dúvida com relação a requisição

    GENESYS
    Posted 01-13-2020 13:40
    Edited by George Ganahl 01-13-2020 13:41
    Você já verificou que está conectado ao org correto en Developer Tools?

    Além disso, a verificou que o usuário recebeu uma chamada saída durante o tempo especificado?

    (perdão minhas respostas... Eu não falo português, apenas lê-lo)

    ------------------------------
    George Ganahl GCP (PureCloud), ICCE
    Principal Technology Consultant
    Genesys
    ------------------------------



  • 10.  RE: Dúvida com relação a requisição

    Posted 01-13-2020 13:48
    Isn't how great how international we all are?  Thank you Google Translate!

    ------------------------------
    Robert Wakefield-Carl
    Avtex Solutions, LLC
    Contact Center Innovation Architect
    robertwc@avtex.com
    https://www.Avtex.com
    https://RobertWC.Blogspot.com
    ------------------------------



  • 11.  RE: Dúvida com relação a requisição

    Posted 01-13-2020 15:05
    Edited by Paulo Mesquita do not use 01-13-2020 15:41
    Oi Raphael,

    Se a sua consulta não retornou nenhum valor para essas métricas pode ser porque o atendente não fez nenhuma chamada no intervalo de tempo que você especificou. Você pode tentar fazer uma consulta mais genérica e depois adicionar os filtros de usuário.

    Outra coisa que voce tem que ter atenção ao especificar o seu intervalo de tempo é que a hora utilizada pela plataforma é UTC, então você tem que ajustar a sua consulta pra ter certeza de que vai pesquisar o intervalo correto na hora do Brasil. Se você utilizar o Analystics Query Builder essa questão da hora é automaticamente ajustada para o seu fuso horário.

    ------------------------------
    Paulo Mesquita
    Spark NZ Trading
    ------------------------------



  • 12.  RE: Dúvida com relação a requisição

    Posted 01-14-2020 07:46
    Hello, good day
    Don' worry, I can explain in english if that's the case, note that my english is not that good also :)

    The dates are in interval UTC and the org is correct, but still no response
    I beggining to think my search is faulty on some parameter
    There's something that can be done to get the inbound and outbound time ?

    Thanks for all

    ------------------------------
    Raphael Sens
    Flex Contact Center Atend. A Clientes e Tecnologia Ltda
    ------------------------------



  • 13.  RE: Dúvida com relação a requisição

    GENESYS
    Posted 01-14-2020 11:33
    If you get a 200 OK but no data, it means that one (or more) of the values you entered (userId, outboundContactListId, or originatingDirection) does not have a match in PureCloud for the date and time range you entered. I had to use the Performance>Queues Activity to look for records that definitely matched the three criteria and adjust my userID and interval entries to match that user to get the query to work.


    ------------------------------
    George Ganahl GCP (PureCloud), ICCE
    Principal Technology Consultant
    Genesys
    ------------------------------



  • 14.  RE: Dúvida com relação a requisição

    Posted 01-14-2020 19:23
    What if you try to replace this part of your request to use "or" instead of "and"?

      "filter": {
          "type": "or",

    If you get a different result, that means you have an issue with one of the conditions.

    ------------------------------
    Paulo Mesquita
    Spark NZ Trading
    ------------------------------



  • 15.  RE: Dúvida com relação a requisição

    Posted 01-17-2020 06:31

    Good day

    I tried with this, and bring the results, but also from anothers userId
    I change the userId to the one below.
    Also I remove this part and bring results, what's represent this?
    {
    "type": "Dimension",
    "dimension": "Outboundcontactlistid",
    "operator": "Exists"
    },

    Heres the body which I used now
    {{  "interval": "20-01-01T15:00:00.000Z/2020-01-17T15:59:59.000Z",  "groupBy": [  "userId"  ],  "views": [],  "metrics": [  "nOutboundConnected",  "tAnswered",  "tAbandon",  "tHandle",  "tTalkcomplete"  ],  "filter": {    "type": "and",    "predicates": [      {        "dimension": "userId",        "value": "7f75773b-c152-4896-bbbb-12a11510af3d",        "operator": "Matches"      },      {        "type": "Dimension",        "dimension": "Outboundcontactlistid",        "operator": "Exists"      },      {      "type": "Dimension",        "dimension": "Originatingdirection",        "operator": "Matches",        "value": "outbound"      }    ]  }}

    Thanks in advance



    ------------------------------
    Raphael Sens
    Flex Contact Center Atend. A Clientes e Tecnologia Ltda
    ------------------------------



  • 16.  RE: Dúvida com relação a requisição

    GENESYS
    Posted 01-17-2020 10:19
    {
    "type": "Dimension",
    "dimension": "Outboundcontactlistid",
    "operator": "Exists"
    },

    Says that the call must be dialed by an Outbound campaign (not dialed manually by the agent)



    ------------------------------
    George Ganahl GCP (PureCloud), ICCE
    Principal Technology Consultant
    Genesys
    ------------------------------



  • 17.  RE: Dúvida com relação a requisição

    Posted 01-21-2020 09:00
    Alright, it work
    But I have a question, 
    The active calls and manual calls is the treat as the same?

    ------------------------------
    Raphael Sens
    Flex Contact Center Atend. A Clientes e Tecnologia Ltda
    ------------------------------



  • 18.  RE: Dúvida com relação a requisição

    GENESYS
    Posted 01-22-2020 20:58
    Calls dialed manually by an agent will not have an outboundContactListId, so this query will not find them.

    ------------------------------
    George Ganahl GCP (PureCloud), ICCE
    Principal Technology Consultant
    Genesys
    ------------------------------



  • 19.  RE: Dúvida com relação a requisição

    Posted 01-28-2020 10:05
    Hello
    Again having trouble with this body
    Still no response from the outbound calls.
    There's something missing?
    I need the outbound calls not manual dialed by the agent
    On the parameter, the value is valid?
    {
    "type": "dimension",
    "dimension": "Originatingdirection",
    "operator": "matches",
    "value": "outbound"
    }

    On the example below, they return all the calls of the day, and doesn't match only the manual call's
    {
    "interval": "2020-01-27T20:00:00.000Z/2020-01-27T20:59:59.000Z",
    "groupBy": ["userId"],
    "filter": {
    "type": "and",
    "predicates": [
    {
    "type": "dimension",
    "dimension": "userId",
    "operator": "matches",
    "value": "ac056009-d1f8-400c-85b5-e3b24cbb2155"
    }
    ]
    },
    "metrics": [
    "tTalk",
    "tAcw",
    "tWait",
    "nOutbound",
    "tTalkComplete",
    "tHandle"
    ]
    }

    ------------------------------
    Raphael Sens
    Flex Contact Center Atend. A Clientes e Tecnologia Ltda
    ------------------------------



Need Help finding something?

Check out the Genesys Knowledge Network - your all-in-one access point for Genesys resources