FAQ: Can a VTEX seller send stock and price information to more than one trade policy on a VTEX marketplace? | Sales Channel Mapping

This topic aims to address an issue related to the Sellers x Marketplace architecture that is somewhat unknown among our customers, yet can be very helpful for Marketplaces that want to receive product pricing and inventory from their Sellers for more than one sales policy. It’s worth noting right away that this is indeed possible through the Upsert Sales Channel Mapping API.

However, it’s important to highlight that for this architecture to work correctly, each Seller will need to create two affiliates for the same Marketplace — one for each sales policy they want to send to the Marketplace. After that, the Marketplace will need to perform the Seller Mapping as described in the following documentation:

This endpoint allows the Marketplace to map its Sales Policies to the Seller’s affiliates. This way, the Seller can have multiple Sales Policies associated with the same marketplace by creating different affiliates. The mapping allows the Seller to segment catalog, pricing, inventory, logistics, and payments in the Marketplace.

To make it easier to understand how the process described above should work, here’s a step-by-step walkthrough:

1 - Seller: Create a second affiliate with a different ID. In this case, we’ll use as an example the ID “ABC” for the affiliate associated with products from Sales Policy 1, and the ID “XYZ” (or any other ID you prefer) associated with Sales Policy 2.

2 - Marketplace: Will use the route mentioned above to perform the mapping, where the request body will look something like this:

'[ 
  { 
    "marketplaceSalesChannel": 1, 
    "sellerChannel": "ABC" 
  }, 
  { 
    "marketplaceSalesChannel": 2, 
    "sellerChannel": "XYZ" 
  }
]'

So the cURL for the request would be:

curl --location --request PUT 'https://{{accountName}}.vtexcommercestable.com.br/api/seller-register/pvt/sellers/{{sellerId}}/sales-channel/mapping' \
--header 'Accept: application/json' \
--header 'Content-Type: application/json' \
--header 'X-VTEX-API-AppKey;' \
--header 'X-VTEX-API-AppToken;' \
--data '[
    {
        "marketplaceSalesChannel":1,
        "sellerChannel":"ABC"
    },
    {
        "marketplaceSalesChannel":2,
        "sellerChannel":"XYZ"
    }
]'

If you have any further questions on this topic, feel free to ask here or open a new topic referencing this one! :smile:

Karina Mota
Field Software Engineer | VTEX

Hey @KarinaMota, how’s it going?

First of all, I wanted to say thank you — I’m dealing with a situation with a client on this topic and your documentation was a huge help.

Now I have a question that came up: this store uses a white label seller structure. I created the two affiliates with different policies across all the sellers, but when I ran the API on the main store (which would be the marketplace), I got an error message saying “Invalid seller channel”. Do I need to create the affiliates with the same IDs on the main store as well, or is this API meant to be run on each individual seller?

Thanks in advance!

Hi @pedro.scisinio, how’s it going?

This API is meant to be used in the Marketplace, but the commercial policy and the Commercial Policy ID need to be set up correctly! If you still have questions about the process, open a ticket with our team and we’ll take a look at your store’s settings for you.

Best regards,
Karina Mota

Partner Field Software Engineer | VTEX