> For the complete documentation index, see [llms.txt](https://docs.rewst.help/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.rewst.help/documentation/automations/subworkflows/rewst-master-v2-psa-kaseya-get-account-type.md).

# \[Rewst Master v2] PSA-Kaseya: Get Account Type

This workflow retrieves account information from Kaseya BMS, making it a key component for automations that depend on client types or classifications. MSPs can use it for onboarding, tiered service delivery, or billing workflows that require different handling based on account data. It runs a single API call to pull account details, then makes that info available for other workflows, helping standardize and simplify client-specific automation without repeating the same logic.

This workflow contains 1 task.

### Inputs

* **choose\_variable** - string

### Outputs

* **options**: Array of account type.

### Key tasks

* **kaseya\_bms\_list\_accounts**: Kaseya BMS integration: List Accounts

### Jinja example

```jinja
{{
    [
        {
        "id": account_type.accountTypeId,
        "name": account_type.accountType,
        "default": true if account_type.accountTypeId|string in ORG.VARIABLES[CTX.choose_variable]|d else false
        }
        for account_type in TASKS.kaseya_bms_list_accounts.result.result
        if account_type.isActive == true
    ] | sort(attribute="name") | unique(attribute="id")
}}
```

This is used in defining the data alias for account\_type.


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

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

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://docs.rewst.help/documentation/automations/subworkflows/rewst-master-v2-psa-kaseya-get-account-type.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

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.
