Legacy Dev Forum Posts

 View Only

Sign Up

Updating Email Auto Answer not working

  • 1.  Updating Email Auto Answer not working

    Posted 06-05-2025 18:32

    Shakti_Joshi | 2024-10-04 21:52:45 UTC | #1

    Hello Team - We are trying to update the queue parameters for the email section and want to update the auto-answer for email to "True", below is the python code, the code runs without an error, but still is not updating the auto-answer for email to true:-

    import PureCloudPlatformClientV2 import logging from PureCloudPlatformClientV2 import Script, QueueRequest from PureCloudPlatformClientV2.rest import ApiException from PureCloudPlatformClientV2.apis import routingapi, conversationsapi from PureCloudPlatformClientV2.models import Queue, MediaTranscription , predictor_models from PureCloudPlatformClientV2.configuration import Configuration from pprint import pprint import openpyxl

    region = PureCloudPlatformClientV2.PureCloudRegionHosts.useast2 PureCloudPlatformClientV2.configuration.host = region.getapihost() apiclient = PureCloudPlatformClientV2.apiclient.ApiClient().getclientcredentialstoken("80bc5d03","T8C_") authApi = PureCloudPlatformClientV2.AuthorizationApi(apiclient)

    Create an instance of the API class

    api_instance = PureCloudPlatformClientV2.RoutingApi(apiclient)

    Define the queue ID

    queue_id = 'b543ed0b'

    body = PureCloudPlatformClientV2.QueueRequest() body.name = "TestEmail" body.mediasettings = PureCloudPlatformClientV2.MediaSettings() body.mediasettings.email = PureCloudPlatformClientV2.EmailMediaPolicy() body.mediasettings.email.enableautoanswer = True

    Create reference to flow

    queue_flow = PureCloudPlatformClientV2.DomainEntityRef()

    queue_flow.id = b04c"

    body.queueflow = queueflow

    Create reference to prompt

    whisper_prompt = PureCloudPlatformClientV2.DomainEntityRef()

    whisper_prompt.id = "6ce3"

    body.whisperprompt = whisperprompt

    Update the Division

    division=PureCloudPlatformClientV2.Division()

    division.id="0a097f0c"

    body.division=division

    Create scripts

    script1 = Script()

    Set script properties (name, etc.) based on the library

    script1.name = "abcd"

    script1.id="c7bf"

    Update queue with default script

    body.default_scripts = {

    "CALL": script1 # Assuming "EMAIL" is the communication type for the script

    }

    logging.debug("Request body: %s", body.to_dict()) # Log the request body

    try:

    Update the queue

    apiresponse = apiinstance.putroutingqueue(queueid, body) print("Queue updated successfully!") print(apiresponse) except ApiException as e: print("Exception when calling RoutingApi->putroutingqueue: %s\n" % e)

    and here is a snippet of the output:-

    Queue updated successfully! {'acwsettings': {'timeoutms': None, 'wrapupprompt': 'OPTIONAL'}, 'agentownedrouting': None, 'autoansweronly': False, 'bullseye': None, 'callingpartyname': None, 'callingpartynumber': None, 'conditionalgrouprouting': None, 'createdby': 'ed352', 'datecreated': datetime.datetime(2023, 10, 26, 15, 15, 6, 114000, tzinfo=tzutc()), 'datemodified': datetime.datetime(2024, 10, 4, 21, 46, 19, 655000, tzinfo=tzutc()), 'defaultscripts': {}, 'description': None, 'directrouting': None, 'division': {'id': 'fc0c-02a64f', 'name': 'EFG', 'selfuri': '/api/v2/authorization/divisions/fc0c-02a64f'}, 'emailinqueueflow': None, 'enableaudiomonitoring': None, 'enablemanualassignment': None, 'enabletranscription': None, 'id': 'b543ed0b', 'joinedmembercount': 0, 'mediasettings': {'call': {'alertingtimeoutseconds': 8, 'autoansweralerttoneseconds': None, 'enableautoanswer': None, 'manualansweralerttoneseconds': None, 'servicelevel': {'durationms': 20000, 'percentage': 0.8}, 'subtypesettings': None}, 'callback': {'alertingtimeoutseconds': 30, 'autoansweralerttoneseconds': None, 'autodialdelayseconds': 300, 'autoenddelayseconds': 300, 'enableautoanswer': None, 'enableautodialandend': False, 'manualansweralerttoneseconds': None, 'servicelevel': {'durationms': 20000, 'percentage': 0.8}, 'subtypesettings': None}, 'chat': {'alertingtimeoutseconds': 30, 'autoansweralerttoneseconds': None, 'enableautoanswer': None, 'manualansweralerttoneseconds': None, 'servicelevel': {'durationms': 20000, 'percentage': 0.8}, 'subtypesettings': None}, 'email': {'alertingtimeoutseconds': 300, 'autoansweralerttoneseconds': None, 'enableautoanswer': None, 'manualansweralerttoneseconds': None, 'servicelevel': {'durationms': 86400000, 'percentage': 0.8}, 'subtypesettings': None}, 'message': {'alertingtimeoutseconds': 30, 'autoansweralerttoneseconds': None, 'enableautoanswer': None, 'manualansweralerttoneseconds': None, 'servicelevel': {'durationms': 20000, 'percentage': 0.8}, 'subtypesettings': None}}, 'membercount': 0, 'membergroups': None, 'messageinqueueflow': None, 'modifiedby': 'b9bc', 'name': 'ACSDomClaimEmail', 'onholdprompt': None, 'outboundemailaddress': None, 'outboundmessagingaddresses': None, 'peerid': None, 'queueflow': None, 'routingrules': None, 'scoringmethod': 'TimestampAndPriority', 'selfuri': '/api/v2/routing/queues/b543', 'skillevaluationmethod': 'ALL', 'suppressinqueuecallrecording': False, 'usermembercount': 0, 'whisper_prompt': None}


    Shakti_Joshi | 2024-10-07 11:45:16 UTC | #2

    Hello Team - Any update.


    tim.smith | 2024-10-07 16:18:12 UTC | #3

    ShaktiJoshi, post:1, topic:29712
    body.mediasettings.email = PureCloudPlatformClientV2.EmailMediaPolicy() body.mediasettings.email.enableauto_answer = True

    Make sure you're using the correct types and properties as defined in the SDK. https://mypurecloud.github.io/platform-client-sdk-python/RoutingApi


    Shakti_Joshi | 2024-10-07 17:09:34 UTC | #4

    Can you kindly elaborate and send me to the right direction, I am still new at this and trying to understand why its not working.


    tim.smith | 2024-10-07 17:13:21 UTC | #5

    Refer to the documentation for the RoutingApi function you're using. You are using incorrect types and property names that don't exist on the correct types. This results in you making a request that does not contain the data required to use that endpoint, which is why the settings you're setting aren't working.


    Shakti_Joshi | 2024-10-07 18:31:24 UTC | #6

    tim.smith, post:5, topic:29712
    This results in you making a request that does not contain the data required to use that endpoint, which is why the settings you're setting aren't working.

    Thanks Tim for your reply and pointing me the right direction, appreciate your help. I made changes to the code, after revisiting, and now atleast I am able to see the Meaidsetting request for email going in to set autoanswer to True, but is still throwing an error

    Create an instance of the API class

    api_instance = PureCloudPlatformClientV2.RoutingApi(apiclient)

    Define the queue ID

    queue_id = '-01b5-'

    body = PureCloudPlatformClientV2.QueueRequest() print("Raw Body",body) body.name = "Test_Email"

    Initialize media settings and email settings

    body.mediasettings = PureCloudPlatformClientV2.QueueMediaSettings() print("Raw Body",body.mediasettings) body.mediasettings.email = PureCloudPlatformClientV2.MediaSettings() print("Raw Body",body.mediasettings.email) body.mediasettings.email.enableautoanswer = True body.mediasettings.email.autoansweralerttoneseconds = 1 print("Raw Body",body.mediasettings.email.enableauto_answer)

    print("Request body: %s", body) # Log the request body

    try:

    Update the queue

    apiresponse = apiinstance.putroutingqueue(queueid, body) print("Queue updated successfully!") print(apiresponse) except ApiException as e: print("Exception when calling RoutingApi->putroutingqueue: %s\n" % e)

    and Now I am getting a 500 internal error:-

    Raw Body {'acwsettings': None, 'agentownedrouting': None, 'autoansweronly': None, 'bullseye': None, 'callingpartyname': None, 'callingpartynumber': None, 'conditionalgrouprouting': None, 'createdby': None, 'datecreated': None, 'datemodified': None, 'defaultscripts': None, 'description': None, 'directrouting': None, 'division': None, 'emailinqueueflow': None, 'enableaudiomonitoring': None, 'enablemanualassignment': None, 'enabletranscription': None, 'id': None, 'joinedmembercount': None, 'mediasettings': None, 'membercount': None, 'membergroups': None, 'messageinqueueflow': None, 'modifiedby': None, 'name': None, 'onholdprompt': None, 'outboundemailaddress': None, 'outboundmessagingaddresses': None, 'peerid': None, 'queueflow': None, 'routingrules': None, 'scoringmethod': None, 'selfuri': None, 'skillevaluationmethod': None, 'suppressinqueuecallrecording': None, 'usermembercount': None, 'whisperprompt': None} Raw Body {'call': None, 'callback': None, 'chat': None, 'email': None, 'message': None} Raw Body {'alertingtimeoutseconds': None, 'autoansweralerttoneseconds': None, 'enableautoanswer': None, 'manualansweralerttoneseconds': None, 'servicelevel': None, 'subtypesettings': None} Raw Body True Request body: %s {'acwsettings': None, 'agentownedrouting': None, 'autoansweronly': None, 'bullseye': None, 'callingpartyname': None, 'callingpartynumber': None, 'conditionalgrouprouting': None, 'createdby': None, 'datecreated': None, 'datemodified': None, 'defaultscripts': None, 'description': None, 'directrouting': None, 'division': None, 'emailinqueueflow': None, 'enableaudiomonitoring': None, 'enablemanualassignment': None, 'enabletranscription': None, 'id': None, 'joinedmembercount': None, 'mediasettings': {'call': None, 'callback': None, 'chat': None, 'email': {'alertingtimeoutseconds': None, 'autoansweralerttoneseconds': 1, 'enableautoanswer': True, 'manualansweralerttoneseconds': None, 'servicelevel': None, 'subtypesettings': None}, 'message': None}, 'membercount': None, 'membergroups': None, 'messageinqueueflow': None, 'modifiedby': None, 'name': 'TestEmail', 'onholdprompt': None, 'outboundemailaddress': None, 'outboundmessagingaddresses': None, 'peerid': None, 'queueflow': None, 'routingrules': None, 'scoringmethod': None, 'selfuri': None, 'skillevaluationmethod': None, 'suppressinqueuecallrecording': None, 'usermembercount': None, 'whisperprompt': None} Exception when calling RoutingApi->putrouting_queue: (500) Reason: Internal Server Error HTTP response headers: HTTPHeaderDict({'Content-Type': 'application/json', 'Content-Length': '228', 'Connection': 'keep-alive', 'Date': 'Mon, 07 Oct 2024 18:26:55 GMT', 'Cache-Control': 'no-cache, no-store, must-revalidate', 'ININ-Correlation-Id': '803129ac-bdb8-4f4b-8671-e454b9780a3d', 'Strict-Transport-Security': 'max-age=31536000; includeSubDomains', 'X-Cache': 'Error from cloudfront', 'Via': '1.1 a4edf08fb593b7ca4fee9a64018a186e.cloudfront.net (CloudFront)', 'X-Amz-Cf-Pop': 'JFK52-P1', 'X-Amz-Cf-Id': 'TZlUHI-Da2yvkK9SJknblENdMB2Mo2k3fl8KR78o47Kok0IUkObPZQ=='}) HTTP response body: {"message":"The server encountered an unexpected condition which prevented it from fulfilling the request.","code":"internal.server.error","status":500,"contextId":"803129ac-bdb8-4f4b-8671-e454b9780a3d","details":[],"errors":[]}


    tim.smith | 2024-10-07 18:37:14 UTC | #7

    A 500 error indicates a server-side error. Please open a case with Genesys Cloud Care to investigate further.


    vpirat | 2024-10-07 21:21:14 UTC | #8

    ShaktiJoshi, post:6, topic:29712
    body.mediasettings.email.enableautoanswer = True body.mediasettings.email.autoansweralerttone_seconds = 1

    Try also to define other parameters in media settings: body.mediasettings.alertingtimeoutseconds = \<value> body.mediasettings.manual.answeralerttone_seconds = \<value>

    (from doc https://mypurecloud.github.io/platform-client-sdk-python/MediaSettings)

    Regards, V.P.


    Shakti_Joshi | 2024-10-07 22:15:38 UTC | #9

    Thanks a lot @vpirat for your suggestion, I tried modifying the code, and I have tried both float and integer value (also , please kindly note the documentation has this as optional, and from the API portal it updates without setting these value), but its still throwing 500 Internal error, below is the modified code:-

    Create an instance of the API class

    api_instance = PureCloudPlatformClientV2.RoutingApi(apiclient)

    Define the queue ID

    queue_id = 'bd77dcbc'

    body = PureCloudPlatformClientV2.QueueRequest() print("Raw Body",body) body.name = "TestEmail" #QueueName

    Initialize media settings and email settings

    body.mediasettings = PureCloudPlatformClientV2.QueueMediaSettings() print("Raw Body",body.mediasettings) body.mediasettings.email = PureCloudPlatformClientV2.MediaSettings() print("Raw Body",body.mediasettings.email) body.mediasettings.email.enableautoanswer = True body.mediasettings.email.autoansweralerttoneseconds = 15.0 body.mediasettings.alertingtimeoutseconds = 15 print("Raw Body",body.mediasettings.email.enableautoanswer)

    Here is the response:-

    Raw Body {'acwsettings': None, 'agentownedrouting': None, 'autoansweronly': None, 'bullseye': None, 'callingpartyname': None, 'callingpartynumber': None, 'conditionalgrouprouting': None, 'createdby': None, 'datecreated': None, 'datemodified': None, 'defaultscripts': None, 'description': None, 'directrouting': None, 'division': None, 'emailinqueueflow': None, 'enableaudiomonitoring': None, 'enablemanualassignment': None, 'enabletranscription': None, 'id': None, 'joinedmembercount': None, 'mediasettings': None, 'membercount': None, 'membergroups': None, 'messageinqueueflow': None, 'modifiedby': None, 'name': None, 'onholdprompt': None, 'outboundemailaddress': None, 'outboundmessagingaddresses': None, 'peerid': None, 'queueflow': None, 'routingrules': None, 'scoringmethod': None, 'selfuri': None, 'skillevaluationmethod': None, 'suppressinqueuecallrecording': None, 'usermembercount': None, 'whisperprompt': None} Raw Body {'call': None, 'callback': None, 'chat': None, 'email': None, 'message': None} Raw Body {'alertingtimeoutseconds': None, 'autoansweralerttoneseconds': None, 'enableautoanswer': None, 'manualansweralerttoneseconds': None, 'servicelevel': None, 'subtypesettings': None} Raw Body True Request body: %s {'acwsettings': None, 'agentownedrouting': None, 'autoansweronly': None, 'bullseye': None, 'callingpartyname': None, 'callingpartynumber': None, 'conditionalgrouprouting': None, 'createdby': None, 'datecreated': None, 'datemodified': None, 'defaultscripts': None, 'description': None, 'directrouting': None, 'division': None, 'emailinqueueflow': None, 'enableaudiomonitoring': None, 'enablemanualassignment': None, 'enabletranscription': None, 'id': None, 'joinedmembercount': None, 'mediasettings': {'call': None, 'callback': None, 'chat': None, 'email': {'alertingtimeoutseconds': None, 'autoansweralerttoneseconds': 15.0, 'enableautoanswer': True, 'manualansweralerttoneseconds': None, 'servicelevel': None, 'subtypesettings': None}, 'message': None}, 'membercount': None, 'membergroups': None, 'messageinqueueflow': None, 'modifiedby': None, 'name': 'TestEmail', 'onholdprompt': None, 'outboundemailaddress': None, 'outboundmessagingaddresses': None, 'peerid': None, 'queueflow': None, 'routingrules': None, 'scoringmethod': None, 'selfuri': None, 'skillevaluationmethod': None, 'suppressinqueuecallrecording': None, 'usermembercount': None, 'whisperprompt': None} Exception when calling RoutingApi->putroutingqueue: (500) Reason: Internal Server Error HTTP response headers: HTTPHeaderDict({'Content-Type': 'application/json', 'Content-Length': '228', 'Connection': 'keep-alive', 'Date': 'Mon, 07 Oct 2024 22:08:36 GMT', 'Cache-Control': 'no-cache, no-store, must-revalidate', 'ININ-Correlation-Id': '74eb8937-41db-4bc0-a422-a04ae468a4a6', 'Strict-Transport-Security': 'max-age=31536000; includeSubDomains', 'X-Cache': 'Error from cloudfront', 'Via': '1.1 78a5d96d9c348edf8a3fca2ba77f8e64.cloudfront.net (CloudFront)', 'X-Amz-Cf-Pop': 'JFK52-P1', 'X-Amz-Cf-Id': '3FZa-eNZBp2ws4wy2V6JbcodRQ3IN7luzStngtuvls1sqH_cEkOdPg=='}) HTTP response body: {"message":"The server encountered an unexpected condition which prevented it from fulfilling the request.","code":"internal.server.error","status":500,"contextId":"74eb8937-41db-4bc0-a422-a04ae468a4a6","details":[],"errors":[]}


    vpirat | 2024-10-08 11:15:08 UTC | #10

    Hi,

    Api call fails on alertingtimeoutseconds parameter that cannot be retrieved with a value. From the doc, it looks like the properties are camel case.

    See related https://mypurecloud.github.io/platform-client-sdk-python/MediaSettings

    Looks like some discrepancies there. See https://developer.genesys.cloud/forum/t/conflict-between-key-name-formatting-get-vs-post-camel-vs-underscore/22731/7

    So I would advise to retry with the naming from the doc. Set all properties.

    Hope this helps,

    Regards, V.P.


    Shakti_Joshi | 2024-10-08 14:01:01 UTC | #11

    Thanks again @vpirat - I have tried to change the request based upon the other post and you suggestion, and this time in the Raw output, I don't see values being set:-

    Request:-

    body.mediasettings = PureCloudPlatformClientV2.QueueMediaSettings() print("Raw Body",body.mediasettings) body.mediasettings.email = PureCloudPlatformClientV2.MediaSettings() print("Raw Body",body.mediasettings.email) body.mediasettings.email.enableAutoAnswer = True print("Raw Body",body.mediasettings.email.enableAutoAnswer) body.mediasettings.email.autoAnswerAlertToneSeconds = 15.0 print("Raw Body",body.mediasettings.email.autoAnswerAlertToneSeconds) body.mediasettings.email.alertingTimeoutSeconds = 15 print("Raw Body",body.mediasettings.email.alertingTimeoutSeconds) body.mediasettings.email.serviceLevel = { "percentage": 0.75, "durationMs": 20000 } print("Raw Body",body.mediasettings.email.serviceLevel) body.mediasettings.email.subTypeSettings = True print("Raw Body",body.mediasettings.email.subTypeSettings) body.mediasettings.email.manualAnswerAlertToneSeconds = 20 print("Raw Body",body.mediasettings.email.manualAnswerAlertToneSeconds)

    and here are the logs:-

    Raw Body {'acwsettings': None, 'agentownedrouting': None, 'autoansweronly': None, 'bullseye': None, 'callingpartyname': None, 'callingpartynumber': None, 'conditionalgrouprouting': None, 'createdby': None, 'datecreated': None, 'datemodified': None, 'defaultscripts': None, 'description': None, 'directrouting': None, 'division': None, 'emailinqueueflow': None, 'enableaudiomonitoring': None, 'enablemanualassignment': None, 'enabletranscription': None, 'id': None, 'joinedmembercount': None, 'mediasettings': None, 'membercount': None, 'membergroups': None, 'messageinqueueflow': None, 'modifiedby': None, 'name': None, 'onholdprompt': None, 'outboundemailaddress': None, 'outboundmessagingaddresses': None, 'peerid': None, 'queueflow': None, 'routingrules': None, 'scoringmethod': None, 'selfuri': None, 'skillevaluationmethod': None, 'suppressinqueuecallrecording': None, 'usermembercount': None, 'whisper_prompt': None}

    Raw Body {'call': None, 'callback': None, 'chat': None, 'email': None, 'message': None}

    Raw Body {'alertingtimeoutseconds': None, 'autoansweralerttoneseconds': None, 'enableautoanswer': None, 'manualansweralerttoneseconds': None, 'servicelevel': None, 'subtype_settings': None} Raw Body True Raw Body 15.0 Raw Body 15 Raw Body {'percentage': 0.75, 'durationMs': 20000} Raw Body True Raw Body 20

    Here is the snippet for the final request:- Request body: %s {'acwsettings': None, 'agentownedrouting': None, 'autoansweronly': None, 'bullseye': None, 'callingpartyname': None, 'callingpartynumber': None, 'conditionalgrouprouting': None, 'createdby': None, 'datecreated': None, 'datemodified': None, 'defaultscripts': None, 'description': None, 'directrouting': None, 'division': None, 'emailinqueueflow': None, 'enableaudiomonitoring': None, 'enablemanualassignment': None, 'enabletranscription': None, 'id': None, 'joinedmembercount': None, 'mediasettings': {'call': None, 'callback': None, 'chat': None, 'email': {'**alertingtimeoutseconds': None,* *'autoansweralerttoneseconds': None,* *'enableautoanswer': None,* *'manualansweralerttoneseconds': None,* *'servicelevel': None,** 'subtypesettings': None}, 'message': None}, 'membercount': None, 'membergroups': None, 'messageinqueueflow': None, 'modifiedby': None, 'name': 'TACSEmail', 'onholdprompt': None, 'outboundemailaddress': None, 'outboundmessagingaddresses': None, 'peerid': None, 'queueflow': None, 'routingrules': None, 'scoringmethod': None, 'selfuri': None, 'skillevaluationmethod': None, 'suppressinqueuecallrecording': None, 'usermembercount': None, 'whisper_prompt': None}

    Response:-

    Exception when calling RoutingApi->putroutingqueue: (500) Reason: Internal Server Error HTTP response headers: HTTPHeaderDict({'Content-Type': 'application/json', 'Content-Length': '228', 'Connection': 'keep-alive', 'Date': 'Tue, 08 Oct 2024 13:53:04 GMT', 'Cache-Control': 'no-cache, no-store, must-revalidate', 'ININ-Correlation-Id': '8ea57659-e26c-4fae-a590-6efb0480cc30', 'Strict-Transport-Security': 'max-age=31536000; includeSubDomains', 'X-Cache': 'Error from cloudfront', 'Via': '1.1 1461aa0cc0d6d2fb29baf25a00e64194.cloudfront.net (CloudFront)', 'X-Amz-Cf-Pop': 'JFK52-P1', 'X-Amz-Cf-Id': '1yMxW8CZsjgE-BLONno6TyABZx0bKSCB7H-7jO9Mb-oycj287-Cg6Q=='}) HTTP response body: {"message":"The server encountered an unexpected condition which prevented it from fulfilling the request.","code":"internal.server.error","status":500,"contextId":"8ea57659-e26c-4fae-a590-6efb0480cc30","details":[],"errors":[]}


    tim.smith | 2024-10-08 14:07:30 UTC | #12

    vpirat, post:10, topic:29712
    Api call fails on alertingtimeoutseconds parameter that cannot be retrieved with a value. From the doc, it looks like the properties are camel case.

    Just a heads up, there's a rendering issue with the docs. When you see words in the property names that are in italics, it's because the docs aren't being properly escaped and the underscores are being parsed as markdown. The Python SDK always uses snake case, so alerting_timeout_seconds is correct.


    Shakti_Joshi | 2024-10-08 14:32:11 UTC | #13

    Thanks @tim.smith , I have already raised a Genesys support case and the response was as follows, I have provided them new set of logs, frustrating part is the API request for put doesn’t specify this to be mandatory field, anyways even after setting that up is not working.

    And alsi interesting thing to note in the error is, its not referencing the Snake_Case but the camelCase

    t:"2024-10-07T22:08:36.646Z",

    message:"Error code [internal.server.error] type [NullPointerException] message [Cannot invoke \"java.lang.Integer.intValue()\" because the return value of \"com.inin.pubapi.server.purecloud.contracts.assignment.MediaSettings.getAlertingTimeoutSeconds()\" is null] cause type [] cause message []",

    The 500 is returned as alertingtimeoutseconds is not being set as expected. alertingtimeoutseconds will be required for making a PUT request to "/api/v2/routing/queues/{queueId}". If you believe this is being sent in the request properly, can you provide us with the console/network logging from the SDK so we can confirm the exact request body?


    tim.smith | 2024-10-08 14:33:32 UTC | #14

    Thanks for sharing, please continue working with Care to resolve the issue and report bugs with the request contract's definition.


    vpirat | 2024-10-08 15:58:16 UTC | #15

    Thanks, that's good to know.


    Shakti_Joshi | 2024-10-15 15:30:57 UTC | #16

    The post which helped me in reaching to the solution was https://developer.genesys.cloud/forum/t/how-to-add-wrapup-code-using-python-sdk/25162/4?u=shakti_joshi and also the advice which @tim.smith gave of trying the API, when I looked at API request, it was way different then, how Python SDK says it should...

    I only wish there are examples as well, in the API section which can showcase how to use the API.

    Here is the final piece of the code which worked:-

    Create an instance of the API class

    api_instance = PureCloudPlatformClientV2.RoutingApi(apiclient)

    Define the queue ID

    queue_id = 'bd77dcbc'

    body = PureCloudPlatformClientV2.QueueRequest() print("Raw Body",body) body.name = "Test_Email"

    Initialize media settings and email settings

    body.mediasettings = PureCloudPlatformClientV2.QueueMediaSettings() print("Raw Body",body.mediasettings) body.mediasettings.email = PureCloudPlatformClientV2.MediaSettings() print("Raw Body",body.mediasettings.email) body.cannedresponselibraries = { "mode" :"None"} body.media_settings.email = { "enableAutoAnswer": "True", "alertingTimeoutSeconds": 30, "serviceLevel": { "percentage": 0.8, "durationMs": 86400000 }, "autoAnswerAlertToneSeconds": 10, }

    print("Request body: %s", body) # Log the request body

    try:

    Update the queue

    apiresponse = apiinstance.putroutingqueue(queueid, body) print("Queue updated successfully!") print(apiresponse) except ApiException as e: print("Exception when calling RoutingApi->putroutingqueue: %s\n" % e)


    vpirat | 2024-10-16 07:52:22 UTC | #17

    Nice to see you succeeded.

    So conclusion could be "documentation is correct but incomplete" ?

    Regards, V.P.


    Shakti_Joshi | 2024-10-16 11:25:58 UTC | #18

    Thanks @vpirat , I would leave it experts like you, @tim.smith and @Declan_ginty to decide on it :)


    system | 2024-11-16 11:26:01 UTC | #19

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


    This post was migrated from the old Developer Forum.

    ref: 29712