Instructions
The script implements custom logic for tickets in the Awaiting customer response status only for organizations with a set Business hours (schedule):
-
After a specified time (default 1 hour) after moving the ticket to the Awaiting customer response status, if there is no response from the customer and the current time is within the company's business hours, a comment with a warning about impending closure is sent.
-
After another specified time (default 1 hour), if there is still no response and we are within business hours, the ticket is moved to Solution provided with a comment.
-
If the start or reminder time falls on non-working hours, the countdown begins from the start of the next business hours.
-
Filtering by channels through the source_channels parameter in the context is supported.
Tickets of organizations that do not have Business hours or if the applicant is not part of any organization, are processed according to the default logic for handling tickets in the Awaiting customer response status.
-
Log in to Swarmica as Administrator
-
Create a new script in Settings - Scripts

and add the recurring_autonotify_autosolve.py script to it
- Create a new Scheduled action in Settings - Scheduled action - Script

- On the page that opens, select the script created in step 2, set the schedule to
* * * * *(every minute), enable it, and click Save:

By default, the script works with requests from all available source channels, the time after moving to Awaiting customer response is 1 hour, and the time after the reminder is 1 hour. However, the script supports changing these parameters. To do this, you can add data to the context in the form of:
{
"reminder_hours": <HOURS>, # number of hours until reminder
"close_hours": <HOURS>, # number of hours until closure
"source_channels":['SOURCE1',[SOURCE2],...] # list of source channels
}
Possible values for "source_channels":
'email'
'telegram'
'whatsapp'
'mango_office'
'widget'
'billmanager'
'vk'
'beeline_pbx'
'max'
'web'
'api'
Example data for the context:
{
"reminder_hours": 3,
"close_hours": 3,
"source_channels": ['email','web','widget']
}