Syncing SAP Business One Price Lists, Volume and Period Discounts to Magento

Syncing SAP Business One Price Lists, Volume and Period Discounts to Magento

SAP Business One and Magento store prices in very different ways. SAP works through a priority order: special prices for a customer, discount groups, period and volume discounts, then the price list. Magento simply takes the lowest price it can find. If you copy SAP's tables across one by one, customers will sooner or later see a price in the shop that SAP would never have charged. The safer approach is to let the sync work out what SAP would charge, and send Magento that result.

A B2B customer logs in, puts 50 units in the cart and sees €8.90 each. The sales order in SAP Business One says €9.50. Now someone in accounts has to phone the customer and explain.

Price mismatches turn up in a lot of ERP-connected shops, and the connector code is often working exactly as written. The two systems just follow different pricing rules, and nobody wrote down how one should translate into the other.

This guide is written for developers and whoever looks after pricing in SAP Business One. It maps each SAP price type to Magento, with the API calls for both sides, and ends with a test you can run before a customer spots the gap.

Key takeaways

  • SAP Business One picks a price by priority order; Magento always shows the lowest price it receives.
  • Let the sync calculate the effective price with SAP’s rules and send Magento one price per customer group, quantity break and date range.
  • Map price lists to customer groups, volume discounts to tier prices and period discounts to dated catalog price rules or a scheduled sync.
  • Sync only what changed, use the bulk API and an indexer on schedule, and check prices with a test matrix before customers do.

How SAP Business One decides a price

When a sales employee adds an item to an order, SAP Business One looks for a price in a fixed order and stops at the first match. With the default "Effective Price" setting, the order is:

  1. Blanket agreement. A price agreed in a contract with this customer beats everything else.
  2. Special price for the business partner. A fixed price or discount for one customer and one item. It can carry its own date ranges and quantity breaks.
  3. Discount group. A percentage for a group of items, for example everything from one manufacturer or item group. It only supplies a discount, so SAP keeps looking for a price to apply it to.
  4. Period and volume discount. Date-limited prices and quantity breaks, defined per price list.
  5. Price list. The base price from the list assigned to the customer.

Two details here affect the shop directly.

Each customer has one price list. Period and volume discounts hang off that price list, so a customer only ever sees the discounts of their own list.

The "Effective Price" setting can change the rules. On the business partner (and globally under General Settings), SAP can be set to pick the lowest or highest price from all sources instead of using the priority order. Check which mode your company uses before you design the sync. It changes the answer.

In the database, special prices sit in tables OSPP (header), SPP1 (date ranges) and SPP2 (quantity breaks). Period and volume discounts for a price list use the same tables, with a card code of * plus the price list number, for example *1 for price list 1. Through the Service Layer, both appear in the SpecialPrices entity.

Where those prices go in Magento

Magento has no idea what a price list or a business partner is. It has products, customer groups and a handful of price types. The job is to map one model onto the other.

SAP Business OneMagento equivalentNotes
Base price list (e.g. retail)Product priceOne list becomes the default price per website
Other price lists (wholesale, dealer, export)One customer group per price list, with a group price (tier price at quantity 1)Assign each Magento customer to the group that matches their SAP price list
Volume discounts (quantity breaks)Tier prices per customer groupTier prices have no date fields
Period discounts (date ranges)Catalog price rule with from/to dates, or a scheduled sync that swaps tier prices on the start and end datespecial_price has dates but applies to every customer group
Discount groups (% per item group or manufacturer)Catalog price rule filtered by attribute and customer groupKeep the item group or manufacturer as a product attribute
Special prices for one customerCustomer-specific price module, or a shared catalogue per company on Adobe Commerce B2BMagento Open Source has no per-customer price out of the box
Blanket agreementsUsually left in SAPRarely worth mirroring in the shop

If several prices apply to the same product, Magento always shows the lowest one: base price, special price, tier price, catalog rule, whichever is cheapest. SAP's default mode does the opposite, taking the most specific price even when it's higher.

Say a customer has a special price of €10 in SAP, while their price list's volume discount drops to €9.50 at 50 units. SAP charges €10, because the special price wins. Magento, given both, charges €9.50. That's the gap from the opening example.

So let the sync decide. Work out the effective price with SAP's rules, then send Magento one price per customer group, quantity break and date range, and nothing else.

Reading prices from SAP, writing them to Magento

The examples below use the SAP Business One Service Layer and the Magento REST API. Hostnames, credentials and codes are placeholders.

1. Log in to the Service Layer and read the price data

