Just edit depatment and set after how many seconds user should be redirected to leave a message form.
As for bonus you can have the following fancy workflow
This workflow can be even futher enhanced by transfering chat to another department first and only then showing feedback form. In that case "Rejected" department have to be configured to redirect user to feedback form.
Developing application takes a lot of time. You can support application by donating. There is no company behind this application and it takes away my free time. Every donation matters and does not matter how small it is!