Statistics API

You can use the statistics API to fetch information from our statistics system into your own environment.

All statistic calls are GET requests on the https://account.omnidesk.com/api/v2/statistics/showData endpoint. From here you define what facts, groups and filters you want to use. The easiest way to get data is to use the statistics widget creator and create a widget. After creating the widget you can go to the settings of the widget and click "data url". If you append your apiKey to this url you can use this data from server to server.

Sample data url: https://account.omnidesk.com/api/v2/statistics/showData?facts[]=ticketResponseTime&factOptionticketResponseTime=average&factOptionUnitTypeticketResponseTime=hours&groupBy[]=ticketID&filters[]=timeRelativeToday

Available facts

    ticketIncoming
    ticketAssigned
    ticketResponseTime
    ticketActionIncoming
    ticketActionOutgoing
    ticketHandled
    ticketSent
    ticketFTR
    ticketNotFTR
    ticketSLAPercentage
    ticketTimeSpent
    socialSLA
    ticketTags
    messages
    callTotal
    callAnswered
    callAnsweredAfterSLA
    formulaCallPercentageAnswered
    callHangup
    callHangupAfterSLA
    callWaitingTime
    callTalkingTime
    callWrapupTime
    callTotalTime
    callWithinServiceLevel
    callCurrentWaitingTime
    ticketCallFTR
    ticketCallNonFTR
    ticketCallTotal
    formulaCallServiceLevel
    callWaiting
    chatLocation
    chatWaiting
    chatWaitingTime
    chatTotalTime
    chatSlotsTotal
    chatSlotsAvailable
    formulaEmailAnsweredWithin24h
    formulaEmailAnsweredWithin48h
    formulaEmailAnsweredWithinXSeconds
    ticketEmailFTR
    emailTicketPercentageOutboundCall
    userStatusTime
    ticketFormFields
    ticketGradeByCustomer
    ticketNPSByCustomer

Available Group by's

    timeHour
    timeDay
    timeWeek
    timeMonth
    timeHalfHour
    timeQuarterHour
    channel
    brand
    campaign
    user
    group
    tagID
    messageType
    statusID
    ticketID
    formFieldID
    formFieldIDWithoutLayers
    from
    customerID
    relatedChannelID

Available filters

    timeRelativeToday
    timeRelativeThisWeek
    timeRelativeLastWeek
    timeRelativeTwoWeeksAgo
    timeRelativeThisMonth
    timeRelativeLastMonth
    timeRelativeXSeconds
    time
    channel
    brand
    campaign
    user
    group
    to
    from
    direction
    ticketStatus
    formField

The available groupBy's and filters vary based on the facts that are selected. For a user status it may not make sense to filter by ticketID for instance. Information on valid combinations is available on: https://account.omnidesk.com/api/v2/statistics/options

Sample response

The statistics/showData response contains buckets (these are the groupBy's you specified in the request) and facts (which you specified in the request). The order of the facts corresponds with the buckets. Ticket id: 529523 for instance has the corresponding ticketResponsetime: 00:17:27 and ticketSLAPercentage: 90.

{
    "type": "item",
    "item": {
        "buckets": [
            "ticket id:529522",
            "ticket id:529523",
            "ticket id:549524",
            "ticket id:559525"
        ],
        "facts": {
            "ticketResponseTime": [
                "00:23:47",
                "00:17:27",
                "00:45:36",
                "00:24:08"
            ],
            "ticketSLAPercentage": [
                "100",
                "90",
                "70",
                "90"
            ]
        }
    }
}

Last updated