> For the complete documentation index, see [llms.txt](https://docs.coupler.io/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.coupler.io/sources/category/other/castor-edc/best-practices.md).

# Best Practices

## Recommended setup

<table data-card-size="large" data-view="cards"><thead><tr><th></th><th></th></tr></thead><tbody><tr><td><strong>Always set your URL region</strong></td><td>Castor EDC runs three separate regional instances (UK, NL, US). If you pick the wrong region, your credentials won't work — even if they're correct. Double-check your region in Castor EDC account settings before connecting.</td></tr><tr><td><strong>Set a meaningful start date for audit trails</strong></td><td>Audit trail entities can contain thousands of rows in active studies. Use the date picker to set a start date that matches when you actually need data from — this keeps your first run fast and your destination clean.</td></tr><tr><td><strong>Use separate data flows for structural vs. activity data</strong></td><td>Entities like study fields, forms, and field validations change infrequently and describe your study design. Entities like study visits and audit trails change constantly. Keeping them in separate data flows lets you refresh each at the right cadence.</td></tr></tbody></table>

## Data refresh and scheduling

<table data-card-size="large" data-view="cards"><thead><tr><th></th><th></th></tr></thead><tbody><tr><td><strong>Refresh audit trails more frequently than structural data</strong></td><td>Audit trail records accumulate with every user action. If compliance reporting is a priority, schedule this entity to refresh daily or more often. Study forms and field definitions rarely change and can be refreshed weekly.</td></tr><tr><td><strong>Run a manual sync first to confirm data volume</strong></td><td>Before setting a schedule, run the data flow manually and check how many rows come back. For large studies with long histories, you may want to narrow the start date to keep export times reasonable.</td></tr></tbody></table>

## Performance optimization

<table data-card-size="large" data-view="cards"><thead><tr><th></th><th></th></tr></thead><tbody><tr><td><strong>Join study users with study roles</strong></td><td>Exporting these two entities separately and then joining them in Coupler.io gives you a complete access matrix — who is in each study and what they're permitted to do — without needing to cross-reference in a spreadsheet manually.</td></tr><tr><td><strong>Aggregate study statistics across multiple studies</strong></td><td>If your organization runs multiple concurrent studies, use Coupler.io's Aggregate transformation to combine study statistics into a single summary table for leadership reporting.</td></tr><tr><td><strong>Send study progress data to AI destinations for narrative summaries</strong></td><td>Pipe study statistics and visit data to Claude, ChatGPT, or Gemini to generate plain-language progress summaries — useful for non-technical stakeholders who don't read raw data tables.</td></tr></tbody></table>

## Common pitfalls

{% hint style="danger" %}
Do not leave the start date blank on your first run if you're exporting audit trails from a study that has been running for more than a few months. Pulling the entire audit history at once can time out or generate an overwhelming number of rows.
{% endhint %}

{% columns %}
{% column %}

### Do

* Match your URL region exactly to your Castor EDC account registration
* Set a start date for high-volume entities like audit trails
* Use Join to link study fields with their validations and dependencies
* Verify your user role has read access to all studies before running
  {% endcolumn %}

{% column %}

### Don't

* Export study field dependencies or validations if your studies don't use conditional logic — they'll always be empty
* Run multiple Castor EDC data flows at the same time — stagger them to avoid hitting API rate limits
* Assume study statistics in your export match the live dashboard — they reflect the snapshot at time of sync
  {% endcolumn %}
  {% endcolumns %}


---

# 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://docs.coupler.io/sources/category/other/castor-edc/best-practices.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.
