How Price Adjustment Works
Admin UI
Go to:
- Admin ->Pricesystem -> Price Adjustment
The form creates a job with:
- target price types (what you want to adjust)
- optional filter by existing price application types
- new price application type (optional override)
- adjustment direction and mode
- adjustment value
- optional new date range (both from/to must be set to create new dated rows; otherwise existing rows are updated)
- optional website scope (applies to customer_price, categoryprice, and product_customer_matrix targets)
- optional conditions (Magento rule conditions)
What Price Types Can Be Adjusted
The current UI exposes these target price type codes:
customer_discountgroup_discountcustomer_pricecategorypricepricelistandbase_pricelistproduct_customer_matrix
Async Execution (Queue)
On submit:
- A record is created in
pricesystem_price_adjustment_jobwith statusqueued. - A message is published to the topic
mageb2b.pricesystem.price_adjustment(payload includesjob_id). - The consumer
mageb2b.pricesystem.price_adjustment.consumerprocesses the job:- sets job status to
processing - applies updates in a database transaction
- updates progress periodically
- sets status to
completed(orfailed)
- sets job status to
Date Range Conflicts
If a job creates a new date range (from/to) for price rows and it would overlap with existing rows, the job can skip those rows and write conflict messages into the job "message" field.
Database Tables
- Jobs:
pricesystem_price_adjustment_job - The job then updates the underlying price tables (customerprice/categoryprice/pricelist/matrix, etc.) depending on the selected target types.
