ACP2E-4591: Customer segments based on order count, such as “First-time buyers”, do not update for orders placed through the REST API
The ACP2E-4591 patch fixes the issue where customer segments based on order count, such as “First‑time buyers”, do not update when orders are placed via the REST API due to the absence of a customer session. This patch is available when the Quality Patches Tool (QPT) 1.1.78 is installed. The patch ID is ACP2E-4591. Please note that this issue is scheduled to be fixed in Adobe Commerce 2.4.9.
Affected products and versions
The patch is created for Adobe Commerce version:
- Adobe Commerce (all deployment methods) 2.4.7-p4
Compatible with Adobe Commerce versions:
- Adobe Commerce (all deployment methods) 2.4.4 - 2.4.7-p9
magento/quality-patches package to the latest version and check the compatibility on the Quality Patches Tool: Search for patches page. Use the patch ID as a search keyword to locate the patch.Issue
Customer segments based on order count, such as “First‑time buyers,” do not update when orders are placed through the REST API.
Steps to reproduce:
-
Create a customer segment named First User with the following condition:
code language-none If ALL of these conditions are TRUE: Total Number of Orders less than 1 while ALL of these Conditions match: Order Status is Any -
Create a customer.
-
Run the
matchCustomerSegmentProcessorconsumer and confirm that the new customer appears in the Matched Registered Customers grid. -
Log in as the customer and add a product to the cart from the storefront.
-
Place an order using the REST API endpoints.
-
Run the same consumer again.
Expected results:
Customers are removed from the First User segment immediately after placing an order, without relying on the consumer.
Actual results:
The customer remains in the First User segment even after placing an order and running the consumer.
Apply the patch
To apply individual patches, use the following links depending on your deployment method:
- Adobe Commerce or Magento Open Source on-premises: Quality Patches Tool > Usage in the Quality Patches Tool guide.
- Adobe Commerce on cloud infrastructure: Upgrades and Patches > Apply Patches in the Commerce on Cloud Infrastructure guide.
Related reading
To learn more about Quality Patches Tool, refer to:
- Quality Patches Tool: A self-service tool for quality patches in the Tools guide.