> For the complete documentation index, see [llms.txt](https://learn.withessential.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://learn.withessential.com/revenue/subscriptions/generate-a-subscription-draft-with-ai.md).

# Generate a subscription draft with AI

Subscriptions can use AI to draft recurring invoice line items, the same way invoice drafting does. The prompt templates offered here come from invoice prompt templates whose Use for setting is Subscriptions only or Invoices & Subscriptions.

On a new subscription, select the customer, property, start date, billing cadence, and any other required subscription settings first. When you generate, Essential saves a draft subscription, opens that subscription page, and streams the generated line items there. The generated subscription remains a Draft until you review and activate it.

AI generation is only offered while you're creating a new subscription, before its first save. Once a subscription has been saved, there is no Generate option to return to — even while it's still Draft — so review and edit the recurring line items directly on the subscription page instead.

After generation, review the recurring invoice template, taxes, discounts, attachments, recipients, and billing settings before activating the subscription. Activation is still a separate step.

> **Where to find it:** Invoices -> Subscriptions -> New Subscription, then use Generate in the invoice-template section before the first save

## Related guides

* [Create a subscription for recurring invoices](/revenue/subscriptions/create-a-subscription-for-recurring-invoices.md)
* [What the subscription page shows](/revenue/subscriptions/what-the-subscription-page-shows.md)
* [Set up invoice prompt templates for AI drafting](/administration/settings/set-up-invoice-prompt-templates-for-ai-drafting.md)
* [Auto-charge vs manual billing on a subscription](/revenue/subscriptions/auto-charge-vs-manual-billing-on-a-subscription.md)


---

# 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 by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://learn.withessential.com/revenue/subscriptions/generate-a-subscription-draft-with-ai.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

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.
