# Create Sales Order for Document

> Perform Create Sales Order for Document through Brightree.

Source: [https://genhealth.ai/docs/workflows/integrations/brightree/brightree_create_sales_order_for_document](https://genhealth.ai/docs/workflows/integrations/brightree/brightree_create_sales_order_for_document)

Integration: [Brightree](https://genhealth.ai/docs/workflows/integrations/brightree.md)

- Handler: `brightree_create_sales_order_for_document`

- Connection type: `brightree`

## Inputs

- `patient_key` — Patient Key (expression, required)
  Required literal value or workflow expression.
- `document_id` — Document Id (expression, required)
  Required literal value or workflow expression.
- `dry_run` — Dry Run (boolean)
  Optional true-or-false value.
  Default: `false`

## Outputs

- `success` — Success
- `patient_key` — Patient Key
- `document_id` — Document Id
- `dry_run` — Dry Run
- `saved` — Saved
- `sales_order_key` — Sales Order Key
- `reused` — Reused
- `message` — Message
- `error` — Error

Output schema completeness: `best_effort_declared`

## Safety

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

## Schemas

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

### Input schema

```json
{
  "type": "object",
  "required": [
    "patient_key",
    "document_id"
  ],
  "properties": {
    "dry_run": {
      "type": "boolean",
      "default": false,
      "description": "Optional true-or-false value.",
      "x-workflow-field-type": "boolean"
    },
    "document_id": {
      "description": "Required literal value or workflow expression.",
      "x-workflow-field-type": "expression"
    },
    "patient_key": {
      "description": "Required literal value or workflow expression.",
      "x-workflow-field-type": "expression"
    }
  },
  "additionalProperties": false
}
```

### Output schema

```json
{
  "type": "object",
  "properties": {
    "error": {},
    "saved": {},
    "reused": {},
    "dry_run": {},
    "message": {},
    "success": {},
    "document_id": {},
    "patient_key": {},
    "sales_order_key": {}
  },
  "additionalProperties": true
}
```
