# Process Sales Order Templates

> Perform Process Sales Order Templates through Brightree.

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

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

- Handler: `brightree_process_sales_order_templates`

- Connection type: `brightree`

## Inputs

- `sales_order_key` — Sales Order Key (expression)
  Optional literal value or workflow expression.
- `account_key` — Account Key (text)
  Optional text value.
- `runs` — Runs (number)
  Optional numeric value.
  Default: `1`
- `use_local_agent` — Use Local Agent (boolean)
  Optional true-or-false value.
  Default: `false`
- `http_only` — Http Only (boolean)
  Optional true-or-false value.
  Default: `true`
- `job_id` — Job Id (expression)
  Optional literal value or workflow expression.
- `insurance_name` — Insurance Name (text)
  Optional text value.
- `patient_key` — Patient Key (expression)
  Optional literal value or workflow expression.
- `patient_note_key` — Patient Note Key (expression)
  Optional literal value or workflow expression.

## Outputs

- `success` — Success
- `sales_order_key` — Sales Order Key
- `successful_runs` — Successful Runs
- `failed_runs` — Failed Runs
- `skipped_runs` — Skipped Runs
- `outcome_category` — Outcome Category
- `outcome_reason` — Outcome Reason
- `failure_stage` — Failure Stage
- `skip_reason` — Skip Reason
- `templates_created` — Templates Created
- `needs_reconciliation` — Needs Reconciliation
- `reconciliation_summary` — Reconciliation Summary
- `order_profile` — Order Profile
- `template_decision` — Template Decision
- `manual_review_required` — Manual Review Required
- `manual_review_attempted` — Manual Review Attempted
- `manual_review_marked` — Manual Review Marked
- `manual_review_reason` — Manual Review Reason
- `manual_review_blocked` — Manual Review Blocked
- `manual_review_block_reason` — Manual Review Block Reason
- `manually_resolved` — Manually Resolved
- `manually_resolved_runs` — Manually Resolved Runs
- `attempt_failed_runs` — Attempt Failed Runs
- `error` — Error

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",
  "properties": {
    "runs": {
      "type": "number",
      "default": 1,
      "description": "Optional numeric value.",
      "x-workflow-field-type": "number"
    },
    "job_id": {
      "description": "Optional literal value or workflow expression.",
      "x-workflow-field-type": "expression"
    },
    "http_only": {
      "type": "boolean",
      "default": true,
      "description": "Optional true-or-false value.",
      "x-workflow-field-type": "boolean"
    },
    "account_key": {
      "type": "string",
      "description": "Optional text value.",
      "x-workflow-field-type": "text"
    },
    "patient_key": {
      "description": "Optional literal value or workflow expression.",
      "x-workflow-field-type": "expression"
    },
    "insurance_name": {
      "type": "string",
      "description": "Optional text value.",
      "x-workflow-field-type": "text"
    },
    "sales_order_key": {
      "description": "Optional literal value or workflow expression.",
      "x-workflow-field-type": "expression"
    },
    "use_local_agent": {
      "type": "boolean",
      "default": false,
      "description": "Optional true-or-false value.",
      "x-workflow-field-type": "boolean"
    },
    "patient_note_key": {
      "description": "Optional literal value or workflow expression.",
      "x-workflow-field-type": "expression"
    }
  },
  "additionalProperties": false
}
```

### Output schema

```json
{
  "type": "object",
  "properties": {
    "error": {},
    "success": {},
    "failed_runs": {},
    "skip_reason": {},
    "skipped_runs": {},
    "failure_stage": {},
    "order_profile": {},
    "outcome_reason": {},
    "sales_order_key": {},
    "successful_runs": {},
    "outcome_category": {},
    "manually_resolved": {},
    "template_decision": {},
    "templates_created": {},
    "attempt_failed_runs": {},
    "manual_review_marked": {},
    "manual_review_reason": {},
    "needs_reconciliation": {},
    "manual_review_blocked": {},
    "manual_review_required": {},
    "manually_resolved_runs": {},
    "reconciliation_summary": {},
    "manual_review_attempted": {},
    "manual_review_block_reason": {}
  },
  "additionalProperties": true
}
```
