Addigy Variables let you store reusable values and secrets — like license keys or API tokens — and reference them across your software deployments and Saved Scripts. Instead of hardcoding sensitive values or duplicating them across multiple scripts, you define a variable once and let Addigy insert the right value automatically at deploy time.
Overview
Variables are ideal for IT admins who manage deployments across multiple groups of devices with different configuration needs — for example, organizations that need to deploy the same software with different license keys per department or tenant. Variables allow you to:
- Securely store secrets without exposing them in plain text in your scripts
- Avoid duplicating values across multiple software items
- Define policy-specific overrides so different device groups receive different values automatically
How to Create a Variable
Create your variables before building any Smart Software or Script that references them. A variable must exist in Addigy before it can be selected in a script.
- Navigate to Catalog and select Variables under Resources.
- Click New.
- Enter a Key — this is the name you'll reference in your scripts. Keys must start with a letter and can only contain letters, numbers, and underscores.
- (Optional) Enter a Default Value. This is the value Addigy will use unless a policy override is defined.
- (Optional) Under Policy Overrides, click Add policy variable to assign a different value for a specific policy. Repeat for any additional policies that need unique values.
- Click Save.
Your variable is now available to use in Smart Software installation scripts.
How to Use a Variable in a Smart Software Script
Important: An Addigy Variable must be created before you can add it to a Smart Software script. If you type
$in your script and don't see the variable you're looking for, create it first, then return to the Smart Software item to add it.
- Open or create a Smart Software item in the Catalog.
- In the Installation Command field, type
$where you want to insert the variable. A dropdown will appear showing all available variables. - Select the variable you want to use.
- Save the Smart Software item.
When the software is deployed via a policy, Addigy automatically substitutes the variable with the correct value — using the policy override if one is defined for that policy, or the default value if not.
Deploying Software with Variables
Variables behave differently depending on how the software is deployed:
- Policy deployment: Addigy automatically uses the policy override value if one exists, or the default value otherwise. No additional steps are required.
-
GoLive deployment: You'll be prompted to select which policy's variable value to use — or choose Default — before deploying.
- Self Service: Variables are not supported. Deploying software with variables via Self Service will result in an empty value being passed to the script.
Use a variable in a script
Open a script in the Scripts manager. In the script editor, type $ where you want the value. A list of your variables opens. Select the variable. If you do not see your variable in the list, make sure that you created it in Catalog > Variables. The device will use the variable value from whatever policy it exists in, that has a variable policy mapping.
Frequently Asked Questions
Can I use variables in Scripts or Device Settings?
Not at this time. Variables are currently supported only in Smart Software installation scripts. Support for Scripts and Device Settings is not yet available.
What happens if I don't set a default value?
If a variable has no default value and no matching policy override at deploy time, the variable will resolve to an empty string. Make sure to set a default value if you want a fallback for devices that don't match a specific policy override.
I added a variable to my Smart Software, but it's deploying an empty value. What's wrong?
Check the following: (1) Confirm the variable was created in Catalog > Variables before it was referenced in the script. (2) Confirm the software is being deployed via a policy or GoLive — not Self Service, which does not support variables. (3) Verify the variable has a default value or a policy override that matches the deploying policy.