# \[Rewst Master v2] PSA-Halo: Get Company Status

This workflow functions as a foundational component that retrieves company status information from HaloPSA via an authenticated API request, enabling MSPs to access client status data that can be leveraged in conditional automation flows or reporting processes. For MSPs, this building block provides critical value when implementing automated client onboarding/offboarding workflows, performing bulk operations that need to filter by client status, or building dashboards that visualize client portfolio health by status. Technically, the workflow executes a single API call to HaloPSA that returns company status values, making it an efficient method to programmatically access this data without manual PSA interaction, which serves as essential context for status-dependent automation decisions in larger workflow chains.

This workflow contains 1 task.

### Inputs

* **choose\_variable** - string

### Outputs

* **options**: Array of SLAs.

### Key tasks

* **list\_company\_statuses**: HaloPSA integration: HaloPSA API Request

### Jinja examples

#### Example 1

```jinja
{{ [
    {
        "id": companystatus.id,
        "name": companystatus.name,
        "default": true if companystatus.id|string in ORG.VARIABLES[CTX.choose_variable]|d else false
    }
    for companystatus in TASKS.list_company_statuses.result.result
    ]
}}
```

The above Jinja is used for building out the options for the options output.


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.rewst.help/documentation/automations/subworkflows/rewst-master-v2-psa-halo-get-company-status.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
