Pricing API
The pricing API is used to retrieve the prices of products from Abacus and display them in the Shopware frontend in real time.
Backup price: When creating a product in Shopware, either through the full product sync, through a PIM integration or manually, a product price is required. We recommend using a default price in Shopware, which is then overwritten by the pricing API when the product is displayed in the storefront. In the unlikely event that the pricing API is not available, the default price will be used. This ensures that the product can still be displayed correctly in the storefront, even if the pricing API is not available.
Pricing API Shopware configuration
To configure the pricing API, go to the Shopware administration and open the Abacus integration plugin configuration.
Two options are available:
- Enable it for not logged in users: This will enable the pricing API for all users that are not logged in.
- Enable it for logged in users: This will enable the pricing API for logged in users
For the logged in users, we are using the abacus debtor number to identify the user which is saved in the custom fields of the customer entity.
Pricing API Abacus configuration
To have guests retrieving prices from Abacus, you need to configure it in the Abacus application settings (621). 
If guest should get prices from a specific customer, you can set the debtor number in the field "Customer number".
Rounding and decimal precision
To prevent inconsistencies between Shopware and Abacus price calculations, we recommend the following settings:
Shopware settings:
- Set decimal precision to 8 decimals
- Disable rounding on position level
- Round only the grand total to 2 decimals and to 0.05 intervals

Frontend display: While you might want to display only 2 decimals in the frontend for better readability, it's crucial to work with 8 decimal precision in the background. This ensures that price calculations remain consistent between Shopware and Abacus, especially when dealing with discounts, taxes, and multiple line items.
💡 Why 8 decimals? Working with higher precision prevents rounding errors that can accumulate across multiple calculations and line items, which could otherwise lead to discrepancies between the two systems.
How does it work in the frontend?
When a product is displayed in the storefront, the pricing API is called to retrieve the prices of the product. We hook into categories and product detail pages to display the prices in the storefront as well as in the cart due to price calculation that can be done in abacus on cart level.
💡 Caching: We recommend to use a dedicated Redis instance for caching shopware in general. We also cache the pricing API results in Redis to improve performance. Prices are cached for 60 minutes for logged in and non-logged in users.
Price cache warmup for guest customers
To ensure optimal performance for not logged in customers, we automatically warm up the cache for product prices every hour. This is done through a scheduled background job: 
Graduated prices(bulk prices)
Graduated prices (bulk prices) can be enabled in the plugin configuration: 
On the storefront, the Shopware shows those prices: 
Graduated prices(bulk prices) in Abacus: 
This feature also works with customer-specific bulk pricing. In such cases, the prices defined for that customer are shown.
Extra data in custom fields
During the pricing API request, the plugin also provides additional data to the storefront, including:
- Abacus price type
- Information on which price type the price came from
- Discount details (if a discount is defined for a specific product)
- Detailed information about the rabate. There are a fields:
- type: percentage or amount
- value: value of the rabate
- discountType: from which price type rabate is came from
- Detailed information about the rabate. There are a fields:
- Price for non-logged-in customers (when a customer is logged in)
- Float price. Net/gross depends on the type of customer group the customer is in
This enables the storefront to display additional information about prices and discounts.
Abacus price type
In an abacus, we have 4 types of prices:
- Standard(list)
- Graduation
- Special
- Action

Standard(list) price type
In abacus: 
In the shopware storefront: 
Shopware API response: 
Graduation price type
In abacus: 
In the shopware storefront: 
Shopware API response: 
Special and Action price type
Those two types of price lists work the same, and in the abacus configuration look: 
In the shopware storefront: 
Shopware API response: 
Discount details
Please note that to all price types, you can also add a rebate and mix price types with rebates (Standard price + graduation rebate, etc.).
Standard price + rebate
In abacus: 
In the shopware storefront: 
Shopware API response: 
Graduation price + percente
In abacus: 
In the shopware storefront: 
Shopware API response: 
Special and Action price type + rabate
In abacus: 
In the shopware storefront: 
Shopware API response: 
Standard price + graduation rabate
In Abacus: 

In the shopware storefront: 
Shopware API response: Please note that in this case, the abacus_price_type will be List because the core prices are coming from the tab "standard" in the abacus, and the rebate is added from the Graduation tab.
Price for non-logged-in customers
If a logged-in customer has a special price set, the price for a non-logged-in customer is stored in the abacus_default_guest_price custom field. 
Fallback prices
In every case, when fetching prices for products won't be possible, and the price is not exist in cache, the plugin sets prices from the Shopware default fields.
