40005: Assignment Callback response does not contain Instruction
TASKROUTER
WARNING
This warning occurs when TaskRouter receives a 200 OK Assignment Callback response with a JSON body, but that body does not include the required instruction key. If you want TaskRouter to take immediate action on the Reservation, return a valid JSON object that includes instruction. If you want to handle the Reservation later, return an empty JSON document such as {} and update the Reservation through the Reservations API when you are ready.
- Your Assignment Callback returned JSON that did not include the required
instructionkey. - Your application attempted to send an assignment instruction, such as
accept,reject,dequeue,call, orredirect, but omitted theinstructionfield from the JSON response. - Your application intended to defer the decision and handle the Reservation asynchronously, but returned non-empty JSON instead of an empty JSON document such as
{}.
- If you want TaskRouter to act immediately, return
Content-Type: application/jsonand a valid JSON object that includesinstructionwith a supported value such asaccept,reject,dequeue,call, orredirect. - If you want to process the Reservation asynchronously, return an empty JSON document such as
{}with200 OK, then accept or reject the Reservation later through the Reservations API. - Verify that your Assignment Callback response body is valid JSON and includes
instructionwhenever you return an assignment instruction.