Archive Rule
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-13-2024 09:09 AM
Hi All,
I have a requirement to archive the user records with the below conditions. I am not able to create the archive rule neither on the task table nor on the catalog task table.
1 - User Type = Agent or Customer AND does not have an incident/request associated.
2 - User Type = Agent or Customer AND has a closed incident/request but is greater than 2 years old.
Thanks,
Rooma
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-13-2024 11:08 AM
Hello Roomawaker,
Please try writing server side script on task or sc_task table. Also ensure there would be a performance impact due to running script on large table(s) such as Task.
- Fetch the records from Task table based on assigned_to with required agent role and conditions you mentioned in your query.
Please mark helpful and correct, if it helps you in giving some pointers to kick start.
BR,
Suman.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-14-2024 02:35 AM
Hi Suman,
Do we need to write BR because there is no 'script' field in the archive form?
Thanks,
Rooma

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-14-2024 02:39 AM
In Archive rules, you just have option to set field conditions only but not script based conditions.
You can try below approach:
1) Run a background script to get userid list of all users satisfying your above conditions.
2) Now in the Archive rule for sys_user table add the condition as userid 'is one of' the list you got in BG script.
Regards,
Sumanth
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-14-2024 03:11 AM
Hi Sumanth,
If we use Background script , it would be of one time. We have to use the rule on a timely basis to archive unwanted users.
Is there any other way, we can achieve this?
Thanks,
Rooma