Get orders by Order Status in Litium 8

How do I get orders on order status in Litium 8?

For example in an ERP integration there is a need to get for all orders in confirmed and send them to the ERP.
The need for retries here is important, both if there is an error in the ERP, in Litium, a service is down or an event is missed etc.

I can’t figure out the best way now when the order state is moved to it’s own service.

Litium version: 8

1 Like

You can use the dataservice and create a query to retrieve all orders by state, something like this:

using var q = _dataService.CreateQuery<SalesOrder>()
                    .Filter(f => f.Status(new[] { OrderState.Confirmed }))
                    .Sort(descriptor => descriptor.OrderNumber(Data.Queryable.SortDirection.Descending));
                orders = q.ToList();

I can only find “f.Status” in Litium.Websites.Queryable; not in Litium.Sales.Queryable;
Is it different for you?

This is a feature that is added in the 8.1.0 Prerelease (

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.