Skip to main content

Adding Product Margins

How to add margins to Data Octopus.

R
Written by Rafał Idzik - Data Octopus
Updated over a week ago

Introduction

Product margins in the Data Octopus application are key financial data that determine profit from each product sale. Adding margins enables:

  • Accurate calculation of product profitability

  • Generation of financial reports with real data

  • Analysis of profitability of individual product categories

  • Making informed pricing decisions

Without defined margins, the system uses default percentage values, which can lead to inaccurate financial analyses. The default margin value setting is 25%.

Prerequisites

⚠️ IMPORTANT: Before adding margins you must meet the following conditions:

Mandatory Requirements

  • Imported product file: Margins can only be added when the product file has been successfully imported into the system

  • Import status: The product file must have the status "imported successfully" and show in green

How to Check Product File Status

  1. Go to the main workspace

  2. Select your store

  3. Go to the Import section

  4. Check the Product Feed status - it must be marked as imported successfully (green color)

📖 Need help with product file? See product file addition instructions.

Step-by-Step Instructions

Starting the Margin Addition Process

  1. Go to the main Data Octopus workspace

  2. Select the store for which you want to add margins

  3. Click the Import section in the side menu

  4. In the Add Data section, select the Margins option

Downloading the Margin Template

  1. In the upper part of the window, find the file to download - this is the official margin template

  2. Click the download link to save the template to your computer

  3. Save the file in an easily accessible location (e.g., Desktop, Downloads folder)

Preparing the Margin File

  1. Open the downloaded template in a spreadsheet editing program (Excel, Google Sheets, LibreOffice Calc)

  2. Fill in margin data according to the template structure

  3. Margins must be filled in decimal format - when our margin is 30%, we enter 0.3 in the file. Use a dot as the decimal separator.

  4. Save the file maintaining the original formatting

Importing the Margin File

  1. Return to the Data Octopus application (window with Margins option)

  2. Click the Choose a File button

  3. Select the completed margin file from your computer drive

  4. Click the Import File button to start the import process

  5. Wait for confirmation of successful import

Working with the Template

What is the Margin Template?

The margin template is a CSV file prepared by the system containing:

  • Proper column structure required by the application

  • Column headers in the appropriate format

How to Fill the Template?

Filling Rules:

  • Do not change the file structure - column headers, their order, or formatting

  • Fill only data rows - do not modify the header row

  • Use consistent formatting for numerical values - decimal format

  • Check product ID correctness - they must match those from the product file

Example of Correct Completion:

Best practices:

Check data twice before import

Use correct separators (comma)

Maintain consistent encoding (UTF-8)

Updating Margins

Adding Additional Margins

When you want to add new margins or update existing ones:

  1. You don't need to download the template again - you can use the previously downloaded one

  2. Fill the file with new margin data or update existing ones

  3. Perform the standard import process (Choose a File → Import File)

  4. The system will automatically process changes

When to Download the Template Again?

Download the template again when:

  • You lost the original template file

  • The product structure has changed and you need a new template

Managing Duplicates

Automatic Duplicate Removal

🔄 Don't worry about duplicates! The Data Octopus system automatically:

  • Detects duplicate items during import

  • Removes duplicates keeping the newest data

  • Updates existing margins instead of creating duplicates

How Does Deduplication Work?

When you import a file containing products already existing in the system:

  • The system compares product IDs

  • Newest data will replace old margin values

  • You will receive confirmation of the number of updated items

Benefits of Automatic Deduplication:

Data security - no risk of duplication ✅ Easy updates - you can import the file multiple times ✅ Time savings - you don't need to manually check duplicates

Technical Requirements

File Formatting Checklist:

File Format:

  • [ ] Extension: .csv

  • [ ] Separator: comma (,)

  • [ ] Encoding: UTF-8

  • [ ] Structure: no changes from template

Data Content:

  • [ ] Product IDs: matching the product file

  • [ ] Numerical values: use dot as decimal separator

  • [ ] No empty rows in the middle of data

  • [ ] Complete data in each row

Before Import Check:

  • [ ] Product file imported (green status)

  • [ ] Template not modified structurally

  • [ ] Data has been checked for errors

  • [ ] File saved in CSV format with correct encoding

Q&A Section

What happens if I import margins without previously importing products?

The system will not allow margin import without previously importing the product file. You will receive an error message. Make sure the product file has the status "imported successfully" (green color) before attempting to add margins.

Can I edit the margin template?

Do not change the template structure - column headers, their order, or formatting. You can only fill rows with data. Modifying the structure may lead to import errors.

What to do if margin import fails?

Check the following elements:

  • Product file status - is it imported successfully?

  • File format - is it CSV with comma separator?

  • Encoding - is the file saved in UTF-8?

  • Data structure - did you change template headers?

  • Product IDs - do they match those from the product file?

How often can I update margins?

You can update margins as often as you need. The system automatically removes duplicates and updates existing data with new values.

Can I import partial margin data?

Yes, you can import margins only for part of the products. You don't need to fill margins for all products at once. Products without defined margins will use default system values.

What happens to my old margin data when re-importing?

Old margin data for products contained in the new file will be replaced with new values. Margins of products not present in the new file will remain unchanged.

How long does margin file processing take?

Newly added margins will be processed depending on the frequency of product file processing in the Data Octopus system, but no later than 6 AM the next day.

Can I use the same template for different stores?

No, each store has its own margin template adapted to its product structure. Always download the template from the account of the store for which you want to add margins.

Troubleshooting

Most Common Causes of Problems:

  1. Missing imported product file

  2. Template structure modification

  3. Incorrect file encoding

  4. Incorrect product IDs

  5. Wrong number format (using comma instead of dot)


💡 Need additional help? Contact the Data Octopus support team.

Did this answer your question?