Call Detail Report (Deprecated)

Last updated: 2024-07-23Contributors
Edit this page

The Call Detail Report API provides cloud routing data for your cloud-based unified queues and includes every cloud-routed call based on filtering criteria that you supply when running the report.

Primary Parameters

It takes a JSON request body with the following notable parameters. See the example below for more.

API Property Description
reportType   set to CASPER_REPORT.
reportTypeName   set to Cloud_Call_Detail_Download.
reportCriteria.accountIds This is a string array. To retrieve a list of possible values, use Accounts.
reportCriteria.groupBy  Either PROFILE or DESTINATION. If using PROFILE, set the reportCriteria.cloudProfileGroupIds and reportCriteria.cloudProfileIds properties. If using DESTINATION, set the reportCriteria.cloudDestinationGroupIds and reportCriteria.cloudDestinationIds properties.
reportCriteria.cloudProfileGroupIds  Set if groupBy is set to PROFILE. If you want all groups, include all values, including null. Corresponds to "Cloud Profile Groups" in the Admin UI. Populate with an integer array of profile groupId values. Use the Cloud Profiles and populate with the list of groupId values.
reportCriteria.cloudProfileIds  Set if groupBy is set to PROFILE. If you want all groups, include all values. Corresponds to "Cloud Profiles" in the Admin UI. Populate with an integer array of profile groupId values. Use the Cloud Profiles and populate with the list of group children objId values. The objId values musts correspond with groupId values in the cloudProfileGroupIds properties.
reportCriteria.cloudDestinationGroupIds  Set if groupBy is set to DESTINATION. If you want all groups, include all values, including null. Corresponds to "Cloud Destination Groups" in the Admin UI. Populate with an integer array of profile groupId values. Use the Cloud Destinations and populate with the selected groupId values.
reportCriteria.cloudDestinationIds  Set if groupBy is set to DESTINATION. If you want all groups, include all values. Corresponds to "Cloud Destinations" in the Admin UI. Populate with an integer array of profile groupId values. se the Cloud Destinations and populate with with the selected group children objId values. The objId values musts correspond with groupId values in the cloudProfileGroupIds properties.
reportCriteria.startTimestamp use ANSI SQL 92TIMESTAMP format such as: 2020-04-22 00:00:00.0000.
reportCriteria.endTimestamp use ANSI SQL 92TIMESTAMP format such as: 2020-04-22 00:00:00.0000.
reportCriteria.timezoneName  Use the "TZ database name" from the tz database. For example, US/Pacific.
reportCriteria.criteriaType   set to CASPER_CRITERIA.
reportCriteria.reportName   set to Cloud_Call_Detail_Download.
reportCriteria.returnType   set to CSV.
reportCriteria.schedule   set to {"repeatOption":"ONCE"}.

Supporting APIs

The following API endpoints are used to populate API properties.

The BASE_ACCT_URL is {BASE_URL}/api/v1/admin/accounts

Accounts

Find a list of accounts this Agent has access to.

GET {BASE_ACCT_URL} - populate accountId

Users

Return a list of all users in the system.

GET api/v1/admin/users - populate userId

Cloud Profiles

For Cloud Reports, you'll need to know the cloud profile groups and corresponding cloud profile IDs.

GET {BASE_ACCT_URL}/{accountId}/users/{userId}/reports/inputControls?accountIds={accountId}&products=CLOUD_PROFILE

populate cloudProfileGroupIds and cloudProfileIds

Cloud Destinations

For Cloud Reports, you'll also need cloud destination groups and corresponding cloud destination IDs.

GET {BASE_ACCT_URL}/{accountId}/users/{userId}/reports/inputControls?accountIds={accountId}&products=CLOUD_DESTINATION

populate cloudDestinationGroupIds and cloudDestinationIds

Request

Be sure to set the proper BASE_URL and authorization header for your deployment.

POST {BASE_URL}/api/v1/admin/accounts/{accountId}/reportsStreaming
Authorization: bearer <myAccessToken>
Content-Type: application/json;charset=UTF-8

{
  "delimiter":"COMMA",
  "reportType":"CASPER_REPORT",
  "reportTypeName":"Cloud_Call_Detail_Download",
  "reportCriteria":{
    "accountIds":[
      "13670001",
      "15300001"
    ],
    "groupBy":"PROFILE",
    "cloudDestinationGroupIds":[

    ],
    "cloudDestinationIds":[

    ],
    "cloudProfileGroupIds":[
      111,
      null
    ],
    "cloudProfileIds":[
      1111,
      2222,
      3333,
      4444
    ],
    "endTimestamp":"2020-05-19 23:59:59",
    "startTimestamp":"2020-04-19 12:00:00",
    "timezoneName":"US/Arizona",
    "criteriaType":"CASPER_CRITERIA",
    "reportName":"Cloud_Call_Detail_Download",
    "returnType":"CSV",
    "schedule":{
      "repeatOption":"ONCE"
    }
  }
}

Response

When uisng the CSV type a text/csv response is provided.

Properties

The CSV has the following properties.

  1. cloud_profile_id
  2. profile_name
  3. uii
  4. ani
  5. dnis
  6. outbound_externid
  7. media_isci
  8. media_network
  9. smedia_market
  10. media_code
  11. media_format
  12. media_version
  13. media_length
  14. enqueue_time
  15. dequeue_time
  16. queue_time
  17. call_state
  18. is_cellular
  19. dequeue_attempts
  20. call_result
  21. inbound_duration
  22. recording_url
  23. connected_id
  24. connected_name
  25. connected_route
  26. connected_duration
  27. attempt_1_id
  28. attempt_1_name
  29. attempt_1_route
  30. attempt_1_disp
  31. attempt_2_id
  32. attempt_2_name
  33. attempt_2_route
  34. attempt_2_disp

Example Response

The Call Detail Report API returns data in a CSV format like the following.

cloud_profile_id,profile_name,uii,ani,dnis,outbound_externid,media_isci,media_network,media_market,media_code,media_format,media_version,media_length,enqueue_time,dequeue_time,queue_time,call_state,is_cellular,dequeue_attempts,call_result,inbound_duration,recording_url,connected_id,connected_name,connected_route,connected_duration,attempt_1_id,attempt_1_name,attempt_1_route,attempt_1_disp,attempt_2_id,attempt_2_name,attempt_2_route,attempt_2_disp
1111,DTE,'202004250912250132110000003150,2312866364,8889918278,,,,,,,,0,4/20/20 6:12 AM,4/20/20 6:12 AM,5,COMPLETE            ,No,2,CONNECTED,24,,4546,DTE,5854987200,19,4546,DTE,5854987282,ANSWER(5),,,,
2222,IT TFN,'202004251035200132150000009531,6317967722,8774489485,,,,,,,,0,4/20/20 7:35 AM,4/20/20 7:35 AM,5,COMPLETE            ,No,2,CONNECTED,53,,4467,IT TFN,5127776541,48,4467,IT TFN,5127776551,ANSWER(4),,,,
3333,DTE,'202004251101260132100000073341,2482069215,8889918238,,,,,,,,0,4/20/20 8:01 AM,4/20/20 8:01 AM,5,COMPLETE            ,No,2,CONNECTED,301,,4546,DTE,5854987200,296,4546,DTE,5854987234,ANSWER(4),,,,