> ## Documentation Index
> Fetch the complete documentation index at: https://docs.togai.com/llms.txt
> Use this file to discover all available pages before exploring further.

# How Togai works?

<Frame caption="Togai data flow">
  <img src="https://mintcdn.com/zuora-togai/_5p0FRZH5Znu1F04/docs/images/Togai-data-flow.png?fit=max&auto=format&n=_5p0FRZH5Znu1F04&q=85&s=baaecbc28f0e4822c22372f308a3bf54" width="2002" height="940" data-path="docs/images/Togai-data-flow.png" />
</Frame>

Togai was built keeping in mind pricing configurability and model flexibility at its core. This means the architecture has been built ground up keeping in mind the requirements of different monetization models across pricing strategy (usage based, seat based, hybrid), GTM motions (self-serve, sales led) and payment terms (pre-paid, credits, post-paid, commitments).

There are 4 building blocks in Togai to be configured that can be used to replace your entire billing stack.

<Frame caption="Configurable entities in Togai">
  <img src="https://mintcdn.com/zuora-togai/NTusvtQkLYBvjV74/docs/images/togai-entities.png?fit=max&auto=format&n=NTusvtQkLYBvjV74&q=85&s=68bcd6a3a1508ce5d3f32d663f1d14c1" width="2030" height="1182" data-path="docs/images/togai-entities.png" />
</Frame>

## Quickstart guide

You can follow this 5 steps to easily get started using Togai to meter and bill your customers.

<Steps>
  <Step title="Create an event schema">
    Defining your event payload that needs to be metered is the 1st step to tracking raw usage. [Learn more](/docs/event-schemas)
  </Step>

  <Step title="Define your metering aggregation">
    The next step is to aggregate the raw event data into aggregated usage metrics. [Learn more](/docs/usage-meter)
  </Step>

  <Step title="Configure your price plan">
    To rate your metered usage, you should model the pricing for your products in a price plan. [Learn more](/docs/price-plan-overview)
  </Step>

  <Step title="Onboard your customers">
    Add your customers to Togai and associate a price plan to them based on your contract terms. [Learn more](/docs/customers)
  </Step>

  <Step title="Automate your invoicing">
    Once you define your invoice format, your customers will receive their invoices automatically at the end of every billing cycle. [Learn more](/docs/invoices-overview)
  </Step>
</Steps>

## Work backwards from your invoice

<Frame caption="Working backwards from your customer invoice">
  <img src="https://mintcdn.com/zuora-togai/NTusvtQkLYBvjV74/docs/images/sample-invoice.png?fit=max&auto=format&n=NTusvtQkLYBvjV74&q=85&s=cd6a2d1454a11678e51e1414ea348147" width="1241" height="1756" data-path="docs/images/sample-invoice.png" />
</Frame>

Your invoice consists of static and dynamic fields.

* **Static fields** - Your company details, your customer's details, your line items in the invoice and tax rate
* **Dynamic fields** - Invoice number, Date of the invoice, invoice period, quantity of the line items and price per unit of the line item

The below table consists of the list of fields in your invoice mapped to the corresponding entity and configuration in Togai.

| Invoice field    | Type of field | Togai entity                                |
| ---------------- | ------------- | ------------------------------------------- |
| Company details  | Static        | Billing information                         |
| Customer details | Static        | Customer -> account                         |
| Line items       | Static        | Billable items                              |
| Tax rate         | Static        | Custom charges                              |
| Invoice number   | Dynamic       | Invoice sequence                            |
| Date of invoice  | Dynamic       | Price plan (Cycle start date, grace period) |
| Invoice period   | Dynamic       | Price plan billing cycle                    |
| Usage quantity   | Dynamic       | Usage meter / license quantity              |
| Price per unit   | Dynamic       | Price plan (Rate cards)                     |

It is ideal to think of your customer experience (pricing and invoicing) and work backwards from there to configure the relevant entities within Togai. The event schema is defined based on how your product is instrumented. Once all the configurations are done, you can start posting the event data to Togai. The invoices are generated accurately and automatically without manual intervention.
