Apps.Rasa icon indicating copy to clipboard operation
Apps.Rasa copied to clipboard

Error while trying to handover

Open guimvmatos opened this issue 4 years ago • 0 comments

Hi,

I'm trying to implement a handover action. My bot is on "Test Bot" department, I want to handover a chat to other department. I'm getting this error:

Handover Endpoint response b'{"error":"Error occurred while processing handover. Details Error: The selected department and the current room department are the same [error-forwarding-chat-same-department]"}'

I'm using this code:

        headers = CaseInsensitiveDict()
        headers["Content-Type"] = "application/x-www-form-urlencoded"
        headers["Accept"] = "application/json"

        INCOMING_ENDPOINT_URL = "blablabla hiden blablabla"

        payload = {
            "action": "handover",
            "sessionId": tracker.sender_id,
            "actionData": {
              "targetDepartment": "Secretaria"
            }
        }
        
        response = requests.post(INCOMING_ENDPOINT_URL, headers=headers, data=payload)
        print('Handover Endpoint response', response.content)

Anyone can help me?

@murtaza98 maybe you can help again?

guimvmatos avatar May 17 '21 19:05 guimvmatos