RocketChat / Apps.Rasa

Integration between Rocket.Chat and the RASA Chatbot platform
17 stars 11 forks source link

Error while trying to handover #33

Open guimvmatos opened 3 years ago

guimvmatos commented 3 years ago

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?