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

# PEX tag matching with accounting systems

> How PEX matches transaction tags to entities in your accounting platform when automatic tag sync is turned off, including match order and hierarchy handling.

## Who is this article for?

Transaction tags are a flexible way to attach extra data to transactions.

PEX recommends syncing tags with your accounting platform using a connector when you can. Some businesses need more control over tags and leave **Sync tag** options off. This article explains how PEX still matches tags to data in your accounting system in that case.

## What steps does PEX take when matching tags to third-party data?

PEX tries to match tags in this order:

1. Tag **option value** in PEX → entity **ID**
2. Tag **name** in PEX (the **Display as** value) → entity **name**
3. Tag **option value** in PEX → entity **name**
4. Tag **name** in PEX (**Display as**) → entity **name** using **hierarchy + delimiter**
5. Tag **option value** in PEX → entity **name** using **hierarchy + delimiter**

The last two steps help match within hierarchical expense categories. For example, an app might use:

1. `Hotels`
2. `Sales:Demos:Hotels`

PEX looks for the most specific child category first—in this example, `Sales:Demos:Hotels`. If no child match is found, it tries the parent category.

For implementation details, see the tag-matching code in [`MatchingExtension.cs`](https://github.com/pexcard/pex-sdk-dotnet/blob/master/src/PexCard.Api.Client.Core/Extensions/MatchingExtension.cs) in the [`pex-sdk-dotnet`](https://github.com/pexcard/pex-sdk-dotnet) repository on GitHub.


## Related topics

- [How to Setup and Create Tags with Tag Manager](/administrator-guide/how-to-setup-and-create-tags-with-tag-manager.md)
- [Accounting Software Connector Troubleshooting](/administrator-guide/accounting-software-connector-troubleshooting.md)
- [How to get AI-powered tag suggestions](/administrator-guide/how-to-get-ai-powered-tag-suggestions.md)
- [Setting up your Chart of Accounts](/administrator-guide/setting-up-your-chart-of-accounts.md)
- [Streamline Your Purchase Workflow: Tips & Best Practices](/administrator-guide/streamline-your-purchase-workflow-tips-best-practices.md)
