Hello Team - I have large number of queues and within each queue, I need to update certain parameters, I have below code, which runs successfully (In the sense it displays the message that queue has been updated,, and doesn't throw any error), but when I check on the queue , the values are still not updated, Could you help me in understanding from the below code, what might be the issue?
import PureCloudPlatformClientV2
from PureCloudPlatformClientV2.rest import ApiException
from PureCloudPlatformClientV2.apis import routing_api, conversations_api
from PureCloudPlatformClientV2.models import Queue, MediaTranscription
from PureCloudPlatformClientV2.configuration import Configuration
from pprint import pprint
apiclient = PureCloudPlatformClientV2.api_client.ApiClient().get_client_credentials_token(
"abcd", "efgh")
authApi = PureCloudPlatformClientV2.AuthorizationApi(apiclient)
Create an instance of the API class
api_instance = PureCloudPlatformClientV2.RoutingApi(apiclient)
Define the queue ID
queue_id = '1e4a5'
Create a QueueRequest object with the desired properties
body = {
"name" : "Shakti-Test",
"default_scripts" : {"CALL": {"name": "_Inbound_Email"}},
"queue_flow" : {"id": "11ef", "name": "Action", "self_uri": "/api/v2/flows/11ef"},
"enable_transcription" : "True",
"whisper_prompt" : {"id": "ad5fc", "name": "Bruce_Whisper_1", "self_uri": "/api/v2/architect/prompts/ad5fc"}
}
try:
# Update the queue
api_response = api_instance.put_routing_queue(queue_id, body)
print("Queue updated successfully!")
print(api_response)
except ApiException as e:
print("Exception when calling RoutingApi->put_routing_queue: %s\n" % e)
Kindly help.
Warm Regards
Shakti Joshi