python-five9
python-five9 copied to clipboard
createOutboundCampaign returns error
When running class AdminWebService.createOutboundCampaign as follows:
client.configuration.createOutboundCampaign({'name': 'Test'})
I get the following error:
zeep.exceptions.Fault: "prompt for queue timeout" is required, but is "null"
I've tested with various variables, including prompt, maxQueueTime, callWrapup, dialNumberOnTimeout. Unfortunately none of these seem to be the variable that Five9 is looking for.
I'm unable to find this missing value in any documentation related to this project or Five9's documentation - at this point I'm stumped how to get around it.
I just stumbled onto this comment, having recently hit the same issue myself (though I'm using Five9's API directly). Five9's documentation is poor, and the error responses from their API's aren't much better.
To get createOutboundCampaign to work correctly, I had to add actionOnQueueExpiration and maxQueueTime to the request payload:
outbound_campaign = {
'type' : 'OUTBOUND',
'name' : 'Test OB',
'maxQueueTime' : {
'seconds' : 1,
'minutes' : 0,
'hours' : 0,
'days' : 0,
},
'actionOnQueueExpiration' : {
'actionType' : 'DROP_CALL',
},
}
client.service.createOutboundCampaign(outbound_campaign)
I just stumbled onto this comment, having recently hit the same issue myself (though I'm using Five9's API directly). Five9's documentation is poor, and the error responses from their API's aren't much better.
To get
createOutboundCampaignto work correctly, I had to addactionOnQueueExpirationandmaxQueueTimeto the request payload:outbound_campaign = { 'type' : 'OUTBOUND', 'name' : 'Test OB', 'maxQueueTime' : { 'seconds' : 1, 'minutes' : 0, 'hours' : 0, 'days' : 0, }, 'actionOnQueueExpiration' : { 'actionType' : 'DROP_CALL', }, } client.service.createOutboundCampaign(outbound_campaign)
This is awesome, thank you!