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

# Business rules

> Tune how invoices are read and matched for your company — what happens to duplicates and re-issues, how strictly each sector and supplier is matched, what your booking data tells us, and your own fields.

Our recommended settings suit most teams and need no setup. When yours differ, **Business
rules** (in the sidebar, under Configure) is where you change them, on four tabs:

| Tab | What it sets | Applies to |
| - | - | - |
| **Changes & re-issues** | What happens to duplicate and re-issued invoices | Everything |
| **Tiers & matching** | How strictly invoices are matched: the default tier, then per sector and per supplier | Every pipeline that follows sector and supplier rules |
| **Bookings** | Whether unmatched invoices are retried, how your booking data says principal or agent, and whether agent bookings wait for the guest copy | Everything |
| **Your fields** | Data points of your own | Everything |

## Changes & re-issues&#x20;

Each is one rule for the whole organisation: every pipeline follows it, and sector and
supplier rules can't change it.

### Duplicates

An invoice we've already received — twice in one batch, or exactly the same as one
already processed — is handled one of three ways:

| Choice | What happens |
| - | - |
| **Ignore** (recommended) | It's kept in **Processed** with a **Duplicate** tag. No one needs to look at it, and its actions don't run. |
| **Set to Needs review** | It goes to **Needs review** for someone to keep or close. It's never sent on twice. |
| **Process normally** | It's matched and its actions run like any invoice, so it can be sent on twice. Its booking is only charged once. |

When two copies arrive in the same batch, the newest is the one processed and the
other is the duplicate — unless one has already been sent on. A file uploaded twice,
byte for byte, is always dropped when it arrives, before this applies.

### Re-issues

A new invoice for a booking that's already been invoiced is compared with the money on
the booking's last invoice:

| What arrived | What happens |
| - | - |
| The money has changed (total, commission or VAT) | Your choice: **Process it** (default, recommended) or **Hold for review**, so someone checks the new figures in **Needs review** before it's sent on |
| Same money, other details changed (dates, names, cabin) | Your choice: **Hold for review** (default, recommended: held in **Needs review** with the booking matched, so someone checks what changed) or **Process it** |

It needs your booking data to carry each booking's last-invoiced total, commission and
VAT (the **Invoice gross / commission / VAT** columns) — without them every re-issue is
processed as normal.

## Tiers & matching&#x20;

How much of each invoice must agree with your booking data:

* **Tier 1 · Financials** — supplier, booking reference, total, currency, VAT and commission.
* **Tier 2 · Financials + trip** — plus the key trip details for the booking's sector:
  dates, ship or hotel, passengers. The default until you change it.
* **Tier 3 · Everything** — every field read from the invoice.

