Skip Navigation
Expand
Configuring incident archiving
Answer ID 6421   |   Last Review Date 06/22/2019

How can I calculate how many incidents are waiting to be archived and how to configure incident archiving?

Environment:

Archiving incidents. Analytics
Oracle B2C Service

Resolution:

Here is how to estimate the number of incidents in your database that are ready to be archived.

Use the report described in this answer to estimate how long it will take to archive incidents up to a specific age. The speed at which archiving occurs depends on how much data is associated with incidents. By default the utility is configured to perform batches of 100,000 per run. The configuration to archive incidents prior to 18B release is set per interface, so a calculation for each interface is required. Post 18B release, the configuration is site specific and can be configured and enabled in Data Lifecycle Policies in the Browser Agent.

Please refer to Archiving incidents on test or upgrade sites for information on how to test incident archiving.

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

To create a report that estimates closed incidents that are ready to archive:

1. Create a standard report with the following columns:

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

Heading: Archive 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 Created column descending.

3. Create the following filter(s):

Name: Closed
Expression: incidents.closed
Operator: between
Value: -60 months relative to -12 months relative (these are example values for archiving incidents closed between 1 and 5 years)

Alternately
Name: Closed date
Uncheck Make this filter selectable at runtime
Expression: incidents.closed
Operator: is not null

Name: Status closed
Expression: incidents.status
Operator: in list
Value(s): closed

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 known as the replication server).

5. Preview the report while adjusting the Created filter to show the oldest incidents and save the report.  Note that there may be multiple rows returned for one created 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. For releases prior to 18B, edit the ARCHIVE_INCIDENTS configuration setting by going to Configuration > Site Configuration > Settings >Agedatabase Utility > Batch Processing > Incident Archiving and wait for the agedatabase utility to run over night.

Beginning with the 18B release, incident archiving can be configured and enabled in Data Lifecycle Policies in the Browser Agent. 

Note, when testing the incident archiving feature on a test site, edit the value and submit a service request to Technical Support and request to manually run the archiving utility.  On a test site, we will run this utility once for your testing purposes.

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

Cause:

The incident archiving functionality allows closed 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.