Skip to content

Work queues

A work queue is a list of pending tasks that live on Zoan Cloud and are processed one by one by one or more bots. It is the standard RPA pattern to process batches of work in a robust, parallel and retry way: invoices to be validated, payments to be reconciled, emails to be classified.

The idea is to separate who produces the work from who executes it:

  • A process (or an external system) queues items — each item is a unit of work with its data.
  • One or more bots take items from the queue, process them and mark the result.

A queue shines when work can be split into many independent units that are processed the same. Your process is a good candidate if you recognize several of these signs:

  • High volume — hundreds or thousands of items (invoices, payments, records, documents).
  • Items independientes — procesar uno no depende del resultado de otro.
  • Benefits from going in parallel — you want to finish faster by dividing the work between several bots.
  • Each item can fail on its own — and you want to retry only the ones that fail, not redo the entire batch.
  • You need visibility or to meet an SLA — know how many are going, how many failed and why.
  • Produced and consumed at different times — something is queued during the day and processed by bots at night.
ProcessWhy is it a good fit?
Invoice validation / registrationThousands of invoices, each independent and retryable.
Payment or transaction reconciliationAlto volumen, paralelizable entre varios bots.
Altas de empleados, clientes o proveedores (onboarding)Each registration is an item; If a system fails, only that one is retried.
Document processing (OCR + capture)Many documents; each one a transaction with its result.
Massive sending of emails, certificates or notificationsOne item per recipient; retry only those that bounce.
Data extraction from many registries or portalsOne item per record to consult.
Synchronization of orders between systems (ERP ↔ store)One item per order; tolerates retries.
  • A single and linear task (generate a report, do a download): a normal process is enough.
  • Very few items and fast: the extra cost of coordinating the queue is not worth it.
  • Steps that must run in strict order sharing state (they are not independent units).
  • Interaction in real time with a person.

A queue belongs to a environment (same as agents or credentials). The bots read and write it with the activities of the package Queue. The complete cycle:

flowchart LR
  P["Proceso productor<br/>(dispatcher)"] -->|Add Queue Item| Q[("Cola<br/>en Zoan Cloud")]
  Q -->|Get Queue Item| C["Proceso consumidor<br/>(performer)"]
  C -->|Set Transaction Status| Q
  1. Enter the environment and open the Queues tab.
  2. Click New Queue.
  3. Complete the form:
FieldWhat it is
NombreThe identifier of the queue within the environment (it is the queueName that you will use in the activities).
DescriptionFree text so the team knows what it processes.
Max reintentosHow many times an item that fails is retried before giving it up as lost. By default 3.
Auto-retry al fallarIf active, an item marked failed (retryable) automatically returns to the queue until retries are exhausted. By default enabled.
Accept items automaticallyIf active, new items are ready to be processed without manual approval. By default enabled.

modal new queue with name, max retries, auto-retry and auto-accept.

The name must match exactly the queueName that you put in the playbook activities, and the queue must exist in the same environment where the execution runs.

When you open a queue you see its items and their status in real time: you can filter by status, see the detail of each item (its content, its output or its error) and consult metrics such as items/hour and time per item. You can also Add item manually for testing.

detail of a queue with the list of items, status filter and metrics.

Each item in the queue goes through these states:

EstadoSignificado
newQueued up, waiting for a bot to grab it.
in_progressA bot took it and is processing it (locked for that run).
successfulProcessed successfully.
failedProcessed with error and no further retries available.
retriedIt failed but was retried (a new attempt was generated).
abandonedDiscarded after exhausting retries or by intervention.
reviewMarked for manual review.

The atomic lock is the key: when a bot takes an item with Get Queue Item, Zoan Cloud passes it to in_progress and no other bot can take it. That’s why several bots can read the same queue at the same time without stepping on each other.

When an item is marked as failed, the behavior depends on the queue and the playbook:

  • If the queue has Auto-retry active and there are still retries left (Max reintentos), the item returns to the queue for another attempt. The item counter Attempts keeps track.
  • If retries are exhausted, the item remains failed/abandoned permanently.
  • The playbook can force a failure without retry (when the error does not make sense to retry, such as invalid data) by passing retryable = false in Set Transaction Status.

The usual way to use queues is two processes:

  1. Dispatcher (producer): reads the source (an Excel, an SQL query, an API) and queues an item for each unit of work with Add Queue Item. It is usually launched with a programmed trigger.
  2. Performer (consumer): In a loop, grabs items with Get Queue Item until the queue is empty, processes each one and reports the result. You can run several performers in parallel (several agents) to speed up.

The complete example of both playbooks is in the Queue package introduction.

Every queue has a Copy to another environment action: it copies the definition (name and configuration), never the items — a testing bot consuming production work is exactly what environment isolation prevents. This is what makes a global extraction project’s output queue work: resolution is by name in each document’s environment, so the same-named queue in every environment is all it takes, each with its own work.