# Brightree Margin Review integration

> Build workflow automations with 2 public Brightree Margin Review actions.

Source: [https://genhealth.ai/docs/workflows/integrations/brightree-margin-review](https://genhealth.ai/docs/workflows/integrations/brightree-margin-review)

## Available actions

2 actions. Connection types: brightree.

### [Evaluate Sales Order Margin Queue](https://genhealth.ai/docs/workflows/integrations/brightree-margin-review/brightree_evaluate_historical_payment_margin_queue.md)

- Handler: `brightree_evaluate_historical_payment_margin_queue`
- Connection type: `brightree`
- External effect: `write`
- Inputs: `current_status`, `max_orders`, `max_queue_pages`, `orders_created_after`, `history_cutoff`, `dry_run`
- Outputs: `success`, `evaluation_run_id`, `dry_run`, `evaluated_orders`, `evaluated_items`, `matched_items`, `unverified_items`, `error_items`, `updated_orders`, `queue_pages_scanned`, `queue_exhausted`, `order_results`, `error`

Perform Evaluate Sales Order Margin Queue through Brightree Margin Review.

### [Write Sales Order Margin Result](https://genhealth.ai/docs/workflows/integrations/brightree-margin-review/brightree_write_sales_order_margin_result.md)

- Handler: `brightree_write_sales_order_margin_result`
- Connection type: `brightree`
- External effect: `write`
- Inputs: `sales_order_key`, `margin_percent`, `dry_run`
- Outputs: `success`, `status`, `attempted`, `updated`, `sales_order_key`, `verified`, `low_profit_margin`, `margin_percent`, `user_3_value`, `error`, `error_message`

Perform Write Sales Order Margin Result through Brightree Margin Review.
