MonetizationOS Docs

Managing Environments

By default, MonetizationOS includes pre-configured environments for Preview and Live.

These can be edited as needed, and you can add additional environments at any time.

Each environment can use its own payment and identity integrations, or share integrations from other environments, giving you flexibility to configure testing and staging setups that match your organization's workflow.

To add or manage environments, navigate to the Environments section.

If you are using our Brands feature, find the relevant brand in the brands list, then click 'Manage'.

If you're managing a single brand, then selecting the Environments tab will take you to the environments landing page, where you'll see three tabs: Versions, Changes, and Environments.

Versions

The versions tab allows you to manage the current version of your configuration and deploy it to other environments. Full details on this feature can be found in our Managing Versions guide.

Changes

The changes tab details any current changes ready to be published to a new version. Full details on this feature can be found in our Managing Versions guide.

Environments

The environments tab details all of your currently configured environments.

Each card details the environment type, last deployment date, who it was deployed by, and - if you're using brands - which brand the environment is linked to.

Add a New Environment

To add a new environment, click 'Add a New Environment', then enter the following details:

  • Name
  • Environment Type
  • Description (Optional)
  • URL (Optional)

Once configured, click 'Create Environment'.

Your environment will be created and you'll find yourself on the Manage Environment screen. Here you have three tabs: API Keys, Variables & Secrets, and Manage.

API Keys

This tab displays the Secret Keys and Public Keys for your environment.

One of each is generated by default, or you can add up to five more of each by clicking the relevant 'New Key' button.

Once configured, your environment will be available to deploy to. Read our Versions guide for more information.

Variables & Secrets

Variables and secrets allow you to define key-value pairs specific to this brand and environment combination that can be consumed in workflows, enabling you to separate configuration from logic.

Variables defined here will only apply to workflows running in this specific brand-environment combination and will take precedence over variables set at the brand, environment type, or organization level.

Variables are useful for storing configuration values like API endpoints, feature flags, or other settings that are specific to this environment. Secrets are a special type of variable designed for sensitive data like API keys, where the value cannot be viewed once saved.

Creating Variables & Secrets

To add a variable or secret, click 'Add Variable'.

You'll need to provide:

  • Key: The variable name (must start with a letter or underscore, contain only alphanumeric characters and underscores, maximum 64 characters)
  • Value: The variable content (stored as text)
  • Secret: Toggle this on to mark the variable as a secret

When you're ready to save, you can choose:

  • Save: Save the variable and return to the list
  • Save and Add Another: Save the variable and immediately create another one
  • Cancel: Discard changes and return to the list

Variable Precedence

Variables defined at this brand-environment level have the highest precedence and will override any variables with the same key set at the brand, environment type, or organization level.

Using Variables in Workflows

Variables and secrets are accessible in workflows through the env parameter:

export default ({ env }) => {
  console.log(env.SERVICE_URL);

  // Use variables for configuration
  const apiEndpoint = env.API_ENDPOINT;
  const secretKey = env.SECRET_API_KEY;
};

All variables are provided as strings and may be undefined if not set at any level.

Security Considerations

Secrets are designed for sensitive data:

  • Values cannot be viewed in the console once saved
  • Values are not accessible via the admin API
  • Use secrets for API keys, passwords, and other sensitive configuration

Variables are for non-sensitive configuration:

  • Values are visible in the console
  • Use for API endpoints, feature flags, and other non-sensitive settings

Please note: Ensure you use the secret toggle for any sensitive data like API keys or passwords.

Managing Variables & Secrets

To edit a variable or secret, locate it in your variables & secrets list, then click the 'Edit' icon in the actions column.

This will bring up the same screen you used to configure your variable. Make any relevant changes and click 'Save'.

To delete a variable or secret, locate it in your variables & secrets list, then click the 'Delete' icon in the actions column.

You will be prompted to confirm you wish to remove the variable. This action cannot be undone.

To continue, click 'Delete'. Otherwise, click 'Cancel'.

When updating a variable, the change will propagate to all relevant environments automatically.

Manage

This tab allows you to update the details of your environment, or delete the environment if necessary.

Manage an Environment

To manage an existing environment, locate it in your list of environments and click 'Manage'.

This will open the Manage Environment section, where you can edit your API keys, variables & secrets, or general environment details within the relevant tabs.

Once making any relevant changes, click 'Update'.

Delete an Environment

To delete an existing environment, locate it in your list of environments and click 'Manage', then click 'Delete'.

You will be prompted to confirm you wish to delete the environment. Doing so will delete the environment along with all of its data, including deployments, keys, and any customer data associated with it. This step cannot be undone.

If you wish to continue, click 'Delete'. Otherwise, click 'Cancel'.