# Best Practices

## Recommended setup

<table data-card-size="large" data-view="cards"><thead><tr><th></th><th></th></tr></thead><tbody><tr><td><strong>Start with a focused date range</strong></td><td>Set your start date to cover only the period you actually need. Pulling years of charge history on your first sync increases load time and fills your destination with data you may never use. Start with the last 90 days, then extend if needed.</td></tr><tr><td><strong>Join Customers and Charges for a revenue view</strong></td><td>The Charges entity alone won't tell you who your best customers are. Use the Join transformation on <code>customer_id</code> to combine customer profiles with their transaction history in one flat table.</td></tr><tr><td><strong>Use separate data flows per entity</strong></td><td>Charges, Subscriptions, and Customers update at different frequencies and have different volumes. Keeping them in separate data flows makes it easier to debug sync issues and set appropriate refresh schedules independently.</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 Charges more frequently than Products</strong></td><td>Charges can come in continuously throughout the day, while Products and pricing rarely change. Schedule your Charges data flow to refresh hourly or several times a day, and Products once daily or less.</td></tr><tr><td><strong>Sync Subscriptions daily for churn monitoring</strong></td><td>Subscription statuses like <code>past_due</code> or <code>canceled</code> are time-sensitive. A daily refresh ensures your team is acting on current data when doing retention outreach.</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>Aggregate before sending to spreadsheets</strong></td><td>If you're pulling large volumes of charges into Google Sheets or Excel, use Coupler.io's Aggregate transformation to pre-summarize by day, gateway, or status. This keeps your sheet manageable and your formulas fast.</td></tr><tr><td><strong>Use BigQuery for long-term charge history</strong></td><td>Google Sheets has row limits that become a problem with high-volume charge data. Send historical Charges data to BigQuery and use Looker Studio on top for dashboards — this combination scales without issues.</td></tr></tbody></table>

## Common pitfalls

{% hint style="danger" %}
Do not use the same API key across multiple tools simultaneously without checking Chargedesk's rate limits. If Coupler.io and another integration are both hitting the API at the same time, you may get throttled or see incomplete syncs.
{% endhint %}

{% columns %}
{% column %}
**Do**

* Use the `gateway` field to filter or segment charges when you have multiple payment processors connected
* Join Subscriptions to Customers before sending to a dashboard so stakeholders have context
* Verify records appear in Chargedesk itself before troubleshooting missing data in Coupler.io
  {% endcolumn %}

{% column %}
**Don't**

* Set the start date to the beginning of time on a large account — it will slow your first sync significantly
* Rely on Chargedesk amounts for gateway-fee-adjusted revenue — those calculations need to happen downstream
* Assume subscription statuses are real-time; they depend on gateway webhooks reaching Chargedesk
  {% endcolumn %}
  {% endcolumns %}
