> ## Documentation Index
> Fetch the complete documentation index at: https://docs.mercurjs.com/llms.txt
> Use this file to discover all available pages before exploring further.

# getOrderGroupDetailWorkflow

> Retrieve one order group with per-order aggregated payment and fulfillment statuses.

Loads an order group with its child orders and computes each order's `payment_status` and `fulfillment_status` from its payment collections and fulfillments. Payment collections and fulfillments are stripped from the response unless the requested fields include them. Triggered by `GET /admin/order-groups/:id` and `GET /admin/orders/:id/order-group`.

## Usage

```ts theme={null}
import { getOrderGroupDetailWorkflow } from "@mercurjs/core/workflows"

const { result } = await getOrderGroupDetailWorkflow(container).run({
  input: {
    order_group_id: "ordgrp_123",
    fields: ["display_id", "total", "orders.display_id"],
  },
})
```

## Input

<ParamField body="order_group_id" type="string" required>The order group to retrieve; fails if not found.</ParamField>
<ParamField body="fields" type="string[]" required>Fields to retrieve; merged with the defaults needed for status aggregation (`orders.items.*`, payment collection and fulfillment timestamps).</ParamField>

## Result

<ResponseField name="result" type="object">The order group with its child orders.</ResponseField>
<ResponseField name="result.orders" type="OrderDetailDTO[]">Child orders, each with computed `payment_status` and `fulfillment_status`.</ResponseField>
