Is there any way to clear onHoldTasks

It says in the documentation for Kore AI that the context.onHoldTasks array is read-only, but I wanted to know if there anyway to clear this array in a bot script some how. In certain situations I need that list of onHoldTasks to be cleared but I don’t need it permanently disabled as I do want it to resume previous tasks in most scenarios. I’m aware I can disable it for specific dialog tasks but that’s not what I need.

Hello Jamar,

Welcome to Kore.ai Community.

Please note, To clear tasks that are marked as “OnHold,” you can try the following approaches:

  1. Check Task Configuration:
    Verify that there isn’t a condition or script in the bot’s flow that is deliberately putting the task on hold. Sometimes, the logic can unintentionally trigger the “OnHold” state based on specific user inputs or actions.

  2. Use the Task API: Kore.ai provides APIs for managing tasks, including actions to update or clear the status. You can use the API to update the task state from “OnHold” to another state, or simply remove the task if it’s no longer needed.

  3. Revisit Task Policies: If the task is related to specific workflow policies, review them to ensure they are not causing tasks to stay on hold unnecessarily. You might need to tweak your task management configuration to better align with your intended behavior.

  4. Manual Clearance: Depending on your use case, you could also implement a feature in your bot’s flow where users can manually clear tasks that are stuck in the “OnHold” state.

If none of these solutions work or if you’re looking for something more specific, feel free to share additional details, and we can dive deeper into the issue.

Hope this helps!

Thank you,
Srujan Madderla
Kore.ai Community Team