# Group and Summarize Records

> Perform Group and Summarize Records through Odoo.

Source: [https://genhealth.ai/docs/workflows/integrations/odoo/odoo_group_records](https://genhealth.ai/docs/workflows/integrations/odoo/odoo_group_records)

Integration: [Odoo](https://genhealth.ai/docs/workflows/integrations/odoo.md)

- Handler: `odoo_group_records`

- Connection type: `odoo`

## Inputs

- `model` — Model (expression, required)
  Required literal value or workflow expression.
- `match_fields` — Match Fields (json)
  Optional JSON value.
- `domain` — Domain (json)
  Optional JSON value.
- `group_by` — Group By (text, required)
  Required text value.
- `aggregates` — Aggregates (text)
  Optional text value.
  Default: `"__count"`
- `max_records` — Max Records (number)
  Optional numeric value.
  Default: `100`
- `include_archived` — Include Archived (boolean)
  Optional true-or-false value.
  Default: `false`
- `context` — Context (json)
  Optional JSON value.

## Outputs

- `groups` — Groups
- `group_count` — Group Count
- `success` — Success
- `error` — Error
- `error_name` — Error Name
- `status_code` — Status Code

Output schema completeness: `best_effort_declared`

## Safety

- External effect: `write`
- Confirmation recommended: no
- Retry safe: no
- Dry run supported: no

## Schemas

These schemas are first-pass authoring guidance. Runtime validation remains authoritative.

### Input schema

```json
{
  "type": "object",
  "required": [
    "model",
    "group_by"
  ],
  "properties": {
    "model": {
      "description": "Required literal value or workflow expression.",
      "x-workflow-field-type": "expression"
    },
    "domain": {
      "description": "Optional JSON value.",
      "x-workflow-field-type": "json"
    },
    "context": {
      "description": "Optional JSON value.",
      "x-workflow-field-type": "json"
    },
    "group_by": {
      "type": "string",
      "description": "Required text value.",
      "x-workflow-field-type": "text"
    },
    "aggregates": {
      "type": "string",
      "default": "__count",
      "description": "Optional text value.",
      "x-workflow-field-type": "text"
    },
    "max_records": {
      "type": "number",
      "default": 100,
      "description": "Optional numeric value.",
      "x-workflow-field-type": "number"
    },
    "match_fields": {
      "description": "Optional JSON value.",
      "x-workflow-field-type": "json"
    },
    "include_archived": {
      "type": "boolean",
      "default": false,
      "description": "Optional true-or-false value.",
      "x-workflow-field-type": "boolean"
    }
  },
  "additionalProperties": false
}
```

### Output schema

```json
{
  "type": "object",
  "properties": {
    "error": {},
    "groups": {},
    "success": {},
    "error_name": {},
    "group_count": {},
    "status_code": {}
  },
  "additionalProperties": true
}
```
