# Design a Ledger Schema

Source: https://docs.formance.com/studio/design-a-schema

Stack: v3.2

Studio builds a ledger model in one of two ways: you adapt a template that is close to your business, or you describe the business and Studio designs the model from scratch. Either way, you get a Ledger schema you can open in the editor.

## Start from a template

The template gallery holds ready-made models for common businesses, such as payment acceptance, omnibus accounts, buy now pay later and stablecoin issuance. Most of them are also documented, flow by flow, in the [Cookbook](https://docs.formance.com/examples/advanced).

1. Open **Templates** and pick the one closest to your product.
2. Review it in the editor as it is, or ask the assistant to adapt it.
3. To adapt it, give an instruction, your company website, or both. With a website, Studio reads the site to learn how your company moves money, then adds, renames and restructures accounts and flows to match. Where the site says nothing, the template's default stays.

## Design from scratch

Use **Describe your business** when no template is close enough.

1. **Describe the business.** In **Business description**, explain in plain English how money moves: who holds funds, how money comes in and goes out, and what the business earns.
2. **Attach documents (optional).** Add product specs, flow diagrams or fee schedules. Studio reads them directly. You can attach up to 10 files, 2 MB in total, as PDF, images (PNG, JPG, GIF, WebP), or text formats such as Markdown, CSV, JSON, YAML, XML and HTML. Export Word or Excel files to PDF first.
3. **Answer the guide questions (optional).** Open **Guide my description** for six prompts that cover the flows a model usually needs: who is involved and who holds the money, how money arrives, how it leaves, which fees or revenue you keep, what happens on refunds or failed payments, and which currencies and timing rules matter. Answer what you know and leave the rest blank.
4. **Choose a mode.** **Deep** uses the highest-quality model and suits real designs. **Fast** uses a lighter model and suits quick iterations.
5. **Decide on clarifying questions.** Under **Advanced**, turn on **Ask clarifying questions** to have the run pause and ask you about gaps before it designs. It is off by default, so the run proceeds on its best assumptions.
6. **Name the schema** and start the run.

A design run can take a while, especially in Deep mode. You can leave the page and follow it from **AI generations**.

List every flow

The most useful input is a complete list of money movements, including the unhappy paths: refunds, chargebacks, failed payouts and reversals. If you already document your flows, attach that document.

## What you get

Each run produces a Ledger schema with three parts:

| Part                  | What it holds                                                                       |
| --------------------- | ----------------------------------------------------------------------------------- |
| Chart of accounts     | The account address patterns your ledger uses, grouped by role, with their metadata |
| Transaction templates | One Numscript template per money movement, such as a deposit, a fee or a refund     |
| Queries               | Saved queries for the balances and reports the business needs                       |

See [Ledger schema](https://docs.formance.com/v3.2/modules/ledger/working-with/ledger-schema) for the format itself.

## Next step

Open the result in the editor to review and refine it: [Refine a ledger schema](https://docs.formance.com/studio/refine-a-schema).
