Skip Navigation
Expand
Configuring incident purging on an established site
Answer ID 5461   |   Last Review Date 04/29/2019

How do I set purge incidents when my site is several years old?

Environment:

The resolution below applies to Oracle B2C Service (OSvC), versions 18A and below, regarding purging incidents.

NOTE: The process described in this answer is not applicable to versions 18B and above. Starting from 18B release, the configuration functionality was migrated to Data Lifecycle Management framework. See Using Data Lifecycle Policy to purge (or archive) for more information.

Resolution:

Beginning with the 18B release, the incident purge functionality has been moved to the Data Lifecycle Policy in the Browser Agent where customers can view, enable and configure data lifecycle settings.  Refer to the user documentation here.

When enabling incident purging on an established site it is necessary to gradually purge incidents at a rate of approximately 25,000 per day.  Therefore it is necessary to estimate how many incidents will be purged and change the configuration daily as incidents are purged by the agedatabase utility.  Use the report described in this answer to estimate how many incidents will be purged with a specific setting. 

Prior to the 18B release, PURGE_DELETE_INCIDENTS represents the number of days after an incident is solved that it is permanently deleted from the database.  This configuration is set to 0 by default which is disabled, meaning incidents will never be deleted from the database.  This setting can be edited at Configuration > Site Configuration > Configuration Settings > search by Key. The PURGE_DELETE_INCIDENTS configuration is set per interface so a calculation for each interface is required.

Note: The purge function permanently deletes incident data.  Once an incident is deleted, it cannot be retrieved.

For help creating a basic report please refer to Answer ID 2509: Creating a basic custom report.

1. Create a standard report with the following columns:

Heading: Date Closed
Expression: date_format(incidents.closed,'YYYY-MM-DD')

Heading: Purge Days
Expression: time_format(date_diff(to_date(date_format(sysdate(),'MM-DD-YYYY'),'MM-DD-YYYY'),incidents.closed),'DD')

If you have incidents that are assigned to multiple interfaces you should also add the following column.
Heading: Interface
Expression: incidents.interface_id

Heading: Count
Expression: count(*)

2. Sort the Date Closed column descending.

3. Create the following filter(s):

Name: Closed
Expression: incidents.closed
Operator: between
Value: -60 months relative to -36 months relative (These are example values for purging incidents over 3 years old on a 5 year old site.)

If you have incidents that are assigned to multiple interfaces you should also add the following filter.

Name: Interfaces
Expression: incidents.interface_id
Operator: in list

4. Click the Home tab, then Options, More options and change the Data Source to "Report Database" (also referred to as replication server).

5. Preview the report while adjusting the Closed filter to show the oldest incidents and save the report.  Note that there may be multiple rows returned for one closed date.  This is due to the way time is calculated during daylight savings time depending on the TZ_INTERFACE setting. For information on this setting, refer to Answer ID 605: Setting the time zone in Oracle B2C Service.

6. Use the report to select a value that will purge approximately 25,000 incidents. Set configuration according to site release and wait for the purging to happen. 

7. Repeat this process daily until the configuration is set to purge the desired incident age.

If you wish to track how many incidents that you have purged you must save the values of this report into a spreadsheet.  There is no built in functionality that tracks purged incidents.

Cause:

The purge configuration setting allows solved incidents to be permanently deleted from the database.  Set the value according to your organization's data retention policy and to help reduce the size of your database.

Although this report uses the incidents.closed field it is a good enough estimate for purging.  Incidents may appear on the report that are older than the purge days setting.  These incidents are either not set to a closed incident status or the closed age is less than the purge days setting.

Available Languages for this Answer:

Notify Me
The page will refresh upon submission. Any pending input will be lost.