Loading...

Last updated: Aug 20 2018

Area: Episerver Commerce Applies to versions: 12.6 and higher

Searching for orders using abstractions (Beta)

If you are looking for a quick and easy way to search for IOrderGroup (ICart, IPurchaseOrder, IPaymentPlan), IOrderSearchService is the right choice.

This API finds orders with a specific OrderSearchFilter for a specific TOrderGroup, then returns OrderSearchResults.

OrderSearchFilter

OrderSearchFilter has seven criteria for filtering orders.

  • CreatedFrom: Specifies the time that returned orders were created after.
  • CreatedTo: Specifies the time that returned orders were created before.
  • MarketId: Specifies that only orders created in identified markets should be returned.
  • ModifiedFrom : Specifies the time that returned orders were modified after.
  • ModifiedTo : Specifies the time that returned orders were modified before.
  • StartingIndex: Gets or sets the starting index.
  • RecordsToRetrieve: Gets or sets the number of records to retrieve.

Note: The search is inclusive; begin and end values are included for datetime filters (CreatedFrom, CreatedTo, ModifiedFrom, ModifiedTo).

OrderSearchResults

OrderSearchResults contains a collection of orders found IEnumerable <T> Orders and the number of records found int TotalRecords.

As other abstraction API, you can modify this API using a custom implementation.

Extension methods

You can also use IOrderSearchServiceExtensions to provide convenient extension methods when working with IOrderSearchService.

  • FindCarts
  • FindPurchaseOrders
  • FindPaymentPlans

Do you have feedback on this documentation? Send an email to documentation@episerver.com. For development-related questions and discussions, refer to our Forums on https://world.episerver.com/forum/