Configure retention period and cleanup of pending AI action suggestions
Configure how long the pending AI-generated action suggestions are retained before they are automatically deleted.
Before you begin
Verify the following conditions:
- The Now Assist for Health and Safety application (sn_hs_gen_ai) is installed. For more information, see Install Now Assist for Health and Safety.
- The application scope is selected as Health and Safety Core. For more information, see Application picker.
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
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 = Pendingthat are older than the configured retention period and deletes them. - Suggestions with
status = Acceptedorstatus = Rejectedaren't deleted by the scheduled job, regardless of age.