---
schema_version: "1"
id: 826bb85a665d6d011882d9c021c4e0570c2f9c6e2962d8cec68c15f208935d8a
title: Ensure Apex Code Works with High Scale Orders for a B2B Store
collection: admin
version: current
locale: en-us
portal_url: https://docs.salesforce.com/admin/current/en-us/commerce/264-0-0/comm_high_scale_order_developer_considerations.md
canonical_url: https://help.salesforce.com/s/articleView?id=commerce.comm_high_scale_order_developer_considerations.htm&release=264.0.0&type=5
source_site: help.salesforce.com
content_type: documentation
content_hash: c1f53a4389e6f3578f2f1601399fafaf9234cc127a3eb1b50eaee6c12395b332
description: If you extended the Commerce_Domain_Checkout_CreateOrder extension point before Summer ’24, it’s possible that your Apex code doesn’t work correctly with the High Scale Orders feature enabled. You must test your existing code to make sure that it works as expected, modifying it as needed. Also, consider how the High Scale Orders feature in general can affect your Apex code.
products:
  - Commerce
  - B2B Commerce
release: "264"
---
# Ensure Apex Code Works with High Scale Orders for a B2B Store

If you extended the Commerce\_Domain\_Checkout\_CreateOrder extension point before Summer ’24, it’s possible that your Apex code doesn’t work correctly with the High Scale Orders feature enabled. You must test your existing code to make sure that it works as expected, modifying it as needed. Also, consider how the High Scale Orders feature in general can affect your Apex code.

### Required Editions

<table class="slds-table slds-table_bordered slds-max-medium-table_stacked slds-m-bottom_small edition"><colgroup><col></colgroup><tbody><tr class=""><td class="slds-cell-wrap" style="vertical-align:top;"><a href="https://help.salesforce.com/s/articleView?id=commerce.comm_editions.htm&amp;language=en_US" target="_blank">View supported editions</a>.</td></tr></tbody></table>

[Which Salesforce Commerce Product Do I Have?](https://help.salesforce.com/s/articleView?id=commerce.comm_what_product.htm&language=en_US)

The High Scale Orders feature can affect your Apex code in these ways.

- The High Scale Orders feature creates OrderSummary objects and uses those objects to create corresponding Order objects. Only fields present in the OrderSummary objects can be reflected to the corresponding Order objects. Some Order fields aren’t available as OrderSummary fields. For example, the ShippingAddress field. Therefore, the resulting Order objects created by the High Scale Orders feature don’t reflect values for the ShippingAddress field. If you’re extending the `Commerce_Domain_Checkout_CreateOrder` extension point, your Apex code must only manipulate Order fields that are available in both the Order and the OrderSummary objects.
- If you’re extending the `Commerce_Domain_Checkout_CreateOrder` extension point, you can manipulate custom fields on Order and OrderSummary objects. Make sure that your Apex code only manipulates custom fields that are the same for both objects. For example, same names and data types.
- When the High Scale Orders feature creates OrderSummary objects, it sets their status to Created.
- When the High Scale Orders feature creates Order objects, it sets their status to Activated, and the status can’t be changed.
- The High Scale Orders feature creates Order objects and OrderSummary objects in the Automated Process user context. If the High Scale Orders feature is disabled, Order object and OrderSummary objects are created using the current shopper’s context.
- When triggering flows on the OrderSummaryCreatedEvent, the system always uses the Automated Process user context.
- When triggering flows on Order creation events, the system uses the Automated Process user context if the High Scale Orders feature is enabled. Otherwise, the system uses the current shopper’s context.