How to receive a notification when the document batch is ready
Athento allows sending each user an email notification with the number of documents they have pending in a queue. This mechanism is intended to notify the user when their batch is ready to be processed, without the need for them to stay connected waiting.
The notification is sent per user: each recipient receives their own count, applying the queue filters with their own credentials, including the «my documents» filters.
If the content of the email has not changed compared to the last one sent to the same user, the system does not send the notification again.
How to configure sending
Sending is triggered by running the following command in the instance:
athadmin send_queue_digest_email --queue <queue-name> --groups <group1> <group2>
The –queue parameter is the internal name of the queue, the slug identifier visible in its URL. The –groups parameter accepts one or more names of user groups that will receive the notification.
The command can be configured in the server crontab to run periodically, for example every 5 minutes.
You can schedule the command from https://myathento.athento.com/config/configuration/
Optional parameters
–template: name of the notification template to use. If not specified, the default template queue_user_status_notification is used.
–send_without_documents: if this flag is included, the notification is sent even if the user has 0 documents in the queue. By default, users without documents are omitted.
–min: minimum number of documents the user must have in the queue for the notification to be sent. If the user has fewer documents than this value, they are omitted in that run. If not specified, any count greater than 0 triggers sending.
–max_wait: maximum wait time in minutes. If the user has spent that time with documents in the queue without having reached the minimum indicated in –min, the system attempts to send it anyway. The timer starts the first time the user has documents in the queue and is reset when they return to 0.
Usage example with minimum and wait time
The following command sends the notification to each user in the managers group when they have 10 or more documents in the facturas-pendientes queue, or when they have spent 30 minutes with documents without having reached that minimum:
athadmin send_queue_digest_email --queue facturas-pendientes --groups gestores --min 10 --max_wait 30