> 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/rewst-documentation/documentation/automations/organization-variables.md).

# Organizations and organization variables

## What is an organization?

A group or entity within the Rewst platform that may have its own variables, forms, workflows, and users, *organizations* enable management and customization of the platform according to specific customer needs. You'll see us refer to an organization as an *org* for short.&#x20;

Rewst uses a two-tier system to manage organizations, with your MSP as the *parent org* and your customers as *child orgs*. To make automations work for your managed clients or customers, set them up as child orgs. Each time you bring on a new customer account, you'll need to add a corresponding child org in Rewst to enable automations for them.&#x20;

<figure><img src="https://content.gitbook.com/content/h0G0em3PH6aDfPoI5XpN/blobs/EntJugrNC8klxz3e0WBr/image%20(48).png" alt=""><figcaption></figcaption></figure>

Use the organization selector to choose the organization to be in at any given moment. Find the selector in the top right corner of your Rewst instance. Click and choose the organization from the drop-down. Type into the search bar to narrow down your list of available organizations.<br>

<figure><img src="https://3039672601-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fh0G0em3PH6aDfPoI5XpN%2Fuploads%2FeVhIRBdDMK4sBpsFwP4Q%2FScreenshot%202026-10-29%20at%202.21.03%E2%80%AFPM.png?alt=media&amp;token=7f67ad6a-73fe-4a50-b026-516a6b2d9713" alt=""><figcaption></figcaption></figure>

## What is an organization variable?

*Organization variables*, referred to as *org variables* for short, serve as the foundational elements for setting and managing configurations across different organizational levels within Rewst. They ensure consistency and control within workflows, and facilitate efficient management across the organizational hierarchy.&#x20;

For example, you could save a variable called `default_timezone = America/Chicago`. Every workflow that needs a time zone would read that variable instead of having the value written separately into each workflow.

### How are org variables used in Rewst?

* Workflows read org variables by name. They can also read, set, list or delete them as a step.
* When an MSP runs a workflow for different child organizations, the workflow automatically uses the active value. One workflow can therefore behave correctly for every child organization
* At the top, parent MSP organization level you can set a shared default that all child organizations inherit. You can then override it for specific child orgs. If a child org has its own value, that value is used; otherwise the shared default is used.

### Types of org variables

There are two categories of organization variables in Rewst:

&#x20; 1\. General: normal values such as text, numbers, or lists, which anyone with access can see

&#x20; 2\. Secret: sensitive values such as passwords or API keys; these are stored encrypted, can never be    viewed again after saving, and are only unlocked while a workflow runs.&#x20;

## **View all organization variables in Rewst**

Navigate to **Automations > Org Variables** in the left side menu of your Rewst platform to manually manage your organization variables. In this page, view a total list of all org variables for your selected organization. Note that org variables are visible only one level deep - you'll see them for a child org of a parent org, but not the child org of that child org, for example.

When unpacking Crates, you may be prompted to fill out forms within those Crates to set up your organization variables. Once the form is submitted, the variables will appear in this total list. Likewise, and org variables created by the Rewst Agent on your behalf will be listed here.&#x20;

Filter the list by using the **Search** field or **Categories** drop-down filter, to specify your criteria by **General** or **Secret** org variable statuses.

<figure><img src="https://3039672601-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fh0G0em3PH6aDfPoI5XpN%2Fuploads%2FpjJIcQsptaV7Kx9qZeVn%2FScreenshot%202026-08-20%20at%203.07.58%E2%80%AFPM.png?alt=media&amp;token=bd206ba8-450e-4f48-b6e1-0d0fc9519325" alt="Screenshot of the Organization Variables page in Rewst Settings, showing a dark-themed interface with a left navigation menu, a top search bar, and a table listing variable names, values, categories, organizations, creation dates, default indicators, and action icons for editing or deleting variables."><figcaption><p>The Org Variables submenu of the Rewst platform</p></figcaption></figure>

## Org variable setup

The Rewst Agent will create org variables for you as it builds your workflows and automations. The below guidance and steps are for when you wish to create your own org variables.

{% hint style="warning" %}
The Rewst agent can only do what your account has permission to do. If you don't have permissions to edit org variables in Rewst, it can't either.
{% endhint %}

### **Org variable naming conventions**

* Employ descriptive and straightforward wording using `snake_case` for clarity.
* Prefix integration-specific variables appropriately, like `psa_` for PSA-related variables.

{% hint style="info" %}
When defining boolean values, always use lowercase `true` or `false` to align with Rewst's standardized practices. This uniform approach also applies to all future workflow designs.&#x20;
{% endhint %}

