Bulk export of recordings deletes message interactions

Hi
I am testing a solution to export recordings to AWS S3 and have noticed strange behavior.

The solution correctly exports (unfortunately it takes a very long time) the interactions "voice" and "chat". However, the "messages" interaction is missing from the export results.
In addition, after executing the script, the "message" recording is no longer available in Genesys Cloud.
The message after entering the interaction: Some parts of this conversation have been deleted.

Script:

> import os
> import sys
> import time
> import PureCloudPlatformClientV2
> from PureCloudPlatformClientV2.rest import ApiException
> 
> print('-------------------------------------------------------------')
> print('- Execute Bulk Action on recordings-')
> print('-------------------------------------------------------------')
> 
> 
> # Set environment
> region = PureCloudPlatformClientV2.PureCloudRegionHosts.eu_central_1
> PureCloudPlatformClientV2.configuration.host = region.get_api_host()
> 
> # OAuth when using Client Credentials
> api_client = PureCloudPlatformClientV2.api_client.ApiClient() \
>             .get_client_credentials_token("HIDDEN", "HIDDEN")
> 
> 
> # Get the api
> recording_api = PureCloudPlatformClientV2.RecordingApi(api_client)
> 
> # Build the create job query, for export action, set query.action = "EXPORT"
> query = PureCloudPlatformClientV2.RecordingJobsQuery()
> query.action = "EXPORT"
> query.action_date = "2023-12-08T01:06:00.000Z"
> # Comment out integration id if using DELETE
> query.integration_id = "HIDDEN"
> query.conversation_query = {
>     "interval": "2023-11-27T01:00:00.000Z/2023-11-28T01:00:00.000Z",
>     "order": "asc",
>     "orderBy": "conversationStart"
> }
> print(query)
> try:
>     # Call create_recording_job api
>     create_job_response = recording_api.post_recording_jobs(query)
>     job_id = create_job_response.id
>     print(f"Successfully created recording bulk job { create_job_response}")
>     print(job_id)
> except ApiException as e:
>     print(f"Exception when calling RecordingApi->post_recording_jobs: { e }")
>     sys.exit()
> 
> 
> # Call get_recording_job api
> while True:
>     try:
>         get_recording_job_response = recording_api.get_recording_job(job_id)
>         job_state = get_recording_job_response.state
>         if job_state != 'PENDING':
>             break
>         else:
>             print("Job state PENDING...")
>             time.sleep(2)
>     except ApiException as e:
>         print(f"Exception when calling RecordingApi->get_recording_job: { e }")
>         sys.exit()
> 
> 
> if job_state == 'READY':
>     try:
>         execute_job_response = recording_api.put_recording_job(job_id, {"state": "PROCESSING"})
>         job_state = execute_job_response.state
>         print(f"Successfully execute recording bulk job { execute_job_response}")
>     except ApiException as e:
>         print(f"Exception when calling RecordingApi->put_recording_job: { e }")
>         sys.exit()
> else:
>     print(f"Expected Job State is: READY, however actual Job State is: { job_state }")

Response:

-------------------------------------------------------------
- Execute Bulk Action on recordings-
-------------------------------------------------------------
{'action': 'EXPORT',
 'action_date': '2023-12-08T01:06:00.000Z',
 'conversation_query': {'interval': '2023-11-27T01:00:00.000Z/2023-11-28T01:00:00.000Z',
                        'order': 'asc',
                        'orderBy': 'conversationStart'},
 'include_screen_recordings': None,
 'integration_id': 'HIDDEN'}
Successfully created recording bulk job {'date_created': datetime.datetime(2023, 12, 8, 11, 17, 37, 943000, tzinfo=tzutc()),
 'error_message': None,
 'failed_recordings': None,
 'id': '7b112440-c043-401f-b89c-47fc210af93e',
 'percent_progress': 0,
 'recording_jobs_query': {'action': 'EXPORT',
                          'action_date': datetime.datetime(2023, 12, 8, 1, 6, tzinfo=tzutc()),
                          'conversation_query': None,
                          'include_screen_recordings': True,
                          'integration_id': 'HIDDEN'},
 'self_uri': '/api/v2/recording/jobs/7b112440-c043-401f-b89c-47fc210af93e',
 'state': 'PENDING',
 'total_conversations': 0,
 'total_failed_recordings': 0,
 'total_processed_recordings': 0,
 'total_recordings': 0,
 'total_skipped_recordings': 0,
 'user': {'id': 'd19ec1ed-7cc6-487f-a974-027414c890aa',
          'self_uri': '/api/v2/users/d19ec1ed-7cc6-487f-a974-027414c890aa'}}
7b112440-c043-401f-b89c-47fc210af93e
Job state PENDING...
Job state PENDING...
Job state PENDING...
Job state PENDING...
Job state PENDING...
Job state PENDING...
Job state PENDING...
Successfully execute recording bulk job {'date_created': datetime.datetime(2023, 12, 8, 11, 17, 37, 943000, tzinfo=tzutc()),
 'error_message': None,
 'failed_recordings': None,
 'id': '7b112440-c043-401f-b89c-47fc210af93e',
 'percent_progress': 0,
 'recording_jobs_query': {'action': 'EXPORT',
                          'action_date': datetime.datetime(2023, 12, 8, 1, 6, tzinfo=tzutc()),
                          'conversation_query': {'conversation_filters': None,
                                                 'evaluation_filters': None,
                                                 'interval': '2023-11-27T01:00:00.000Z/2023-11-28T01:00:00.000Z',
                                                 'limit': None,
                                                 'order': 'asc',
                                                 'order_by': 'conversationStart',
                                                 'resolution_filters': None,
                                                 'segment_filters': None,
                                                 'start_of_day_interval_matching': False,
                                                 'survey_filters': None},
                          'include_screen_recordings': True,
                          'integration_id': 'HIDDEN'},
 'self_uri': '/api/v2/recording/jobs/7b112440-c043-401f-b89c-47fc210af93e',
 'state': 'PROCESSING',
 'total_conversations': 4,
 'total_failed_recordings': 0,
 'total_processed_recordings': 0,
 'total_recordings': 3,
 'total_skipped_recordings': 0,
 'user': {'id': 'd19ec1ed-7cc6-487f-a974-027414c890aa',
          'self_uri': '/api/v2/users/d19ec1ed-7cc6-487f-a974-027414c890aa'}}

image

As per the screenshot for this day I also see that there are only 4 interactions but the final total_recordings is 3.
So it looks like the script has a problem with the message interaction.

image

What can cause such export problems? This is the case with every interval and every message interaction

This topic was automatically closed 31 days after the last reply. New replies are no longer allowed.