EN
Marketplace

How to Set Up an XML Integration? A Guide to Transferring Supplier XML to Marketplaces, Field Mapping, and Price and Stock Rules

How do you set up an XML integration? XML fields, category mapping, a pricing formula including commission and profit, inventory rules and common mistakes in one guide.

Contents 12 sections
  1. What is an XML integration?
  2. What is the difference between receiving XML and providing XML?
  3. Which fields should a product XML contain?
  4. How do you set up an XML integration step by step?
  5. Why is category and attribute mapping so important?
  6. How do you add commission and profit to the XML price?
  7. How often should stock be updated in XML, and how should it be sent?
  8. How do you manage XML feeds from several suppliers?
  9. What are the most common mistakes in XML integration?
  10. How do you set up an XML integration with NetKasam?
  11. Conclusion: Connecting XML is easy; setting it up correctly pays off
  12. Frequently Asked Questions About XML Integration

Your supplier sent you a link: "This is our XML address; you can pull the products from here." When you open the link, you see a file of thousands of lines full of tags. It contains the names, prices, stock and images of hundreds of products, but it isn't clear how to move these products to your marketplace store or e-commerce site, how to set the price, or how to keep stock up to date. The question how do you set up an XML integration comes up for every e-commerce business that works with suppliers or supplies products to dealers.

In this guide, we explain with numbers what an XML integration is, the difference between receiving and providing XML, which fields a product XML should contain, category and attribute mapping, how the selling price is calculated including commission and profit, inventory rules, and how several suppliers are managed. At the end, you will find the most common mistakes and how the XML process works with NetKasam.

What is an XML integration?

In short: An XML integration is the automatic, regular transfer of product information from one system to another via a file or link in XML format. The file is refreshed at set intervals, so price and inventory changes are reflected on the other side automatically.

XML (Extensible Markup Language) is a text format that keeps data organized within tags. In a product XML, each product is a record and each piece of information is a tag: product code, name, price, stock, image URLs. Thanks to this structure, both people and software can read the file. For a short definition of the term, see the what is XML glossary page.

The value of XML in e-commerce is that it is not a one-time transfer but a continuous connection. When the supplier changes a price or a product goes out of stock, the XML is updated; the integration reads this change and carries it to your store. Unlike manual product uploads, the workload doesn't grow as the number of products increases.

What is the difference between receiving XML and providing XML?

In short: Receiving XML means pulling the products of a supplier or your own ERP into your store via XML. Providing XML means preparing your own products as XML and offering them to your dealers or to customers who run e-commerce businesses.

TopicReceiving XMLProviding XML
Who are you?A seller, dealer or store that buys products from a supplierA manufacturer, wholesaler or business that distributes its products to dealers
Data directionFrom the supplier to youFrom you to your dealers
Your responsibilityMapping fields, setting price and inventory rulesKeeping product information complete and up to date
Biggest riskSelling a product that has run out at the supplierDealers selling with an old price or stock level
Typical useUploading supplier products to marketplaces and your siteOffering a product catalog to a dealer network

For details on the business model built by supplying products to dealers, see our article what is XML dealership. This guide mainly covers receiving XML and transferring it to sales channels.

Which fields should a product XML contain?

In short: Every product should have at least a product code, barcode, product name, category, brand, price, VAT rate, stock and image URL. For products with variants, each variant needs its own code, barcode and stock; for shipping, desi or weight information is also needed.

AreaWhat is it for?Importance
Product code (stock code)Uniquely identifies the product in your system and the supplier'sRequired
BarcodeMatches the product on marketplaces; the same product is found under this code at different suppliersRequired
Product name and descriptionThe content of the product page; determines visibility in search resultsRequired
Category and brandDetermines the product's place in the marketplace category treeRequired
Price and currencyThe amount the sale price is calculated from; it should state whether VAT is included or excludedRequired
VAT rateRequired for invoicing and price calculationRequired
Inventory quantitySellable quantityRequired
Image URLsProduct photos; they must be accessible and of sufficient resolutionRequired
Variants (color, size)Each option has its own code, barcode, stock and imageRequired for products with variants
Desi or weightCalculating the shipping feeRecommended
Technical specificationsFills in the marketplace's required attribute fields (material, gender, age group)Required depending on category

