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

# Transaction Rules Overview

> Overview of transaction rules resource and field definitions

A transaction rule allows partners to specify a `match_description` and a `category`; all transactions matching the specified description will be placed in the chosen category.

Transaction rules override the default `category` MX gives to a `transaction`. Once a rule is created or updated, all past transactions with a matching cleansed `description` are placed in the partner-chosen `category`, and any future transactions will be placed in the chosen category as well.

For example, creating a rule with the `match_description` "Wal-mart" and the `category_guid` for "Groceries" will automatically apply that `category_guid` to any `transaction` with a matching `description`, including both existing and future transactions.

Partners must also provide a `description` when creating a `transaction_rule`. This string will replace all matched transactions' `description` value.

## Transaction Rule Fields

| Field name          | Data type | Description                                                                                                                                                                         |
| :------------------ | :-------- | :---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `category_guid`     | String    | A unique identifier for the category. Defined by MX. Use the list categories endpoint to get a complete list of available categories and their associated GUIDs.                    |
| `created_at`        | String    | The date and time the transaction\_rule was created, represented in ISO 8601 format with a timestamp, e.g. 2015-04-13T12:01:23-00:00.                                               |
| `description`       | String    | The matched transaction's description will be updated to the string provided here.                                                                                                  |
| `guid`              | String    | A unique identifier for the transaction\_rule. Defined by MX.                                                                                                                       |
| `match_description` | String    | A string used to find a transaction to which the rule will be applied. Transaction matching is based on a comparison of match\_description to a transaction's cleansed description. |
| `updated_at`        | String    | The date and time the transaction\_rule was last updated, represented in ISO 8601 format with a timestamp, e.g. 2015-04-13T12:01:23-00:00.                                          |
| `user_guid`         | String    | A unique identifier for the user to which the transaction\_rule belongs. Defined by MX.                                                                                             |
