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.
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.
Did this article solve your issue?
Let us know so we can improve!
Loading
Salesforce Help | Article
Cookie Consent Manager
General Information
Required Cookies
Functional Cookies
Advertising Cookies
General Information
We use three kinds of cookies on our websites: required, functional, and advertising. You can choose whether functional and advertising cookies apply. Click on the different cookie categories to find out more about each category and to change the default settings.
Privacy Statement
Required Cookies
Always Active
Required cookies are necessary for basic website functionality. Some examples include: session cookies needed to transmit the website, authentication cookies, and security cookies.
Functional Cookies
Functional cookies enhance functions, performance, and services on the website. Some examples include: cookies used to analyze site traffic, cookies used for market research, and cookies used to display advertising that is not directed to a particular individual.
Advertising Cookies
Advertising cookies track activity across websites in order to understand a viewer’s interests, and direct them specific marketing. Some examples include: cookies used for remarketing, or interest-based advertising.