Missing fields are the first and most frequent source of import errors. A product without a barcode cannot be uploaded to most marketplaces; a product whose image does not load is rejected; and a price that does not make clear whether VAT is included breaks the entire price calculation. Asking the supplier for a sample XML before setting up the integration and comparing it with this table reveals most of the problems that would otherwise surface later. For details on variant structure, see our article how to manage products with variants on marketplaces.

How do you set up an XML integration step by step?

In short: You get the XML URL from the supplier, check the fields, map categories and attributes, define price and stock rules, test with a small number of products, and then turn on regular automatic updates.

Step by stepSetting up an XML integration in six steps
  1. 01
    Get the XML URLAsk the supplier for the regularly updated XML link and a description of its fields.
  2. 02
    Check the fieldsAre code, barcode, price, VAT, stock and image filled in for every product?
  3. 03
    Map themLink the supplier's categories and attributes to the sales channel's fields.
  4. 04
    Set the rulesDefine a pricing rule that includes commission and profit, and a stock safety margin.
  5. 05
    Run a small testImport 10–20 products and check the product pages and prices.
  6. 06
    Switch to automaticTurn on regular updates and monitor the error reports.

The step most often skipped is the small test. Importing thousands of products at once and only then noticing a pricing error means having to cancel orders that came in at the wrong price. Testing with a small number of products first lets you see both the field mapping and the pricing rule on a real product page.

Why are category and attribute mapping so important?

In short: Every marketplace has its own category tree and required attributes that vary by category. If the supplier's "Men's Clothing > T-Shirt" category is not linked to the correct marketplace category and to required fields such as color, size and material, the product is not uploaded or is listed in the wrong place.

The category names in a supplier's XML follow the supplier's own structure; they do not match the marketplace's tree one to one. Mapping is a bridge between these two trees, and once it is set up correctly, new products in the same category automatically go to the right place too. Attribute mapping is more delicate: the marketplace must recognize the color the supplier writes as "Lacivert" (navy) as "Lacivert", and the size "XL" as "XL". Spelling variations (e.g. "Laci", "lacivert", "LACİVERT") are linked to a single value in the mapping table.

  • Category mapping: Supplier category → the sales channel's lowest-level category.
  • Attribute mapping: The supplier's attribute names and values → the category's required attribute fields.
  • Brand mapping: The supplier's brand spelling → the brand name registered on the marketplace.

For what to watch out for when building the category structure on your own site, read our article how to manage categories in e-commerce.

Recommended ReadingHow to Sync Marketplace Inventory?

How do you add commission and profit to the XML price?

In short: The sale price is not calculated by adding a percentage on top of cost, but so that commission and target profit come out of the sale price: sale price excluding VAT = (purchase price + shipping + packaging) ÷ (1 − commission rate − target profit rate).

The price coming from the XML is usually the price the supplier sells to you. Saying "let's add 30 percent" on top of it is a common but wrong method, because commission is charged on the sale price and the added percentage may not be enough to cover both commission and profit. The right method is to think of commission and target profit as shares of the sale price.

FormulaFive formulas from XML price to sale price
  1. Total cost = Purchase price (excl. VAT) + Shipping + Packaging
  2. Sale price (excl. VAT) = Total cost ÷ (1 − Commission rate − Target profit rate)
  3. Commission amount = Sale price × Commission rate
  4. Net profit = Sale price − Commission − Total cost
  5. VAT-inclusive list price = Sale price × (1 + VAT rate)

The commission rate varies by sales channel and category; use the rate in your own contract.

