# Find or Create Record

> Perform Find or Create Record through Odoo.

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

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

- Handler: `odoo_find_or_create_record`

- Connection type: `odoo`

## Inputs

- `model` — Model (expression, required)
  Required literal value or workflow expression.
- `match_fields` — Match Fields (json, required)
  Required JSON value.
- `domain` — Domain (json)
  Optional JSON value.
- `values` — Values (json)
  Optional JSON value.
- `resolve_names` — Resolve Names (boolean)
  Optional true-or-false value.
  Default: `true`
- `fields` — Fields (expression)
  Optional literal value or workflow expression.
- `include_archived` — Include Archived (boolean)
  Optional true-or-false value.
  Default: `false`
- `context` — Context (json)
  Optional JSON value.

## Outputs

- `record_id` — Record Id
- `record` — Record
- `success` — Success
- `error` — Error
- `error_name` — Error Name
- `status_code` — Status Code
- `created` — Created
- `updated` — Updated
- `match_count` — Match Count
- `match_record_ids` — Match Record Ids

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",
    "match_fields"
  ],
  "properties": {
    "model": {
      "description": "Required literal value or workflow expression.",
      "x-workflow-field-type": "expression"
    },
    "domain": {
      "description": "Optional JSON value.",
      "x-workflow-field-type": "json"
    },
    "fields": {
      "description": "Optional literal value or workflow expression.",
      "x-workflow-field-type": "expression"
    },
    "values": {
      "description": "Optional JSON value.",
      "x-workflow-field-type": "json"
    },
    "context": {
      "description": "Optional JSON value.",
      "x-workflow-field-type": "json"
    },
    "match_fields": {
      "description": "Required JSON value.",
      "x-workflow-field-type": "json"
    },
    "resolve_names": {
      "type": "boolean",
      "default": true,
      "description": "Optional true-or-false value.",
      "x-workflow-field-type": "boolean"
    },
    "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": {},
    "record": {},
    "created": {},
    "success": {},
    "updated": {},
    "record_id": {},
    "error_name": {},
    "match_count": {},
    "status_code": {},
    "match_record_ids": {}
  },
  "additionalProperties": true
}
```
