Merchant Custom Prices feature overview

Edit on GitHub

In B2B commerce transactions, prices are typically negotiated in contracts. Therefore, merchants and their clients, who are usually company business units, expect to see their own prices in the shop. With the Merchant Custom Prices feature, the shop owners of the B2B Demo Shop can provide different prices for merchants and their clients. This way, the relationship between merchants and buyers is reflected more accurately, and the shop owners can set different prices for various customers.

When talking about product prices that depend on the customers they refer to, and we differentiate between two types: default and specific.

  • Default prices are the prices shown by default to all regular customers.
  • Specific prices are different prices meant for a specific target audience.

Prices diagram

The different price categories that can be selected based on contextual information, like customer or merchant relationship, are referred to as price dimension.

We have the following price dimensions:

  • Mode (Net/Gross)
  • Volume
  • Store
  • Currency
  • Merchant Relationship

All prices in Spryker OS are stored in spy_price_product_store; however, connections to price dimensions are stored to different tables.

For example, spy_price_product_default contains only connections to prices that were imported during store installation or created using Zed UI and connections to prices pertain to merchant relations would reside in spy_price_product_merchant_relationship. So the spy_price_product_default table poses a set of relations between the spy_price_product_default and fk_price_product_store tables and related entities.

The Merchant Custom Prices feature relates specifically to prices set for individual merchant relations. This feature implies that customers see only prices applying to them, based on their merchant relation, or default prices if merchant relation doesn’t have prices for some products.

The specific prices apply only to the merchant a relation assignee (business units, as a rule), not to merchant relation owners. If a business unit of a customer has several merchant relations with different prices for one and the same product, the lowest price is offered.

Default prices in the web-shop

Default prices in the web-shop

Prices for a merchant referring to a specific relation

Prices for a merchant referring to a specific relation

Besides setting specific prices for individual merchant relations products manually, the prices can also be added in bulk by importing them from a CSV file. The CSV file for import must contain populated merchant_relation_key, abstract_sku, concrete_sku, price_type, store,currency, price_net, price_gross fields.

To import the specific prices for merchant relations from the CSV file residing in data/import inside the module PriceProductMerchantRelationshipDataImport, run:

console data:import product-price-merchant-relationship

Or, if you want to import merchant from your file, indicate a path to it:

console data:import product-price-merchant-relationship [-f [path_to_csv_file]

To remove all imported merchant relation prices, you can run:

console price-product-merchant-relationship:delete

Or, you can remove merchant relation prices referring to specific merchant relations by specifying their IDs:

console price-product-merchant-relationship:delete [-m X] . X = MR ID
Set prices per merchant relations when creating abstract products and product bundles
Install the Merchant custom prices feature Upgrade the PriceProduct module