We desperately need a way to remove certain emails from the queue.
Lack of admin features, in general, (cherry pick, assign, delete/disconnect, batch actions) are causing quite a bit of grief.
We have a customer that has emailed us 800 times in the last few days and it has saturated the queue in the contact centre.
I tried to write an API script in Python using the PATCH method to disconnect all emails from a certain sender /api/v2/conversations/callbacks/{conversationId}. But this appears to be only related to calls. Is it possible? If not the API spec should detail which types it is valid for. I'll post my attempt shortly.
How is our center supposed to manage this torrent of duplicate emails and get to the real customers? They only have limited email admin staff so manually addressing these one by one is not an option.
Here is the relevant code:
# Prepare for GET /api/v2/authorization/roles request
request_headers = {'Authorization': response_json['token_type'] + ' ' + response_json['access_token']}
conid = '1234567-5bdb-4a20-a447-qwerty'
patch = {'state': 'disconnected'}
# Hit the API
response = requests.patch(cc.api_base + '/api/v2/conversations/emails/' + conid, headers=request_headers, data=patch)
Response json:
{u'code': u'unsupported media type',
u'contextId': u'12345-d2a9-41c0-8ac4-1ac003234667',
u'details': [],
u'errors': [],
u'message': u'HTTP 415 Unsupported Media Type',
u'status': 415}
Failure: 415 - Unsupported Media Type
Thanks both. I will try shortly. Sorry for being a bit distressed. I must have copied the wrong endpoint. It was the first one I got to in the list, and in my head I was thinking interactions were agnostic.
The 415 - Unsupported Media Type error is because your request is malformed. I'm guessing you're either not sending the content-type header or are sending an invalid value. You should be sending content-type: application/json.
Yeah I tried adding the content type header, and got a malformed error. I don't have time to learn the SDK (just now) and am much more familiar with the Requests module.
Let me explore getting the content type header working.