I have built a chatbot using the Conversation Agent. When a user asks something like ‘when the process will be completed?’, I need to design a flow that replies with an estimated completion time. I am currently stuck on calculating the ETA (Estimated Time of Completion) of the process.
In my case, I have both a queue-based process (with a dispatcher and performer) and a non-queue-based process. How would the ETA calculation differ for each case, and what factors need to be considered?
Queue-based process:
ETA is driven by queue length, average job runtime, and number of bots.
ETA=Pending Queue Items×Avg Job Runtime/No. of Bots
Non-queue-based process:
ETA is simply the average job runtime of the bot, since it runs sequentially.
ETA=Avg Job Runtime
Common approach:
For both cases, you can use the historical job runtime to calculate the average bot runtime.
The difference is that queue-based ETA scales with queue size and bot count, while non-queue ETA does not.
ETA is calculated based on throughput, for queues you can consider queue count, number of running bots, average item time, retries, priorities, and bot availability. Then arrive at a formula like → Remaining queue items ÷ (Active bots × Avg processing rate)
For non-queue items consider number of files/transactions, step execution time, parallel vs sequential flow, and external system delays.
→ Remaining workload × Avg time per unit
You can take average queue item time as well..but that would not give at job level but idividual queue item level..then you might need to average number of runs with queue item count and show it
For a queue-based process, calculate ETA using remaining queue items, average transaction time, and number of active robots
(ETA ≈ remaining items × avg time / robots). Also consider retries and robot availability.
For a non-queue-based process, use historical average run time and subtract the elapsed time
(ETA ≈ avg duration − elapsed time).
In both cases, the ETA is an estimate based on past data and current runtime conditions.