# Best Practices for Exporting Reports

This guide will help you optimize your `ReportExport` integration. Key topics include exporting reports efficiently, refreshing data when needed, and avoiding unnecessary API usage or [rate-limit](/agency-v3/readme/rate-limits.md) issues.

### Streamline your report export

1. Send a request to `/ReportExport` with your desired parameters.
2. Track the status of the job in the following way after submitting your export request:
   * Poll (i.e., check periodically) the `Jobs` API by using the URIs returned in the `/ReportExport` response to the call: `GET /Jobs/{Id}`.
3. Once the job reaches a `Completed` state, download the file by calling: `/Jobs/{Id}/Download`.

   All completed job results are cached indefinitely, meaning your data will remain available for download at any time in the future.

### Managing report data & replays

If you need refreshed or updated results for a previously completed job, use: `/Jobs/{Id}/Replay` endpoint. To maintain optimal performance and stay within your API rate limits, keep these best practices in mind:

* **When to replay**: Only trigger a replay if the original job `FAILED` or `CANCELLED`, or if you know the underlying data has been updated.
* **Timing is key**: Avoid replaying a job immediately after the initial request. For the most up-to-date information, request exports later in the day or the following day once datasets have fully synchronized.
* **Avoid redundancy**: Don't call `/ReportExport` again with the same parameters to refresh data; it won't change the results and will simply count against your quota.
* **Optimize range**: Use smaller date ranges whenever possible to improve download performance and reduce export size.
* **Limit frequency**: Avoid integrations that repeatedly trigger replays or re-run the same report multiple times per day.


---

# Agent Instructions: 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:

```
GET https://integrations.impact.com/agency-v3/reference/reportexport/best-practices-for-exporting-reports.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
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.
