Configure retention period and cleanup of pending AI action suggestions

  • Release version: Australia
  • Updated June 2, 2026
  • 1 minute to read
  • Configure how long the pending AI-generated action suggestions are retained before they are automatically deleted.

    Before you begin

    Verify the following conditions:

    Role required: sn_ohs_im.admin

    About this task

    When the Action Planner generates AI suggestions, they are stored in the AI action suggestion [sn_ohs_im_ai_action_suggestion] staging table. Users accept the suggestions to create actions or dismiss them. Suggestions that are never acted on (that is, not accepted for action creation or dismissed) accumulate over time and remain in the Pending state. A scheduled cleanup job deletes these pending suggestions after the configured number of days, helping to keep the staging table manageable.

    For information on using Action planner for AI suggested actions, see Generate and manage AI‑suggested safety actions in Action planner.

    Procedure

    1. Navigate to All > Health and Safety > Health and Safety administration > Properties.
    2. To enable or disable cleanup, set the Enables or disables the scheduled job that cleans up stale pending AI action suggestions [sn_ohs_im.ai_suggestion.cleanup_enabled] property.
      • Yes: The scheduled cleanup job runs daily and deletes pending suggestions that have exceeded the retention period. This is set by default.
      • No: The scheduled cleanup job does not run. Pending suggestions are retained indefinitely.
    3. To configure the retention period, enter a value in the Number of days to retain pending AI action suggestions before the scheduled cleanup job permanently deletes them as stale [sn_ohs_im.ai_suggestion.retention_days] property.
      By default, this value is set to 90.
    4. Verify the scheduled cleanup job.
      1. Navigate to All > Scheduled Jobs.
      2. Open the Cleanup stale AI action suggestions scheduled job and review the settings.
        Note:
        To run the scheduled job on demand, select Execute Now.

    Result

    • The scheduled job runs daily at the specified time. On each run, it queries the AI action suggestion [sn_ohs_im_ai_action_suggestion] staging table for suggestions with status = Pending that are older than the configured retention period and deletes them.
    • Suggestions with status = Accepted or status = Rejected aren't deleted by the scheduled job, regardless of age.