> For the complete documentation index, see [llms.txt](https://help.sdocs.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://help.sdocs.com/sdocs/administration/install-configure/remove-sdoc-events-older-than-30-days.md).

# Remove SDoc Events Older Than 30 Days

Feature available in 11.0 and further to remove old events consuming storage space within the salesforce org. Event Aggregation when enabled creates a scheduled job “S-Docs Event Aggregate Batch Job” which you can find in the scheduled jobs runs once every day (12:30 am) gathering and aggregating events older than 30 days into a new object “Event\_Aggregate\_\_c”. The new object deletes the aggregated events freeing up space.

One run of the job can delete 50 Million events in about 2000 batches.

You can also manually run the job using the new global method “ EventAggregateBatchUtil.start()”

![(blue star)](/files/b1941cc7e443f549bd276ff94294b270a7bbd36e)\
Instructions

How to enable Event Aggregation

{% stepper %}
{% step %}

### Step 1

Navigate to S-Docs Setup page and click on “Enable Event Aggregation”<br>
{% endstep %}

{% step %}

### Step 2

Verify if the scheduled job has been created in the Scheduled Jobs section<br>
{% endstep %}

{% step %}

### Step 3

This will automatically delete old SDoc Events freeing up storage space - Setup → Storage Usage<br>
{% endstep %}
{% endstepper %}

![(blue star)](/files/9c7616f489feec626718ec3ab0dfef48d70a0ef9)\
Related articles

<details>

<summary>Error details</summary>

Error rendering macro 'contentbylabel' : CQL was parsed but the search manager was unable to execute the search. Error message: com.atlassian.confluence.api.service.exceptions.scale.SSStatusCodeException: There was an illegal request passed to XP-Search Aggregator API : HTTP/1.1 403 Forbidden

</details>


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://help.sdocs.com/sdocs/administration/install-configure/remove-sdoc-events-older-than-30-days.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
