# NFT Royalties: P\&L by Collection

{% hint style="info" %}
To classify your NFT royalty transactions as primary and secondary income per collection, follow these three steps:

1. Update your Chart of Accounts with Revenue Categories
2. Add your NFT collections to Integral
3. Automate your per-collection categorization with Rules&#x20;
   {% endhint %}

<details>

<summary>If you need help, email us at <a href="mailto:hi@integral.xyz">hi@integral.xyz</a> or ping us on Telegram at <a href="https://t.me/chrmoro">@chrmoro</a>.</summary>

</details>

### Step 1: Update your Chart of Accounts with Revenue Categories

Let’s assume the NFT company has two collections: `NFT Collection Alphabet`, and `NFT Collection Soup`. You might want to include something like this in your Chart of Accounts:

> ***Income***
>
> &#x20;    *Primary Sales - Alphabet*
>
> &#x20;    *Secondary Sales - Alphabet*
>
> &#x20;    *Primary Sales - Soup*
>
> &#x20;    *Secondary Sales - Soup*

Of course you can set this up any way you like! This only illustrates what’s possible. Make sure you have the categories you need in your Chart of Accounts before creating your Rules.

<details>

<summary><strong>Refresh your Chart of Accounts in Integral to see your new income accounts</strong></summary>

Add categories in your ERP and update the data in Integral [here](https://app.integraltreasury.xyz/settings/integrations).<img src="https://3061199926-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Ft1fkaxq4yvhcAFiQKv7R%2Fuploads%2F7DiUNa4aYFah6rLiNO1G%2FScreen%20Shot%202023-03-17%20at%204.27.16%20PM.png?alt=media&#x26;token=05026f3f-f49d-449b-833d-7e82848ee7a0" alt="" data-size="original">

</details>

### Step 2: Add your NFT Collections to Integral

Add your NFT smart contracts to Integral **as NFT Collections**.

To do so, navigate to [Wallets](https://app.integraltreasury.xyz/wallets) > [+Add Wallet](https://app.integraltreasury.xyz/accounts/add) > [NFT Collection](https://app.integraltreasury.xyz/accounts/add/nft_collection). Copy-paste your NFT Collection smart contract address. It will appear under the NFT Collections tab in the Wallets page.

<figure><img src="https://3061199926-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Ft1fkaxq4yvhcAFiQKv7R%2Fuploads%2FVtaqsDAAuJQMTtBILlhy%2FScreen%20Shot%202023-05-19%20at%2012.17.53%20AM.png?alt=media&#x26;token=f5ebfd9a-8fa6-4d61-9a18-7c317909bcf2" alt=""><figcaption><p>Copy-paste your NFT smart contract address into NFT Collections</p></figcaption></figure>

<details>

<summary><strong>Where can I find the NFT Collection smart contract address?</strong></summary>

The easiest way is to ask the NFT team! You can find it from the company’s page on a marketplace like OpenSea, or as the Token Contract on Etherscan.

</details>

<details>

<summary><strong>How do I know if adding the NFT smart contract worked?</strong></summary>

**#1) Check your NFT Collections in Wallets**

You should see your NFT Collection show up in [Wallets > NFT Collections](https://app.integraltreasury.xyz/wallets?type=nft_collection).<br>

**#2) Check your NFT metadata in Bookkeeping**

You should also see the Txn Action, NFT Collection, and Token ID show up in [Bookkeeping](https://app.integraltreasury.xyz/accounting) for transactions related to minting or royalty deposits from the collection you just added. Scroll to the right in the Bookkeeping table to see it.

If you don’t see the data right away, try clicking on “More filters” and using the NFT filters to find your relevant transactions.

</details>

### Step 3: Automate your categorization

Lastly, we need to create rules to automatically categorize our transactions as primary sales income and secondary sales income. We can even do it by collection and marketplace.

1. Navigate to [Automation](https://app.integraltreasury.xyz/rules) in the side bar.
2. Create a new rule and give it a representative name (example: Primary Income)
3. From here, add your rule conditions according to the type of rule you are looking to create. Typically you will want to include the NFT Collection as a condition, and the Transaction Action in the case of Minting/Primary Sales.

{% hint style="warning" %}
It is theoretically possible to use the “Interacted With Smart Contract” condition in Rules to categorize transactions by marketplace. However, marketplaces often change their smart contract addresses. Only use this if you are prepared to keep it up to date.
{% endhint %}

**Rule Template: Primary Income per Collection**

Primary Sales are identified when the **“Transaction Action” is “Mint”**. You can also specify a wallet and one or more NFT collections if you want to do it per collection.

<figure><img src="https://3061199926-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Ft1fkaxq4yvhcAFiQKv7R%2Fuploads%2Fygkiqy8cLUi3spTk6ynP%2FScreen%20Shot%202023-03-20%20at%204.44.53%20PM.png?alt=media&#x26;token=6f512f70-5b64-4de0-88af-665191d15642" alt=""><figcaption></figcaption></figure>

**Rule Template: Secondary Income per Collection**

Secondary Sales are identified wherever **NFT Collection is populated**, so make sure to specify the NFT collections. Secondary Sales rules should always come after minting rules.

<figure><img src="https://3061199926-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Ft1fkaxq4yvhcAFiQKv7R%2Fuploads%2F4x8XTSn0ZUXVHJkroyvW%2FScreen%20Shot%202023-03-20%20at%204.44.02%20PM.png?alt=media&#x26;token=f212f7bf-9b19-40c0-a719-47a33997e1b4" alt=""><figcaption></figcaption></figure>

{% hint style="danger" %}
**Primary Sales rules must always be set higher priority than Secondary Sales rules.** This makes sure you don’t accidentally categorize minting proceed as secondaries. 👇
{% endhint %}

<figure><img src="https://3061199926-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Ft1fkaxq4yvhcAFiQKv7R%2Fuploads%2FKPtRtjqWoRt5CvVQDWeB%2FScreen%20Shot%202023-03-20%20at%204.57.32%20PM.png?alt=media&#x26;token=6a8f83b0-8f23-4a7c-a757-0b83d686aae3" alt=""><figcaption><p>Primary sales rules should always come before secondary sales rules</p></figcaption></figure>
