Export Unmanaged Order Summaries with Data Loader

Export your B2B Commerce order summary data out of Salesforce using Data Loader.

  1. Log in to Data Loader.

  2. Select Export.

  3. Enter the credentials for the org where your B2B order summaries are.

  4. Under Select Salesforce Object, select an order summary or a related summary object.

  5. For the extraction target, enter the name of your output CSV file and click Next.

    Example Data Loader file extraction

  6. On the Edit Your Query page, select the fields that you want to export, and under Fields, select the ID that you want to export from. Example data loader query

  7. Add the OrderLifeCycleType = 'UNMANAGED' clause. This clause is required if you want to limit your export to B2B Commerce order summaries.

  8. To edit or create a Where statement when querying data from a summary object rather than an order summary, include the OrderSummaryId.

  9. When you export data periodically, use the CreatedDate field with the SOQL supported values. For example, CreatedDate < LAST_90_DAYS.

    Data Loader generates a query that you can edit.

  10. Click Finish and view the extracted results.

These example queries illustrate how you can export data from order summaries.

ObjectExample Query
OrderSummarySelect Id, CreatedDate, OrderNumber, OrderedDate, OwnerId, Status, TotalAmount, FROM OrderSummary WHERE SalesStoreId = '0ZER00000004Kos' AND OrderLifeCycleType = 'UNMANAGED'
OrderItemSummarySelect Id, CreatedDate, Product2Id, ProductCode, Quantity, Status, Type, UnitPrice FROM OrderItemSummary WHERE OrderSummaryId IN ('1OsR000000002K7KAI')
OrderItemAdjustmentLineSummarySelect Id, Amount, CreatedDate, TotalTaxAmount FROM OrderItemAdjustmentLineSummary WHERE OrderSummaryId IN ('1OsR000000002K7KAI')
OrderItemTaxLineItemSummarySelect Id, Amount, CreatedDate, Rate, Type FROM OrderItemTaxLineItemSummary WHERE OrderSummaryId IN ('1OsR000000002K7KAI')
OrderAdjustmentGroupSummarySelect Id, CreatedDate, TotalAmount, TotalTaxAmount, Type FROM OrderAdjustmentGroupSummary WHERE OrderSummaryId IN ('1OsR000000002K7KAI')
OrderDeliveryGroupSummarySelect Id, CreatedDate, DeliverToCity, DeliverToCountry, EmailAddress, PhoneNumber, TotalAmount FROM OrderDeliveryGroupSummary WHERE OrderSummaryId IN ('1OsR000000002K7KAI')
OrderItemSummaryChangeSelect Id, ChangeOrderItemId, ChangeType, OrderItemSummaryId, Reason FROM OrderItemSummaryChange WHERE OrderSummaryId IN ('1OsR000000002K7KAI')
OrderPaymentSummarySelect Id, CreatedDate, FullName, AuthorizationAmount OwnerId, PaymentMethodId, RefundedAmount, Type FROM OrderPaymentSummary WHERE OrderSummaryId IN ('1OsR000000002K7KAI')