> For the complete documentation index, see [llms.txt](https://developer.paddle.com/llms.txt).

# Configure Term Optimization

Increase lifetime value and reduce churn by intelligently identifying customers on a monthly plan who are likely to upgrade to longer term. Retain automatically reaches out by email, in-app, and during payment recovery.

---

[Term Optimization](https://developer.paddle.com/concepts/retain/term-optimization.md), part of [Paddle Retain](https://developer.paddle.com/concepts/retain/overview.md), analyzes customer engagement and other subscription data to determine which customers are likely to upgrade to a plan with a longer term length, like a quarterly or annual plan.

It automatically reaches out at the right time with the right messaging — in-app, via email, or during payment recovery — prompting customers to upgrade using a secure payment form.

## How it works

[Paddle Retain](https://developer.paddle.com/concepts/retain/overview.md) combines world-class subscription expertise with algorithms that use billions of data points to automatically reduce churn. Paddle Billing is fully integrated with Retain, meaning it automatically handles dunning and retention for you.

[Term Optimization](https://developer.paddle.com/concepts/retain/term-optimization.md), part of Paddle Retain, works to automatically upgrade customers to annual plans — no effort required on your part. You can choose how Retain identifies customers to upgrade, as well as how you'd like Retain to contact eligible customers.

If you use Paddle Billing, Term Optimization automatically upgrades the related subscription in Paddle Billing for you. There's no need to build logic to handle this.

To learn more about Term Optimization, see [Term Optimization](https://developer.paddle.com/concepts/retain/term-optimization.md)

## Before you begin

{% callout type="info" %}
Paddle Retain works with live data for your billing platform. This means you can't integrate or test with sandbox accounts.
{% /callout %}

- **Set up Paddle Retain**  
  If you haven't already, connect Paddle Retain to your billing platform and [set up Paddle Retain](https://developer.paddle.com/build/retain/set-up-retain-profitwell.md).
- **Make sure you've installed Paddle.js**  
  Paddle.js must be installed and verified as installed on a public page on your site. [Follow the instructions during setup](https://developer.paddle.com/build/retain/set-up-retain-profitwell#initial-setup-install.md), click **Edit** under **Paddle.js is not installed**, or click **Install** under **Paddle.js is not installed in web app**.

## Set up Term Optimization

{% tabs sync="retain-platform" %}
{% tab-item title="Paddle Billing" %}

1. Grab a copy of the [Paddle Retain Term Optimization configuration](https://docs.google.com/spreadsheets/d/1U_JctATw1EwW67hzVFVs_OCmqNWUJlAOXDbd8Sll6mk/edit?usp=sharing) template.
2. Fill out the spreadsheet by adding the price IDs for your monthly plans in the first column, then the corresponding annual plan price IDs in the second column. You can get price IDs by going to **Paddle > Products**, clicking into a product, then choosing Copy ID from the menu next to a price in the list, or by using [the list prices operation](https://developer.paddle.com/api-reference/prices/list-prices.md).
3. Choose which [Term Optimization strategy](https://developer.paddle.com/concepts/retain/term-optimization#background-targeting.md) you want to use. You can target for (1) less churn, (2) increased revenue, or (3) both.
4. Choose which [outreach methods](https://developer.paddle.com/concepts/retain/term-optimization#journey.md) you want to use. You can send emails, send in-app notifications, and prompt customers to upgrade when updating their payment method as part of payment recovery.
5. Send the completed spreadsheet to us at [sellers@paddle.com](mailto:sellers@paddle.com?subject=RETAIN%20Term%20Optimization). In your email, let us know which Term Optimization strategy and outreach methods you want to use. We'll take care of the rest.

{% /tab-item %}
{% tab-item title="Stripe Billing" %}

1. Grab a copy of the [Paddle Retain Term Optimization configuration](https://docs.google.com/spreadsheets/d/1U_JctATw1EwW67hzVFVs_OCmqNWUJlAOXDbd8Sll6mk/edit?usp=sharing) template.
2. Fill out the spreadsheet by adding the API IDs for your monthly plans in the first column, then the corresponding annual plan API IDs in the second column. You can get API IDs by going to **Stripe > Products**, clicking into a product, then copying the API ID for a price under the pricing section.
3. Choose which [Term Optimization strategy](https://developer.paddle.com/concepts/retain/term-optimization#background-targeting.md) you want to use. You can target for (1) less churn, (2) increased revenue, or (3) both.
4. Choose which [outreach methods](https://developer.paddle.com/concepts/retain/term-optimization#journey.md) you want to use. You can send emails, send in-app notifications, and prompt customers to upgrade when updating their payment method as part of payment recovery.
5. Send the completed spreadsheet to us at [sellers@paddle.com](mailto:sellers@paddle.com?subject=RETAIN%20Term%20Optimization). In your email, let us know which Term Optimization strategy and outreach methods you want to use. We'll take care of the rest.

{% /tab-item %}
{% /tabs %}

{% callout type="info" %}
When mapping monthly plans to annual plans, the annual plan must be less than the monthly plan multiplied by 12. Quarterly plans can't be upgraded to annual plans.
{% /callout %}

## Simulate Term Optimization notification

Once you've set up Term Optimization, you can simulate a notification to check how it looks to customers.

{% tabs sync="retain-platform" %}
{% tab-item title="Paddle Billing" %}

1. Go to a page where you've [installed Paddle.js for Retain](https://developer.paddle.com/paddlejs/include-paddlejs#manual-initialize-paddlejs-retain.md).
2. Open your [browser console](https://developer.chrome.com/docs/devtools/console/).
3. Enter `Paddle.Retain.demo({feature: 'termOptimizationInApp'})`.

{% /tab-item %}
{% tab-item title="Stripe Billing" %}

1. Go to a page where you've [installed the ProfitWell.js snippets](https://developer.paddle.com/build/retain/set-up-retain-profitwell#connect-billing".md).
2. Open your [browser console](https://developer.chrome.com/docs/devtools/console/).
3. Enter `profitwell('cq_demo', 'plan_upgrade', 'notification')`.

{% /tab-item %}
{% /tabs %}