The **Overview** shows the default tier and everything that changes it. Admins and
Managers pick the default there: it applies whenever a supplier or pipeline doesn't set its own depth.
Suppliers on the default move with it; a supplier set to another depth keeps it. The
Overview also lists each sector's
field rules, the suppliers matched at a different depth or with rules of their own, and
any pipeline that sets one depth for everything. **Supplier rules win over sector
rules.** Each [pipeline](https://equatetravel.ai/docs/guides/pipelines.md#3-matching-options-which-rules-to-follow)
chooses whether its matches follow the sector and supplier rules.

> [!NOTE]
>
> On **Essentials** every invoice is matched at **Tier 1**, the essentials almost any
> booking data carries. Changing tiers per sector, supplier or pipeline is on
> **Professional** and above. Anything set before a downgrade is kept, and applies again
> when you upgrade.

### Sector rules

One tab per sector, one row per field. On each row:

* **Tier** — whether the field must agree with the booking for an automatic match
  (**Tier 2 · Must agree**) or only when matching at Tier 3 (**Tier 3 · Additional**) —
  at a shallower depth a Tier 3 field is shown to reviewers but never holds a match.
  The Tier 1 money checks are always checked and can't be moved.
* **Tolerance** — for numbers (money, durations), how far the invoice may differ from
  the booking and still agree: a percentage of the booking or an exact amount, over,
  under or either way.

A change saves straight away and reaches the next match. See
[sectors](https://equatetravel.ai/docs/resources/trip-types.md) for what each sector checks out of the box.

### Supplier rules

Pick a supplier to set:

* **Match depth** — how much of each of its invoices is checked: `TIER_1` (core
  financials), `TIER_2` (plus the key trip details) or `TIER_3` (every field).
* **Field rules** — a tier or tolerance that differs for this supplier, whatever the
  sector. A tier applies only in the sectors that use the field. Anything left on
  **Sector setting** follows your sector rules.

A supplier's domains and invoice links stay on its page under
[Suppliers](https://equatetravel.ai/docs/guides/suppliers.md).

## Bookings&#x20;

### Unmatched invoices&#x20;

**Keep trying unmatched invoices** (on by default) is one rule for the whole organisation.
An invoice that arrives before its booking is checked again whenever new or changed bookings
reach your booking data (uploads, FTP feeds and live syncs), and every hour against live
booking data (a database or booking API). Retries stop after two weeks. Invoices already
matched, sent on or closed by hand are left alone. Off, they wait in **Needs review** until
someone rematches them.

### Principal and agent&#x20;

Whether you sold a booking **as principal** (packaged and sold as your own) or **as agent**
(arranged for the supplier, for a commission) often decides where its invoice goes next. Map
it to the **Principal or agent** field (`isPrincipal`) in your
[booking data](https://equatetravel.ai/docs/guides/booking-data-fields.md), then on each pipeline choose which
[actions](https://equatetravel.ai/docs/guides/actions.md#principal-and-agent) run for principal bookings, agent bookings or
both. Matching never uses this field.

Booking systems store it every which way, and equate reads the common ones:

| In your data | Read as |
| - | - |
| `1`, `Y`, `yes`, `true` | Principal (or agent, if you say a set bit means agent) |
| `0`, `N`, `no`, `false` | The other one |
| `P`, `Principal`, `Merchant` | Principal |
| `A`, `Agent`, `Agency` | Agent |

If yours says it another way (*Own stock*, *Comm*), add your own words here. A booking that
doesn't say runs only the actions set for every booking.

### Guest copies&#x20;

On an agent booking the supplier sends two documents: the **guest copy** (the client copy,
what the customer owes) and the **agent copy** with your commission. Both are needed before
the invoice is sent on. A principal booking has only the one invoice, so there's nothing to
wait for.

**Agent bookings wait for the guest copy** (on by default). When an agent copy is matched
automatically to a booking your booking data marks as agent, and its guest copy hasn't
arrived yet:

1. Its actions wait. The invoice shows in **Processed** marked **Waiting for guest copy**.
2. As soon as the guest copy arrives (in the same email or a later one, paired by supplier
   and booking reference), the invoice is sent on with both copies, within a few minutes.
3. If the guest copy hasn't arrived within **24 hours**, the invoice moves to **Needs
   review**, tagged **Waiting for guest copy**, so someone can ask the supplier for it. It's
   still sent on by itself when the guest copy arrives, or a person can **Send on without
   it** from the invoice.

Principal bookings, bookings that don't say, and invoices that aren't read as the agent
copy are sent on straight away, as are matches that need review anyway. Off, agent bookings
are sent on as soon as the agent copy matches, with the guest copy if it's already there.

> [!NOTE]
>
> Principal and agent actions and guest copies are on **Professional** and above. Anything
> set before a downgrade keeps working, and can't be changed until you upgrade.

## Your fields

Data points of your own, read from every invoice in every sector. See
[adding your own fields](https://equatetravel.ai/docs/guides/invoice-fields.md#adding-your-own-fields).

> [!NOTE]
>
> Tiers per sector, supplier and pipeline, and your own fields, are on **Professional**
> and above. Anything you set before a downgrade is kept, and comes back if you upgrade.
> Duplicates and re-issues are on every plan.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.