Let's look at an example. In the supplier's XML, the product's purchase price excluding VAT is ₺400. Shipping per parcel is ₺45 and packaging is ₺10. The sales channel's commission is 20% for this example, and the target net profit is 15% of the sale price. Total cost is ₺455; the sale price is 455 ÷ (1 − 0.20 − 0.15) = 455 ÷ 0.65 = ₺700 (excluding VAT):

ChartFrom a ₺700 sale excluding VAT to ₺105 net profit
  1. Selling price (excl. VAT)₺700
  2. Commission (20%)−₺140
  3. Supplier purchase price−₺400
  4. Shipping−₺45
  5. Packaging−₺10
  6. Net profit (15% of sale)₺105

Prepared with sample values. If VAT is 20%, the list price is ₺840.

If the rule "add 30% to cost" had been applied to the same product, the sale price would have been 455 × 1.30 = ₺591.50; after deducting the 20% commission (₺118.30), profit would have been only ₺18.20. The difference comes from what the percentage is added to. For details on the difference between profit margin and markup on cost, see our article how to calculate profit margin.

As the commission rate rises, the sale price needed to keep the same profit increases quickly. The chart below shows the sale price excluding VAT required at different commission rates for the same product and the same 15% target profit:

ChartSale price needed for 15% net profit by commission rate
  1. 10% commission₺606.70
  2. 15% commission₺650
  3. 20% commission₺700
  4. 25% commission₺758.30

Total cost ₺455 (purchase ₺400, shipping ₺45, packaging ₺10); commission rates are examples.

That is why, when you send products from the same XML to different sales channels, you need to define a separate pricing rule for each channel based on its own commission. Going to every channel with a single price means being too expensive on one channel and selling at a loss on another.

Takeaways from the exampleOne product, the right pricing rule, four critical numbers
  • ₺455total cost including purchase, shipping and packaging
  • ₺700sale price excluding VAT for 20% commission and 15% profit
  • ₺105net profit after commission and all costs
  • ₺18.20profit left under the "add 30% to cost" rule
Recommended readingHow to Calculate Net Profit on a Marketplace?

How often should stock be updated in XML, and how should it be sent?

In short: Stock should be updated at frequent intervals based on sales velocity and sent not as the supplier's stock as-is, but with a safety margin deducted. A product with only the last few units left at the supplier is sent to the sales channel with zero stock.

The most expensive mistake in an XML integration is selling a product that has run out at the supplier. The order is canceled, customer satisfaction drops, and on marketplaces the cancellation rate affects seller performance. There are two reasons for this: the XML being updated infrequently, and the supplier sharing the same stock with other resellers.

RuleHow is it applied?What does it prevent?
Frequent updatesFor fast-selling products, the XML is read at short intervalsSelling on outdated stock
Safety marginA fixed quantity is deducted from the supplier's stock before sending (e.g. stock − 2)The last units being sold at the same time as other resellers
Lower limitWhen stock falls below a set quantity, zero is sentThe single remaining unit being sold on two channels
Price limitIf the price changes by more than a set percentage in one update, the import is stopped and checkedA zero or very low price caused by a supplier error
Inactive productA product removed from the XML is taken off saleSelling a product the supplier has removed from its list

For how safety stock is calculated, see our article how to calculate safety stock.

How do you manage XML feeds from more than one supplier?

In short: Products are matched by barcode; if the same product is available from more than one supplier, the supplier with stock and the lowest cost is chosen. Product codes are separated with a prefix per supplier so that different suppliers using the same code does not cause conflicts.

  • Merge by barcode. The same product should have a single listing; the same barcode coming from two suppliers should not open two separate listings.
  • Tie the source to a rule. Among the suppliers that have stock, the price and stock of the lowest-cost one is used.
  • Separate the codes. A supplier-specific prefix (e.g. "A-", "B-") prevents product codes from clashing.
  • Route the order to the right supplier. The record should show which supplier's stock will fulfill the order.

