The Purge/Archive Process 1. Define data mapping 2. Schedule the purge/archive process Interactions/Calls (file: incidents) Open the datamap file. Search on filename ‘incidents’. Type ‘0’ is the base, the one that defines it for all the type ‘1’ datamaps for incidents. If you don’t have it, add the following: Desc: map the incident records Filename: incidents Type: 0 Field Name: incident.id Array? false Arrayed Structure? false Map Query: "incident.id=\""+str($umapdata)+"\"" Query File: Override Qry: Map Cond: true Add to Map List: true If you don’t have this record, press Add. When the datamap (during the purge/archive process) is run, it will create a $umapdata file that is used in the map definition. This is what controls removing just the interactions desired, not all. Now we want to define the screlate records for the interactions If you don’t have it, add the following: Desc: map the screlate records associated with current incident Filename: incidents Type: 1 Field Name: incident.id Array? false Arrayed Structure? false Map Query: Query File: screlation Override Qry: "(source=\""+str($umapdata)+"\" and source.filename=\"incidents\") or (depend=\""+str($umapdata)+"\" and depend.filename=\"incidents\")" Map Cond: true Add to Map List: true If you don’t have this record, press Add. Let’s add one more associated record. After this, you need to check your system for all the appropriate records related to interactions and add records for them. If you don’t have it, add the following: Desc: map from incidents to the activity recordsFilename: incidents Type: 1 Field Name: incident.id Array? false Arrayed Structure? false Map Query: Query File: activityservicemgmt Override Qry: "number=\""+str($umapdata)+"\"" Map Cond: true Add to Map List: true If you don’t have this record, press Add. To run the Purge/Archive utility from the System Navigator in my system: Menu Navigation + Utilities ++ Maintenance +++ System ++++ Purge/Archive Run the Purge/Archive utility. Enter the format name that will get your interactions. I always use sql.incidents. Change ‘Use Data Map?’ and ‘Prompt Data Map?’ to yes and press OK. For me, I go down to ‘closed.time’ and enter a less than date. Then press ‘Query’ on the menu bar. The Search Window appears; press ‘Execute Search’ button (the one with the flashlight)… A list of interactions that currently evaluate to true are displayed. At this point, you can Purge, Archive, do both – these are done in the foreground. I always choose Schedule. Choose a time to run in the future. Choose your repeat interval. To archive, specify your options – remember, since this is running as a scheduled background process, it will be saving the file to your server; use the appropriate syntax. If you are using the archive, choose your dbdict load options. Once you have everything filled out, press the appropriate button: Purge Archive Purge/Arch A way to test your process is working is to use the Archive; that way you can check that the records are written as desired; once it’s working right, you can go through this process again and specify Purge or Purge/Arch. Here’s what the schedule record looks like: Name: background purge/archive Class: report On the Strings tab, in the Strings section on the left, it will list all the options you chose. I usually change the name of the record. In this case from ‘background purge/archive’ to ‘background purge/archive - Interactions’. I also add some information to the description to explain. I hope this will help you get started. Remember to start small (few records) to see what your system handle comfortably and then you can get your schedule going. Good luck.
© Copyright 2026 Paperzz