> For the complete documentation index, see [llms.txt](https://www.analytics-docs.laplacetec.com/guide/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://www.analytics-docs.laplacetec.com/guide/en/startguide/connect/columns/cogs.md).

# Base product (cost) columns

Margin rate, contribution margin, and POAS can't be calculated from sales amounts alone: they require **cost per product**. This page explains how to upload that cost data. The field structure differs from orders and ads.

{% hint style="info" %}
**There are two ways to upload cost.** In the app, go to **Data management** › **Matching · cost** › **Base product** and upload the template file (**Download template (.xlsx)**) with **Upload file**, or use a [spreadsheet connection](/guide/en/startguide/connect/spreadsheet/cogs.md).
{% endhint %}

## What identifies a row (identifier keys)

`Brand` + `Base product ID` + `Base product name` + `Apply start date/time`

**All four are keys.** Cost changes over time, so the date is part of the key. Even if the first three fields match, a different `Apply start date/time` **stays as a separate row and becomes cost history.** If you enter values again where all four fields match, the value entered later becomes the cost for that point in time.

{% hint style="info" %}
This "last value entered wins" rule applies **only within the same input path**. If you enter the same key through different paths, such as **Upload file** and spreadsheet, the [priority by path](/guide/en/datamanage/matching.md#priority) decides the final value regardless of the order entered.
{% endhint %}

{% hint style="warning" %}
If `Brand` and `Base product ID` are the same but you send a different `Base product name`, **it splits into a different product.** When you rename a product, update the product name in its existing history as well.
{% endhint %}

## Field list (5)

All five are required.

| Screen label          | Type     | What to enter                                                                                                            |
| --------------------- | -------- | ------------------------------------------------------------------------------------------------------------------------ |
| Base product ID       | Text     | The code for the unit you assign cost to. Use the same value as `Custom product code` or `Product ID` in your order data |
| Base product name     | Text     | The product name for the code above                                                                                      |
| Brand                 | Text     | Use the same value as `Brand` in your order data                                                                         |
| Cost of goods sold    | Integer  | Cost of **one** unit. This is the unit price before multiplying by quantity                                              |
| Apply start date/time | Datetime | When this cost starts to apply. When cost changes, add a row with the new start time.                                    |

{% hint style="warning" %}
**If `Base product ID` isn't linked to the product codes in your order data, that product's cost stays empty and margin, contribution margin, and POAS aren't calculated.** Before uploading cost, check that both use the same code system.
{% endhint %}
