Hello,
I am attempting to update the auto_assign_tickets field in an agent through the Freshservice API, but I keep on getting the error below. I have successfully updated the “signature” agent field with the same logic, so I know my code is correct and it is just the “auto_assign_tickets” field that is causing the error.
I am attempting this at the request of a client that wants to remove an agent from their round-robin scheduler based on a response from a third party api. I will need to be able to change “auto_assign_tickets” repeatedly to achieve their request so certain agents are not assigned tickets based on their api response.
Is there any way around this error? Or is there a more efficient way to remove an agent from auto-scheduler through the Freshservice api that I am unaware of?
Error:
status: 400,
headers: {
date: 'Wed, 28 Feb 2024 22:47:33 GMT',
'content-type': 'application/json; charset=utf-8',
'transfer-encoding': 'chunked',
connection: 'close',
status: '400 Bad Request',
'cache-control': 'no-cache, no-store',
'x-freshservice-api-version': 'latest=v2; requested=v2',
pragma: 'no-cache',
'x-request-id': 'df98f03b-cd2d-9641-9523-924cf291a9a3',
expires: 'Wed, 13 Oct 2010 00:00:00 UTC',
'x-envoy-upstream-service-time': '68',
'x-fw-ratelimiting-managed': 'true',
'x-ratelimit-total': '500',
'x-ratelimit-remaining': '497',
'x-ratelimit-used-currentrequest': '1',
'x-trace-id': '00-06d8162e667745be83c6dddb30ac3c11-e9d6a9c8333f3e98-01',
nel: '{ "report_to": "nel-endpoint-freshservice", "max_age": 2592000, "include_subdomains": true}',
'report-to': '{ "group": "nel-endpoint-freshservice", "max_age": 2592000, "include_subdomains": true, "endpoints": [{"url": "https://edge-admin.us-east-1.freshedge.net/nelreports/freshservice"}]}',
server: 'fwe'
},
response: '{"description":"Validation failed","errors":[{"field":"auto_assign_tickets","message":"Unexpected/invalid field in request","code":"invalid_field"}]}',
attempts: 1,
errorSource: 'APP'
}```