Orders
Orders
The order APIs provide the following capabilities. Manage (create, read, update, delete) shopping carts, payment plans, and purchase orders Manage order components (forms, shipments, payments, order addresses, and line items) Process orders Validate line items Update prices Apply discounts Process payments Adjust inventory Customize the calculations of costs and taxes To learn more about headless APIs for Commerce Connect, see the Content Delivery Guide https //docs.
Multi-site orders
For customers upgrading their sites to use the new site functionality with historical orders, old orders must have the site ID properly set. Use the following scripts as a starting point.
Order system overview
You should avoid casting back and forth between concrete Order classes such as OrderGroup and OrderForm, and abstraction interfaces such as IOrderGroup and IOrderForm. For example, you should use only one API from the time you load a cart or purchase order until you save it.
Order manipulation
Manipulation of purchase orders and related items is based on classes and methods in the EPiServer. Commerce.
Order processing
Processing of purchase orders and related items is based on classes and methods in the EPiServer. Commerce.
Extend order classes
The order system default implementation contains many classes that you can extend with your own fields. This means that you can customize fields to all order objects to help with your business use cases.
Extend order status
In previous Commerce Connect versions, OrderStatus and OrderShipmentStatus were enums, so could not be extended. In Commerce Connect 13, a breaking change converted OrderStatus and OrderShipmentStatus from enums to classes.
Change default implementation
When working with the Optimizely Commerce Connect order system, update the dependency container to replace implementations to use your classes. See Dependency injection https //docs.
Round totals for currencies
Rounding is complex because different currencies use different numbers of decimal places. The following methods return a value with the correct number of decimals, which is determined by the input currency.
Record order activities
A wide range of events related to order/shipment status update, payment, and promotion of an order will be automatically recorded, and users can view them in the Order Notes section in the Order Management view. OrderActivity logs order activities from the Order Management (CSR).
Shopping carts
The shopping cart (or basket) is where the shopping and ordering process starts. The main components of a shopping cart using the abstraction APIs are described in this topic.
Serializable carts
In the SerializedCarts data model, all cart data is stored in one table, SerializableCart . This table contains these defined and searchable columns CartId Created Modified Name CustomerId MarketId (Commerce Connect 11.
Search for orders using OrderContext
This topic describes how to work with the order search API, including The capabilities and limitations of Optimizely Commerce Connect order search API classes and properties Code examples of different scenarios Description of the search stored procedure Searching for orders is a common part of ecommerce solutions, such as integrating with ERPs and custom administrative interfaces where orders are exported, filtered, or edited. You often need to load orders based on submission date, status, or particular properties or meta-field properties of the order or cart, including properties of its child objects (for example, shipments or line items).
Search for orders using abstractions
This API finds orders with a specific OrderSearchFilter for a specific TOrderGroup , then returns OrderSearchResults . OrderSearchFilter has a criteria set for filtering orders in the search results.
Calculate orders
The following calculation services are available to calculate order totals in different levels. Line item calculator https //docs.