What are the most common mistakes in XML integration?

  1. Starting without reviewing a sample XML. Missing barcodes, empty images or an unclear VAT field are noticed only after the import.
  2. Not checking whether the price includes VAT. This single distinction can shift all sale prices by 20%.
  3. Pricing by adding a percentage to cost. Because commission is deducted from the sale price, profit turns out much lower than expected.
  4. Sending a single price to all channels. If commission rates differ, you make a loss on one channel.
  5. Sending stock without a safety margin. The last units at the supplier turn into canceled orders.
  6. Importing without mapping categories and attributes. Products are rejected or appear in the wrong category.
  7. Not monitoring error reports. Products that fail to upload silently stay off sale.

How do you set up an XML integration with NetKasam?

In NetKasam, XML is used both for importing and for exporting, and stock is managed from a single center:

  • XML product feed. Your supplier's or ERP's XML is connected to NetKasam depending on your plan: the Connect plan includes 1 XML product feed and the Global Plus plan includes 3. Details are on the pricing page.
  • Exporting XML. To share the products you create in NetKasam with your customers who do e-commerce, you don't need to deal with Excel; you select the products and categories you want, generate an XML and share it. With XML, you can send your products to all e-commerce platforms.
  • Stock in one place. With inventory management, your product stock is transferred to your e-commerce site and to the other sites you provide XML to; orders placed on sales channels reduce stock in NetKasam. For details, see the question does the integration track my stock.
  • Variant images. By uploading a separate image for each color, you present your products better when selling via XML.
  • Marketplaces and your e-commerce site in one panel. With marketplace integration and e-commerce integration, orders are collected on a single screen and invoiced in bulk.

Frequently Asked Questions About XML Integration

What is an XML integration?

An XML integration is the automatic, regular transfer of product information from one system to another via a file or link in XML format. Price and inventory changes are reflected on the other side automatically.

How do you upload products to a marketplace with XML?

The supplier's XML address is connected to integration software, categories and attributes are mapped to the marketplace's fields, price and inventory rules are defined, and products are transferred first in a small test and then in bulk.

Which fields are required in an XML file?

Every product should have a product code, barcode, product name, category, brand, price, VAT rate, stock and image URL. For products with variants, each variant needs its own code, barcode and stock.

How do you add profit to the XML price?

The sale price is found by dividing total cost by (1 − commission rate − target profit rate). For example, with a cost of ₺455, 20% commission and 15% target profit, the sale price excluding VAT is ₺700.

How often should XML stock be updated?

It should be updated at frequent intervals depending on sales speed. Using short intervals for fast sellers and a safety margin on supplier stock prevents canceled orders.

What is the difference between receiving XML and providing XML?

Importing XML means pulling a supplier's products into your own store. Exporting XML means preparing your own products as XML and offering them to your resellers or to customers who do e-commerce.

Can XML feeds from several suppliers be used together?

Yes. Products are matched by barcode; if the same product is available from several suppliers, the one with stock and the lowest cost is chosen, and product codes are separated with a supplier prefix.

Which NetKasam plan includes XML integration?

XML product feeds are included as 1 in the Connect plan and 3 in the Global Plus plan. Providing your products as XML and managing inventory from a single center is also possible in NetKasam; bookkeeping is always free.

Conclusion: connecting an XML is easy, setting it up correctly pays off

Connecting an XML URL takes a few minutes; the real work is mapping fields and categories correctly, building a price that includes commission and profit, and keeping stock up to date with a safety margin. As a first step, ask your supplier for a sample XML, compare it with the field table in this guide, and calculate the sale price with the formula for the 20 products you expect to sell most. Once you set up the rules correctly for this small group, you can publish hundreds of products with the same confidence.

Bookkeeping Is Now Completely Free

Manage your bookkeeping and e-Invoice operations with NetKasam without paying a thing. Customer and supplier accounts, inventory, collections and more in one panel, completely free.

Start FreeMarketplace Integration

Read similar articles

19 free tools

Commission, shipping, VAT and profit calculations in your browser, no sign-up needed.

All tools