SL=https://sap-host:50000/b1s/v1

# Start a session (the cookie holds the session ID)
curl -s -c sl.cookie -X POST "$SL/Login" \
  -H "Content-Type: application/json" \
  -d '{"CompanyDB":"SBO_DEMO","UserName":"api_user","Password":"***"}'

# All price-list prices for one item
curl -s -b sl.cookie "$SL/Items('A00001')?\$select=ItemCode,ItemPrices"

# Special prices for one customer, with date ranges and quantity breaks
curl -s -b sl.cookie "$SL/SpecialPrices?\$filter=CardCode eq 'C20000'"

# Period and volume discounts defined on price list 2
curl -s -b sl.cookie "$SL/SpecialPrices?\$filter=CardCode eq '*2'"

For a real sync you'd page through results with $top and $skip and only fetch what changed since the last run.

2. Work out the effective price per customer, quantity and date

This is the part that needs to follow SAP's priority order. In simplified form:

def effective_price(customer, item, qty, day):
    """Return the price SAP would charge, using default priority."""
    special = find_special_price(customer.card_code, item, qty, day)
    if special is not None:
        return special                      # customer special price wins

    base = price_list_price(customer.price_list, item)
    period_volume = find_special_price(f"*{customer.price_list}", item, qty, day)
    price = period_volume if period_volume is not None else base

    discount = discount_group_percent(customer.card_code, item)
    return round(price * (1 - discount / 100), 2)

The helper functions read from the data you fetched in step 1. Customers without special prices or customer-level discount groups share the result of their price list, so you can calculate those once per customer group. Only customers with their own special prices need individual results, which go to the customer-specific price module. If your company uses the "lowest price" mode instead, replace the early return with a min() over all sources.

3. Write the results to Magento as tier prices

curl -s -X POST "https://shop.example.com/rest/V1/products/tier-prices" \
  -H "Authorization: Bearer $MAGENTO_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"prices": [
        {"sku": "A00001", "price": 9.50, "price_type": "fixed",
         "website_id": 0, "customer_group": "Wholesale", "quantity": 1},
        {"sku": "A00001", "price": 8.90, "price_type": "fixed",
         "website_id": 0, "customer_group": "Wholesale", "quantity": 50}
      ]}'

POST adds or updates the prices you send. PUT on the same endpoint replaces all tier prices for the SKUs in the request, which is useful when a quantity break was deleted in SAP and has to disappear from the shop too.

When the price matrix gets big

Price data grows faster than people expect. Take 5,000 SKUs, 12 price lists and 3 quantity breaks each. That's 180,000 tier price rows before a single customer-specific price. Add 200 customers with their own special prices and you're past a quarter of a million rows.

Magento's database copes with that easily. The trouble starts when the sync pushes all of it every hour. A few habits help:

Sync changes, not everything. Keep a hash of the last price you sent per SKU, group and quantity, and only send rows whose hash changed. A nightly full comparison can catch anything the delta sync missed.

Send large batches asynchronously. Magento's bulk API queues the work instead of making the sync wait for each request:

# One HTTP call, many requests, processed by the queue
curl -s -X POST "https://shop.example.com/rest/async/bulk/V1/products/tier-prices" \
  -H "Authorization: Bearer $MAGENTO_TOKEN" \
  -H "Content-Type: application/json" \
  -d @tier-price-batches.json

# Make sure a consumer is processing the queue
bin/magento queue:consumers:start async.operations.all

Keep the price indexer on schedule. With "Update on Save", every price change reindexes inside the API request. Under a big import that means slow syncs and locked tables.

bin/magento indexer:set-mode schedule catalog_product_price

Watch the cache. Every changed price invalidates cached product and category pages. A large import in the middle of the day can empty the full-page cache just when traffic is high. Run big price changes overnight, and avoid them entirely during peak weeks (see our peak season checklist).

Mistakes that cause wrong prices, and how to catch them

When a price is wrong, check these first:

1Net vs gross. SAP price lists are usually net. If Magento is set to "Catalog prices include tax", every synced price is off by the VAT rate. Check Stores → Configuration → Sales → Tax → Calculation Settings before the first sync.
2Units of measure. SAP sells a box of 12, the shop sells single pieces, or the other way round. Volume breaks set in boxes turn into nonsense when Magento reads them as pieces. Convert during the sync, and decide which unit the shop sells in.
3Price scope. If Magento's catalog price scope is "Global", you can't have different prices per website. Set it to "Website" (Stores → Configuration → Catalog → Price) if your SAP price lists differ by country or sales channel.
4Time zones on period discounts. A discount that ends on 30 November in SAP may run until 1 a.m. in the shop if the server clock is on UTC. Agree which time zone counts and test the switchover.
5Rounding. SAP and Magento can round differently after a percentage discount. One cent on a unit price becomes €5 on a 500-unit order. Round in one place, during the sync, and send Magento the final figure.

