Loading

B2B / D2C Commerce - Checkout Process Update – Summer '25 Release - CartCheckoutSession.OrderId not available for automations during Order Summary Create

Julkaisupäivä: May 15, 2025
Kuvaus

In the Summer '25 release, our product team has optimised the checkout process to enhance efficiency in DML operations for order creation.

  • Previous Process (Before Summer '25 Release): Create Order -> Set OrderId in CheckoutSession -> Create Order Summary -> Change Cart Status & Save Cart
  • Optimized Process (Summer '25 Release): Create Order -> Create Order Summary -> Save Cart Graph with CheckoutSession.OrderId and new cart status

As a result: CartCheckoutSession.OrderId will not be available for triggers or flows until the Order Summary record is committed to the database.

ACTION REQUIRED: Update Your Existing Automations.

 If you have Apex triggers, Flows, or other automations that operate on Order Summary creation:

  1. Identify Logic: Review any code that attempts to use CheckoutSession.OrderId to retrieve cart information after the Order Summary process has begun.
  2. Update Logic: Modify this logic to instead read the OrderSummary.ExternalReferenceIdentifier field.
    Format of OrderSummary.ExternalReferenceIdentifier: CheckoutPlaceOrder_<cartId>_<orderReferenceNumber> This format directly links the Cart and Order Reference Number.
  3. Parse the Identifier: Extract the <cartId> and <orderReferenceNumber> from this string. For example, in Apex, you can use String.split('_') and access the parts by their index.

Note for High-Scale Order Ingestion (HSOI): For orgs with HSOI enabled, the CheckoutSession.OrderId (on Cart) and related direct OrderReferenceNumber fields (on OrderSummary or associated objects, if previously populated this way) will not be populated. Parsing OrderSummary.ExternalReferenceIdentifier is the only method to retrieve the cartId in these scenarios.

    Ratkaisu

    To improve efficiency, use the OrderSummary.ExternalReferenceIdentifier field, which already contains both the Cart ID and Order Reference Number.

    • Format of OrderSummary.ExternalReferenceIdentifierCheckoutPlaceOrder_<cartId>_<orderReferenceNumber>
    Knowledge-artikkelin numero

    004811112

     
    Ladataan
    Salesforce Help | Article