# Concepts

#### Organization

An organization is the container for everything in Lainwise: your product catalog, your orders, your users, and your settings. It represents your company. When you sign up, you create one organization and invite your colleagues to it.

Each organization gets a dedicated Lainwise inbox address, for example `vanderberg@lainwise.com`. Any purchase order sent to that address is automatically picked up and processed.

#### Users & roles

An organization has one or more users. There are two roles:

* **Admin**: Can manage the product catalog, configure validation rules, invite users, and adjust settings.
* **Member**: Can review, approve, and export orders. Cannot change organization settings.

You can invite as many team members as you need from the Members page in Settings.

#### Product catalog

The product catalog is the list of products your organization sells. Lainwise uses it to match incoming orders against your actual assortment.

Each product has a name, SKU, unit, and price. You can also add **aliases** (alternative names) your customers might use for the same product. For example, if customers sometimes write "brown bread" instead of "Bruin brood", adding that as an alias ensures it always matches correctly.

You can upload your catalog as a CSV file or manage products individually in the app. Lainwise supports catalogs with up to 12,000+ products.

#### Orders

An order in Lainwise represents a single incoming purchase order. From the moment it arrives in your inbox to the moment it's exported to your ERP.

Each order goes through the following stages:

| Status             | What it means                                     |
| ------------------ | ------------------------------------------------- |
| **Pending review** | The order has been parsed and needs a human check |
| **Approved**       | A team member has confirmed the order is correct  |
| **Rejected**       | The order was declined or cancelled               |
| **Exported**       | The order has been manually exported              |

#### Line items

A line item is a single product row within an order. For example, "50x Brown Bread @ €8.99". Each line item is matched against your product catalog and assigned a confidence score.

Lainwise uses a prioritized matching strategy:

1. **Exact SKU match** - highest confidence
2. **Alias match** - very high confidence
3. **Exact name match** - high confidence
4. **Fuzzy name match** - medium confidence, flagged for review

Line items with lower confidence are automatically flagged with an AI comment so your team knows where to pay attention.

#### Validation rules

Validation rules let you define automatic checks that run on every incoming order. For example:

* Flag orders where a product price deviates more than 15% from your catalog price
* Block orders that exceed a maximum quantity per product
* Warn when a blacklisted keyword appears in the order

Rules can apply to all products or to specific products. When a rule triggers, the order is flagged and the team member sees an explanation during review.

***

### Processing an order

When a purchase order arrives at your Lainwise inbox, this is what happens automatically:

1. **Parse** - Lainwise reads the attachment (PDF, CSV, image, or email body) and extracts all line items.
2. **Match** - Each line item is matched against your product catalog.
3. **Validate** - Your validation rules are applied.
4. **Review** - A team member sees the original document side-by-side with the processed data and approves or rejects.
5. **Export** - The approved order is exported as CSV, Excel, or JSON for import into your ERP.

***

### Integrations

Lainwise connects to your ERP through file-based exports. You download the export in your preferred format and import it directly into your ERP system.

Supported formats: **CSV**, **Excel (.xlsx)**, **JSON**

Direct API integrations with ERP systems are on the roadmap.


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.lainwise.com/getting-started/publish-your-docs.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
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.
