Add Queue Item
Add Queue Item
Section titled “Add Queue Item”Type: queue-add-item · Package: Queue Activities v1.0.0 · Output: ZoanQueueItem
Adds a new item to a Zoan Cloud work queue. It is the activity that the producer (dispatcher) uses to fill the queue: for each unit of work (an invoice, a payment, an email) it queues an item with its data. Returns the created ZoanQueueItem.
Required parameters
Section titled “Required parameters”| Parameter | Editor | Description |
|---|---|---|
queueName | expression | Queue name. It must exist in the environment where the execution runs. |
specificContent | JSON | The payload of the item: an object with the data that the bot will read to process it. Inside the consumer it is read with = item.SpecificContent["campo"]. |
Optional parameters
Section titled “Optional parameters”| Parameter | Editor | Description |
|---|---|---|
reference | expression | Reference unique per queue. If you re-enqueue the same reference, Zoan Cloud returns the existing item instead of duplicating (idempotence). |
priority | enum | high, normal (default) or low. Those with higher priority are delivered earlier. |
deferUntil | expression | ISO 8601 date/time. The item will not be delivered before that time. Empty = immediately processable. |
Output
Section titled “Output”Returns the queued ZoanQueueItem (with its Id, Reference, Status = "new", etc.).
Example
Section titled “Example”Queue an invoice to be validated, using its number as an idempotent reference:
Add Queue Item queueName = "facturas-por-validar" reference = = factura["numero"] priority = normal specificContent = { "facturaId": = factura["numero"], "monto": = factura["monto"], "cliente": = factura["cliente"] } → output: itemRelated activities
Section titled “Related activities”- Get Queue Item — take items for processing.
- Work queues — create the queue and understand the statuses.