Build a test matrix. Before go-live, and again after every change to pricing in SAP, compare prices across a small grid. A few customers (one per price list, plus some with special prices), a few items, quantities just under and over each break, and dates inside and outside each period. For every combination, write down the price SAP gives on a draft sales quotation and the price the Magento cart shows for the same login and quantity. Thirty rows is often enough to find every class of mistake above.

Automate that comparison once it works. A nightly job that checks the same grid and alerts on any difference will catch a broken price before a customer does.

Frequently asked questions

+Can Magento show customer-specific prices from SAP Business One?
Yes, but not out of the box on Magento Open Source. Price lists map well to customer groups. Prices for individual customers need a customer-specific price module, or shared catalogues per company on Adobe Commerce B2B.
+How do SAP volume discounts appear in Magento?
As tier prices: one row per customer group and quantity break. Magento shows them on the product page and applies them in the cart automatically.
+Can Magento handle SAP period discounts with start and end dates?
Tier prices have no dates, so use catalog price rules with from and to dates, or schedule the sync to update tier prices when a period starts and ends.
+Why does Magento show a lower price than SAP?
Usually because Magento received more than one price for the same product and picked the lowest. SAP's default setting picks the most specific price instead. Calculate the effective price during the sync and send Magento only that.
+How often should prices sync between SAP Business One and Magento?
Price changes are less frequent than stock changes. A delta sync every 15 to 60 minutes is usually enough, with large updates run overnight.

Need help with SAP prices in Magento?

Ingold Solutions builds and supports the SAP Business One connector for Magento, which syncs prices, including period and volume discounts, along with products, customers, stock and orders. As an SAP Silver Partner and Adobe Solution Partner, we set up both sides: the pricing in SAP and how it shows in the shop.

If your customers keep seeing prices that don't match their invoices, we'll go through your price setup and build the test matrix with you.

Frequency Ask Question

Yes, but not out of the box on Magento Open Source. Price lists map well to customer groups. Prices for individual customers need a customer-specific price module, or shared catalogues per company on Adobe Commerce B2B.

As tier prices: one row per customer group and quantity break. Magento shows them on the product page and applies them in the cart automatically.

Tier prices have no dates, so use catalog price rules with from and to dates, or schedule the sync to update tier prices when a period starts and ends.

Usually because Magento received more than one price for the same product and picked the lowest. SAP’s default setting picks the most specific price instead. Calculate the effective price during the sync and send Magento only that.

Price changes are less frequent than stock changes. A delta sync every 15 to 60 minutes is usually enough, with large updates run overnight.

Latest Post

