# Subscription invoice workflow

Subscription invoice workflow path with readiness checks before issue.

When your workspace uses a published **Accounts Receivable** workflow with a **Subscription invoice** node, scheduled subscription billing enters the graph at that step instead of auto-advancing on its own. Readiness checks (contacts, legal profile, line items) decide whether Cortena **issues** the invoice or sends it to **draft review**.

**Who this is for:** AR admins who manage subscriptions and billing schedules, and finance ops who want one workflow to gate issue vs review for every subscription run.

Related: [Accounts receivable](https://help.cortena.ai/guides/advanced/accounts-receivable), [Workflow configuration](https://help.cortena.ai/guides/workflows/workflow-configuration), and [Tenant legal profile](https://help.cortena.ai/guides/get-started/tenant-legal-profile).

## 1. Configure the Subscription invoice node

1. Open **Settings → Workflow Configuration** for entity **Receivable invoice**.
2. Publish a workflow that includes exactly one **Subscription invoice** node (secondary entry for subscription billing).
3. On the node, set **Local time** (for example `09:00`) and **Timezone** (IANA, for example `Europe/Berlin`).
4. Connect one unconditional outgoing edge from **Subscription invoice** to the next step (typically a conditional **Readiness** branch).

The daily job runs subscription billing only **after** that local time (converted to UTC). Receivables created from subscriptions **start at Subscription invoice**, not at **Input**.

## 2. Readiness → issue or draft review

After **Subscription invoice**, use workflow criteria to mirror what you need before sending:

| Check | Typical criterion |
| --- | --- |
| Customer contacts | Billing email present |
| Legal / issuer profile | VAT ID, address, bank details complete |
| Lines | Products, quantities, GL where required |

- **Ready** branch → **Mark as issued** (or your issue step).
- **Not ready** branch → **Draft review** or an approval step.

This replaces legacy per-subscription auto-advance flags when the published YAML contains **Subscription invoice**.

## 3. Subscriptions sheet and Bill now

1. **Receivables → Subscriptions** (master spreadsheet sync) shows each subscription and **Next bill date**.
2. **Bill now** still creates a receivable immediately; it follows the same published workflow from **Subscription invoice** when the graph includes that node.
3. Track progress on the receivable list and invoice detail workflow strip like any other AR invoice.

## 4. What happens on schedule

On each billing day, after the configured local time:

1. Cortena evaluates due subscriptions for the tenant.
2. For each due subscription, it creates or advances a receivable into the workflow at **Subscription invoice**.
3. The graph runs readiness, issue, email, export, and payment steps you configured downstream.

Plain language: the **workflow** is the source of truth for issue vs review, not hidden per-row flags on the subscription sheet.

## Tips and limitations

- At most **one** **Subscription invoice** node per published receivable workflow.
- Requires a **published** receivable workflow; draft-only graphs do not drive scheduled billing.
- **Bill now** and scheduled runs share the same graph when **Subscription invoice** is present.

## Quick reference

| Task | Where |
| --- | --- |
| Set billing time | Workflow → **Subscription invoice** → Local time + Timezone |
| Gate issue vs review | Conditional after **Subscription invoice** |
| Manual bill | **Receivables → Subscriptions** → **Bill now** |
| Edit graph | **Settings → Workflow Configuration** → Receivable invoice |
