# Select Sales Order Templates

> Perform Select Sales Order Templates through Brightree.

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

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

- Handler: `brightree_select_sales_order_templates`

- Connection type: `brightree`

## Inputs

- `account_key` — Account Key (text)
  Optional text value.
- `classification` — Classification (text)
  Optional text value.
- `confirm_date_after` — Confirm Date After (date)
  Optional date in YYYY-MM-DD format.
- `confirm_date_lookback_days` — Confirm Date Lookback Days (number)
  Optional numeric value.
  Default: `90`
- `report_limit` — Report Limit (number)
  Optional numeric value.
  Default: `15000`
- `target_queue_depth` — Target Queue Depth (number)
  Optional numeric value.
  Default: `10`
- `max_dispatch_per_run` — Max Dispatch Per Run (number)
  Optional numeric value.
- `use_local_agent` — Use Local Agent (boolean)
  Optional true-or-false value.
  Default: `false`

## Outputs

- `success` — Success
- `orders_selected` — Orders Selected
- `order_keys` — Order Keys
- `queue_depth_before` — Queue Depth Before
- `queue_headroom` — Queue Headroom
- `target_queue_depth` — Target Queue Depth
- `source_system` — Source System
- `source_report_name` — Source Report Name
- `source_report_base_url` — Source Report Base Url
- `source_account_key` — Source Account Key
- `source_filter_summary` — Source Filter Summary
- `source_filter_rows` — Source Filter Rows
- `source_confirm_date_after_configured` — Source Confirm Date After Configured
- `source_confirm_date_after_effective` — Source Confirm Date After Effective
- `source_confirm_date_lookback_days` — Source Confirm Date Lookback Days
- `raw_count` — Raw Count
- `deduped_count` — Deduped Count
- `candidate_count` — Candidate Count
- `text_filter_candidate_count` — Text Filter Candidate Count
- `dispatchable_count` — Dispatchable Count
- `recently_excluded` — Recently Excluded
- `in_flight_excluded` — In Flight Excluded
- `exhausted_excluded` — Exhausted Excluded
- `verification_excluded` — Verification Excluded
- `verification_excluded_order_keys` — Verification Excluded Order Keys
- `not_processed_orders` — Not Processed Orders
- `not_processed_omitted_count` — Not Processed Omitted Count
- `not_processed_seen_count` — Not Processed Seen Count
- `exhausted_alert_sent` — Exhausted Alert Sent
- `exhausted_alert_suppressed` — Exhausted Alert Suppressed
- `exhausted_alert_job_id` — Exhausted Alert Job Id
- `report_cap_alert_level` — Report Cap Alert Level
- `report_cap_alert_sent` — Report Cap Alert Sent
- `report_cap_alert_suppressed` — Report Cap Alert Suppressed
- `report_cap_alert_job_id` — Report Cap Alert Job Id
- `message` — Message
- `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": {
    "account_key": {
      "type": "string",
      "description": "Optional text value.",
      "x-workflow-field-type": "text"
    },
    "report_limit": {
      "type": "number",
      "default": 15000,
      "description": "Optional numeric value.",
      "x-workflow-field-type": "number"
    },
    "classification": {
      "type": "string",
      "description": "Optional text value.",
      "x-workflow-field-type": "text"
    },
    "use_local_agent": {
      "type": "boolean",
      "default": false,
      "description": "Optional true-or-false value.",
      "x-workflow-field-type": "boolean"
    },
    "confirm_date_after": {
      "type": "string",
      "format": "date",
      "description": "Optional date in YYYY-MM-DD format.",
      "x-workflow-field-type": "date"
    },
    "target_queue_depth": {
      "type": "number",
      "default": 10,
      "description": "Optional numeric value.",
      "x-workflow-field-type": "number"
    },
    "max_dispatch_per_run": {
      "type": "number",
      "description": "Optional numeric value.",
      "x-workflow-field-type": "number"
    },
    "confirm_date_lookback_days": {
      "type": "number",
      "default": 90,
      "description": "Optional numeric value.",
      "x-workflow-field-type": "number"
    }
  },
  "additionalProperties": false
}
```

### Output schema

```json
{
  "type": "object",
  "properties": {
    "error": {},
    "message": {},
    "success": {},
    "raw_count": {},
    "order_keys": {},
    "deduped_count": {},
    "source_system": {},
    "queue_headroom": {},
    "candidate_count": {},
    "orders_selected": {},
    "recently_excluded": {},
    "dispatchable_count": {},
    "exhausted_excluded": {},
    "in_flight_excluded": {},
    "queue_depth_before": {},
    "source_account_key": {},
    "source_filter_rows": {},
    "source_report_name": {},
    "target_queue_depth": {},
    "exhausted_alert_sent": {},
    "not_processed_orders": {},
    "report_cap_alert_sent": {},
    "source_filter_summary": {},
    "verification_excluded": {},
    "exhausted_alert_job_id": {},
    "report_cap_alert_level": {},
    "source_report_base_url": {},
    "report_cap_alert_job_id": {},
    "not_processed_seen_count": {},
    "exhausted_alert_suppressed": {},
    "not_processed_omitted_count": {},
    "report_cap_alert_suppressed": {},
    "text_filter_candidate_count": {},
    "verification_excluded_order_keys": {},
    "source_confirm_date_lookback_days": {},
    "source_confirm_date_after_effective": {},
    "source_confirm_date_after_configured": {}
  },
  "additionalProperties": true
}
```
