# Edit WIP State — Secondary Account

> Perform Edit WIP State — Secondary Account through Brightree.

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

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

- Handler: `brightree_edit_wip_state_secondary`

## Use in a workflow

Copy this discovered node config, fill params from the input contract, and validate the complete graph. Integration results are available as {{node_id.default.field}}. Check business success before dependent writes; completion alone does not prove business success.

```json

{
  "_group": "Brightree",
  "params": {
    "account_profile": "secondary"
  },
  "handler": "brightree_edit_wip_state_secondary"
}

```

[Action contracts](https://genhealth.ai/docs/workflows/action-contracts.md) · [Run recovery](https://genhealth.ai/docs/workflows/operations.md)

## Inputs

- `sales_order_key` — Sales Order Key (expression, required)
  Required literal value or workflow expression.
- `target_wip_state` — Target Wip State (text, required)
  Required text value.
- `expected_current_wip_state` — Expected Current Wip State (expression, required)
  Required literal value or workflow expression.
- `account_profile` — Account Profile (select)
  Optional selected identifier or value.
  Default: `"secondary"`
  Options: Secondary ("secondary")

## Outputs

- `success` — Success
- `old_state` — Old State
- `new_state` — New State
- `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",
  "required": [
    "sales_order_key",
    "target_wip_state",
    "expected_current_wip_state"
  ],
  "properties": {
    "account_profile": {
      "enum": [
        "secondary"
      ],
      "type": "string",
      "default": "secondary",
      "description": "Optional selected identifier or value.",
      "x-workflow-field-type": "select"
    },
    "sales_order_key": {
      "description": "Required literal value or workflow expression.",
      "x-workflow-field-type": "expression"
    },
    "target_wip_state": {
      "type": "string",
      "description": "Required text value.",
      "x-workflow-field-type": "text"
    },
    "expected_current_wip_state": {
      "description": "Required literal value or workflow expression.",
      "x-workflow-field-type": "expression"
    }
  },
  "additionalProperties": false
}
```

### Output schema

```json
{
  "type": "object",
  "properties": {
    "error": {},
    "success": {},
    "new_state": {},
    "old_state": {}
  },
  "additionalProperties": true
}
```