Gepostet auf Google Google
Inka Möller profile picture
Inka Möller
Google star 1Google star 2Google star 3Google star 4Google star 5Trustindex überprüft, ob die Originalquelle der Bewertung Google ist.
Hat alles super geklappt und ganz unkompliziert.
Gepostet auf Google Google
Rene Emser profile picture
Rene Emser
Google star 1Google star 2Google star 3Google star 4Google star 5Trustindex überprüft, ob die Originalquelle der Bewertung Google ist.
Wir bei Hochzeitsrausch Brautmoden sind sehr zufrieden mit der Zusammenarbeit mit Ingold Solutions. Besonders hervorzuheben sind die schnelle Reaktionszeit und der freundliche Service. Ingold Solutions hat unsere WordPress- und Shopify-Seiten überarbeitet und wichtige Funktionen hinzugefügt, wie zum Beispiel eine Terminbuchungsfunktion. Auch die Migration unserer Geschäftsdaten in die Microsoft 365 Cloud verlief reibungslos und hat unsere Arbeitsabläufe spürbar verbessert. Durch die Integration von SAP Business One sind unsere Online- und Offline-Systeme jetzt optimal aufeinander abgestimmt. Wir können Ingold Solutions für ihre technische Expertise und maßgeschneiderten Lösungen uneingeschränkt empfehlen.
Gepostet auf Google Google
Uwe L profile picture
Uwe L
Google star 1Google star 2Google star 3Google star 4Google star 5Trustindex überprüft, ob die Originalquelle der Bewertung Google ist.
Die Kooperation mit der Ingold Solutions GmbH als unserem Lösungspartner für SAP Business One war für die MIP Consult GmbH eine äußerst positive Erfahrung. Ingold hat uns mit einem maßgeschneiderten Paket beliefert, das ihre umfassende Kenntnis unserer Anforderungen widerspiegelt. Ihr Team hat die SAP-Datenbank effizient konfiguriert, umfangreiche Schulungen angeboten und die Stammdaten sorgfältig hochgeladen, was einen reibungslosen Übergang ermöglichte. Die Implementierung des Multi-Banking-Systems zeugt weiter von ihrer fachlichen Kompetenz und ihrem Engagement für ganzheitliche Lösungen. Die Professionalität und Einsatzbereitschaft von Ingold haben unseren Übergang äußerst effizient gestaltet, und ihre kontinuierliche Unterstützung ist von unschätzbarem Wert. Wir können Ingold Solutions GmbH wärmstens empfehlen für Unternehmen, die erstklassige SAP-Lösungen und exzellenten Service.
Gepostet auf Google Google
Dawid Telesinski profile picture
Dawid Telesinski
Google star 1Google star 2Google star 3Google star 4Google star 5Trustindex überprüft, ob die Originalquelle der Bewertung Google ist.
Ingold Solutions GmbH hat für Numiartis eine effiziente Lösung entwickelt, die als B2B-E-Commerce-Portal und Online-Katalog dient und B2C-Bestellungen vereinfacht. Das verbesserte Design ermöglicht eine reibungslose Navigation und effiziente Kundenregistrierung, was zur Kundengewinnung beiträgt. Dank der Magento Open Source Plattform ist auch die Produkt-Navigation optimiert worden. Wir sind sehr zufrieden mit dem bedeutenden Beitrag von Ingold Solutions zur digitalen Erweiterung unseres Unternehmens.
Gepostet auf Google Google
Attila Totos profile picture
Attila Totos
Google star 1Google star 2Google star 3Google star 4Google star 5Trustindex überprüft, ob die Originalquelle der Bewertung Google ist.
Ingold Solutions proved to be an invaluable partner for Pyronova IS Deutschland GmbH during our recent implementation. Their team seamlessly configured our accounting system, and their expertise was evident as they provided a dedicated German accounting expert, ensuring precise setup tailored to our needs. Furthermore, Ingold's commitment to customization shone through as they worked on seamless and precise configuration of our accounting system within SAP Business One. This addon will undoubtedly elevate our financial operations. Their professionalism, expertise, and dedication to our project's success were exemplary. We highly recommend Ingold Solutions for their exceptional service and comprehensive support throughout our implementation process. Attila Totos Head of Finance Dep. Pyronova
Gepostet auf Google Google
Thomas Schneider profile picture
Thomas Schneider
Google star 1Google star 2Google star 3Google star 4Google star 5Trustindex überprüft, ob die Originalquelle der Bewertung Google ist.
Von Anfang an beeindruckte uns Ingold Solutions mit ihrer Umsetzung von SAP Business One. Sie erfüllten effizient unseren Bedarf an Benutzerlizenzen und integrierten diese in die robuste Infrastruktur von Cloudiax's Private Cloud. Unsere Entscheidung für das Standardpaket wurde dank Ingold Solutions' Geschäftsblueprint-Vorlage präzise umgesetzt, was zu einer perfekten Datenbankkonfiguration führte und unsere Betriebsstruktur optimierte. Ingold Solutions bot mit ihrer Expertise wertvolle Unterstützung. Ihr technisches Team sorgte nicht nur für die richtigen Änderungen, sondern integrierte sie auch nahtlos in die Cloudiax-Umgebung. Die von Ingold Solutions eingesetzten Technologien - von der Private Cloud in Cloudiax über SAP B1 mit HANA bis zum SAP Business One Standard Package - zeugen von einem durchdachten Ansatz, der auf betrieblichen Erfolg ausgerichtet ist. Absolut professionell, nur zu empfehlen! winwall GmbH
Gepostet auf Google Google
Markus Beck profile picture
Markus Beck
Google star 1Google star 2Google star 3Google star 4Google star 5Trustindex überprüft, ob die Originalquelle der Bewertung Google ist.
Schnelle und kompetente Umsetzung zu fairen Preisen mit fähigen Mitarbeitern. Danke
Verifiziert von: Trustindex
Trustindex hat bestätigt, dass diese Bewertungen im Google Unternehmensprofil von Ingold Solutions GmbH veröffentlicht wurden. Mehr erfahren