We want to have a button being displayed in the banner of the Chat window when user escalates to agent. That banner should display a button, which says “end chat”. Can we use widgets for this purpose?
Please let me know if there is any other way to achieve this.
We infer from your explanation that you would like to have a button in the chat window header say “endChat” and when use clicks on that button, the chat should be ended.
You can achieve this requirement through webSDK. Please make sure you have webSDK installed and setup.
Now, you can follow the below steps to implement the use-case.
Adding a button:
Open SDKApp >> UI >> chatwindow.js
Search for “chatWindowTemplate”, you can add required UI elements markup here.
If you would like to add the button in the chat window header, then add the button element under the “chat-box-controls” div.
This would add the button on the chat window header as below. We haven’t applied any styles on the button. You can make necessary stylings to the button in the chatwindow.css by referencing the button class name defined in the markup.