### Manually add a new organization variable

1. Navigate to **Automations > Org Variables** in the left side menu of your Rewst platform.
2. Click **+ New Variable**.&#x20;
3. Enter the information for your variable into the relevant fields in the dialog that appears.
   1. **Name** - Enter the name for your org variable, which should be unique and follow Rewst's naming conventions
   2. **Value** - Enter the value for the org variable
   3. **Description** - Give a brief explanation for what the org variable does
   4. **Category** - Choose from **General** for a normal org variable, or **Secret** to ensure that whatever text you enter into the Value field will be its secret
4. Click **Create** to save your org variable when done. Alternatively, click <img src="https://content.gitbook.com/content/h0G0em3PH6aDfPoI5XpN/blobs/mTVLYXMlfU2BCVrkYeFC/Screenshot%202025-06-13%20at%204.59.23%E2%80%AFPM.png" alt="" data-size="line">to cancel the creation of the org variable.

<figure><img src="https://3039672601-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fh0G0em3PH6aDfPoI5XpN%2Fuploads%2FQ7C2SwAsXYoObh1piQ1q%2FScreenshot%202026-08-20%20at%202.23.26%E2%80%AFPM.png?alt=media&amp;token=360d308c-3b05-49fb-9275-59590e4262b9" alt=""><figcaption></figcaption></figure>

## Edit or delete existing organization variables

* Click on the name of any org variable to open its dialog and edit its properties.
* Click <img src="https://3039672601-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fh0G0em3PH6aDfPoI5XpN%2Fuploads%2F2miBdv8A7bFAx94DZusF%2FScreenshot%202026-08-20%20at%203.10.43%E2%80%AFPM.png?alt=media&amp;token=f3ba9ee0-980e-4ca4-ba9f-8470fe64e21e" alt="" data-size="line">to the right of an individual org variable to delete it.
* Click <img src="https://3039672601-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fh0G0em3PH6aDfPoI5XpN%2Fuploads%2FYRhni6NWCckFgDW9f6Tw%2FScreenshot%202026-08-20%20at%203.12.47%E2%80%AFPM.png?alt=media&amp;token=f7fe354d-c59b-48ae-bc33-a10bd599dde8" alt="" data-size="line"> to the right of an individual org variable to revert it to its inherited value.

{% hint style="info" %}
When the Rewst agent test-runs a workflow, any changes that workflow makes to org variables are discarded afterwards. Changes stick only in a real run that you've explicitly approved.
{% endhint %}

## **Inheritance and overrides**

*Inheritance*: Values set at the parent organization level cascade down, providing a default setup for all child organizations.

*Overrides*: Child organizations can establish their own variables, prioritizing local settings over defaults inherited from their parent organization. Overrides don't cascade down to suborganizations of child organizations. They exist just for that one child org where they are set.

For example, consider a scenario where you have three layers of organizations:

**Parent > Child 1 > Child of Child 1**.

If you create a workflow at the parent level and run the workflow via trigger as Child of Child 1, the organization variable value will come from the parent, not the Child 1 organization.&#x20;

<figure><img src="https://content.gitbook.com/content/h0G0em3PH6aDfPoI5XpN/blobs/ytUDWkw0sACU8sMKLNwp/Org%20variable%20child%20of%20child%20graphic.png" alt=""><figcaption></figcaption></figure>

## **Use custom org variables to standardize client workflows**

Creating your own org variables enables you to build logic into your custom workflows so that you don't need to hardcode values within workflows.

For example, instead of hardcoding a client's service tier as `gold` directly in a workflow, you can create a `service_tier` org variable, reference that variable wherever the tier is needed across automations, and update the org variable in one place if the names of service tiers change.

Once you've set your org variables, your workflows can reference them to run automation selectively — for example, only triggering managed-client workflows where `is_managed` is `true`.

## **Use as default feature**

The *use as default* feature allows managing organizations to set a universal default value for an org variable. This default is applied to child organizations unless they specify their own value.

### **How use as default works**

* **Set a default**: When you set a variable as default at the top parent level, it becomes the fallback for child organizations without a specified value.
* **Workflow execution context**:
  * The default value is only used if the workflow is initiated from the managing organization.
  * To apply the default value to Client A, the workflow must start from the top parent MSP organization, even if it operates within Client A’s context.
* **Triggers and context**:
  * Implementing triggers in the workflow ensures that the execution context is recognized. This facilitates the use of parent-level defaults in child workflows.


---

# 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/rewst-documentation/documentation/automations/organization-variables.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.
