Skip to content

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.

ParameterEditorDescription
queueNameexpressionQueue name. It must exist in the environment where the execution runs.
specificContentJSONThe 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"].
ParameterEditorDescription
referenceexpressionReference unique per queue. If you re-enqueue the same reference, Zoan Cloud returns the existing item instead of duplicating (idempotence).
priorityenumhigh, normal (default) or low. Those with higher priority are delivered earlier.
deferUntilexpressionISO 8601 date/time. The item will not be delivered before that time. Empty = immediately processable.

Returns the queued ZoanQueueItem (with its Id, Reference, Status = "new", etc.).

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: item