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
NOTE
The patch might become applicable to other versions with new Quality Patches Tool releases. To check if the patch is compatible with your Adobe Commerce version, update the 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:

  1. 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
    
  2. Create a customer.

  3. Run the matchCustomerSegmentProcessor consumer and confirm that the new customer appears in the Matched Registered Customers grid.

  4. Log in as the customer and add a product to the cart from the storefront.

  5. Place an order using the REST API endpoints.

  6. 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:

To learn more about Quality Patches Tool, refer to:

recommendation-more-help
commerce-operations-help-tools