#664: How to close empty requests from the chat widget?
Отредактирована: сегодняSymptoms
Empty chat requests are being created.
Solution
- Create a new event action with the type Script in Settings - Event Actions.
- Disable the option Ignore past events.
- Specify the following conditions:
- Event type: Request created
- Request: Status = New
- Number of responses = 0
- Source channel: Channel type = Widget
- Request: Created: specify the time after which the request will be closed if the client does not write anything
- Add the
comment_bodyvariable to the additional context with the text of the response message:{ "comment_body": "Hello! <br/>You did not write a message, so the request will be closed." }If you do not add the variable, the standard text from the code will be used. If you want to send a different response, replace the text with the desired one.
- Attach the script from the attachment as an action: close_empty_chat.py
- Enable the trigger.

Cause
The ticket is created by clicking Start chat, even if the client does not write anything.