# Best Practices

## Recommended setup

<table data-card-size="large" data-view="cards"><thead><tr><th></th><th></th></tr></thead><tbody><tr><td><strong>One entity per data flow</strong></td><td>Chargify entities have very different structures. Keep Customers, Subscriptions, Invoices, Coupons, and Transactions in separate data flows — then use the Join transformation to combine them in Coupler.io when you need cross-entity analysis.</td></tr><tr><td><strong>Use a read-only API key</strong></td><td>Generate a dedicated read-only API key in Chargify for Coupler.io. This limits exposure if the key is ever compromised and clearly separates your integration credentials from admin access.</td></tr><tr><td><strong>Convert cents in your destination</strong></td><td>All monetary fields come through in cents. Set up a calculated column or formula in Google Sheets, Excel, or BigQuery to divide by 100 at the destination level — don't wait until reporting time to fix this.</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>Daily refresh for Transactions and Invoices</strong></td><td>Transactions and invoice statuses change frequently. Schedule these entities to refresh daily or every few hours if you're doing active financial reconciliation.</td></tr><tr><td><strong>Weekly refresh for Customers and Coupons</strong></td><td>Customer records and coupon definitions change less often. A weekly schedule is usually sufficient and reduces unnecessary API calls against your rate limit.</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>Use Aggregate for MRR reporting</strong></td><td>Instead of exporting all subscription rows to a spreadsheet and summing manually, use Coupler.io's Aggregate transformation to group by product plan and sum revenue before it hits your destination.</td></tr><tr><td><strong>Multiple Chargify sites</strong></td><td>If your business runs multiple Chargify sites (e.g., different regions or brands), create a separate connection for each subdomain and use the Append transformation to merge them into a single consolidated report.</td></tr></tbody></table>

## Common pitfalls

{% hint style="danger" %}
Don't use your Chargify admin password or master API key in shared team environments. Always generate a dedicated, scoped API key for third-party integrations.
{% endhint %}

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

* Divide all `_in_cents` fields by 100 before reporting
* Filter Subscriptions by `state` to isolate active vs. churned cohorts
* Use the `reference` field to join Chargify customers with records from your CRM or other tools
* Test with a manual run before enabling scheduled syncs
  {% endcolumn %}

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

* Mix transaction types without filtering — refunds and credits will skew revenue totals
* Assume an empty Coupons export means an error — it may simply mean no coupons exist
* Use the same API key across multiple environments (staging vs. production) — Chargify sites are isolated
  {% endcolumn %}
  {% endcolumns %}
