Genesys Cloud - Main

 View Only

Sign Up

  Thread closed by the administrator, not accepting new replies.
  • 1.  Delete Call Recordings Older Than 120 Days

    Posted 10-03-2023 03:13
    No replies, thread closed.

    We have had a policy change and need to delete all call recordings old than 120 days. I have changed the retention policy and new calls now expiry after 120 days. I contacted support and they weren't much help, saying delete each call  one at a time(there are hundreds of thousands of recordings)

    They said a script / api could be used, but would not offer any help. Anyone bulk deleted call recordings and have a guide to the process please.

    Andrew


    #QualityManagement
    #SystemAdministration
    #Telephony

    ------------------------------
    Andrew Lewis
    Health Management Ltd
    ------------------------------


  • 2.  RE: Delete Call Recordings Older Than 120 Days

    Posted 10-03-2023 19:15
    No replies, thread closed.

    Hey Andrew, 

    I did a recent reply about this actually. You can see here.

    The basic summary is that you can use the API to bulk job delete. Your need is much easier than in the above linked post. You would just set your range from 120 days ago to X years ago to get the correct range, and you can change the filter to be just conversation start = exists. 

    Let me know if you need any help, would be happy to deep dive if you need it :)



    ------------------------------
    Lawrence Drayton
    Prvidr Pty Ltd
    ------------------------------



  • 3.  RE: Delete Call Recordings Older Than 120 Days

    Posted 10-04-2023 10:56
    No replies, thread closed.

    Hi, thanks for the reply.

    I crated a a job and Put  {"state": "PROCESSING"} the job sits saying ready. any ideas?

    Andrew

    ***********************************************************************************************************************

    JOB

    {
      "action": "DELETE",
      "actionDate": "2023-10-04T13:45:00.000Z",
      "includeRecordingsWithSensitiveData": false,
      "includeScreenRecordings": true,
      "clearExport": false,
      "conversationQuery": {
        "segmentFilters": [
          {
            "type": "and",
            "predicates": [
              {
                "type": "dimension",
                "dimension": "dnis",
                "operator": "matches",
                "value": ""
              }
            ]
          }
        ],
        "interval": "2021-11-26T00:00:01.000Z/2021-12-30T00:00:00.000Z"
      }
    }

    ******************************************************************************************************************

    {
      "id": "ef058a7f-d5be-46c7-a6e6-ef0f2d39895c",
      "state": "READY",
      "recordingJobsQuery": {
        "action": "DELETE",
        "actionDate": "2023-10-04T13:45:00Z",
        "includeRecordingsWithSensitiveData": false,
        "includeScreenRecordings": true,
        "clearExport": false,
        "conversationQuery": {
          "segmentFilters": [
            {
              "type": "and",
              "predicates": [
                {
                  "type": "dimension",
                  "dimension": "dnis",
                  "operator": "matches",
                  "value": ""
                }
              ]
            }
          ],
          "interval": "2021-11-26T00:00:01.000Z/2021-12-30T00:00:00.000Z",
          "startOfDayIntervalMatching": false
        }
      },
      "dateCreated": "2023-10-04T13:34:45.348Z",
      "totalConversations": 229,
      "totalRecordings": 122,
      "totalSkippedRecordings": 0,
      "totalFailedRecordings": 0,
      "totalProcessedRecordings": 0,
      "percentProgress": 0,
      "selfUri": "/api/v2/recording/jobs/ef058a7f-d5be-46c7-a6e6-ef0f2d39895c",
      "user": {
        "id": "5d261215-5587-4705-a20e-a36c4f7cd56d",
        "selfUri": "/api/v2/users/5d261215-5587-4705-a20e-a36c4f7cd56d"
      }
    }



    ------------------------------
    Andrew Lewis
    Health Management Ltd
    ------------------------------



  • 4.  RE: Delete Call Recordings Older Than 120 Days

    Posted 10-04-2023 12:17
    No replies, thread closed.

    Hi, i can now get the job to run, however i am struggling with the code. I want to delete all call recording between two dates. like below.

    But the filter is wrong. what would i need to delete all recordings?

    {
      "action": "DELETE",
      "actionDate": "2023-10-04T18:45:00.000Z",
      "includeRecordingsWithSensitiveData": false,
      "includeScreenRecordings": true,
      "clearExport": false,
      "conversationQuery": {
        "segmentFilters": [
          {
            "type": "and",
            "predicates": [
              {
                "type": "dimension",
                "dimension": "direction",
                "operator": "matches",
                "value": "outbound"
              }
            ]
          }
        ],
        "interval": "2021-11-26T00:00:01.000Z/2021-12-30T00:00:00.000Z"



    ------------------------------
    Andrew Lewis
    Health Management Ltd
    ------------------------------



  • 5.  RE: Delete Call Recordings Older Than 120 Days

    Posted 10-04-2023 20:02
    No replies, thread closed.

    Hey Andrew, 

    From the response to the job it appears that it's found some recordings based on your search criteria 

      },
      "dateCreated": "2023-10-04T13:34:45.348Z",
      "totalConversations": 229,
      "totalRecordings": 122,

    What I do see is your interval is "interval": "2021-11-26T00:00:01.000Z/2021-12-30T00:00:00.000Z" (This looks like ~5 days worth)

    If you wanted to delete everything more than 120 days I would use "interval": "2000-01-01T00:00:01.000Z/2023-06-07T00:00:00.000Z"

    This should pick up any you might have in that period that was originating as an outbound call (As per your segments)

    If you re-run with the new interval it should pick up a lot more :)



    ------------------------------
    Lawrence Drayton
    Prvidr Pty Ltd
    ------------------------------