Skip to main content

Variables

In order to allow a deeper customization of the user experience, variables and placeholders can be used within manually specified strings.
Those will be replaced during runtime with specified / computed values. Those features can also be used within actions to improve the support workflow.

warning

Variable names are case-sensitive.

Placeholders

PlaceholderDescription
OCTORY_DIRECTORYDirectory where Octory.app is located. Example: /Users/jdoe/Library /Application Support/Octory
USER_NAMEUser’s login name Example: jdoe
USER_FULL_NAMEUser’s full name Example: John Doe
USER_FIRST_NAMEUser’s first name Example: John
USER_LAST_NAMEUser’s last name Example: Doe
DEVICE_MODEL_NAMEName of the device Example: MacBook Pro
DEVICE_MARKETING_MODEL_NAMEFull name of the device, as presented on media. Localized if possible. Example: 13" MacBook Pro with Thunderbolt 3 and Touch ID (Mid 2017)
DEVICE_NAMEFriendly name of the device Example: Woody's MacBook Pro
DEVICE_SERIAL_NUMBERDevice serial number Example: C05T25JRLVGN
DEVICE_UUIDDevice UUID (Unique Identifier) Example: F503KB3U-804E- 5D7G-AC3G-95F34G9F0BEB
DEVICE_PROCESSORDevice processor Example: Quad-Core Intel Core i5
PROCESSOR_TYPEDevice processor type Example: Intel or Apple
INSTALLED_MONITORS_COUNTThe count of the installed app monitors Availability: 2.1.0+
NOT_INSTALLED_MONITORS_COUNTThe count of the app monitors that are not installed yet Availability: 2.1.0+
FAILED_INSTALL_MONITORS_COUNTThe count of the monitors whose installation has failed Availability: 2.1.0+
MONITORS_COUNTThe count of the monitors that should be installed (ignore non mandatory monitors and monitors with a condition evaluated as false - see monitoring) Availability: 2.1.0+
DEVICE_BATTERY_STATUSCurrent % charged of the battery
DEVICE_BATTERY_IS_CHARGINGA boolean that tells you if the battery is charging
DEVICE_BATTERY_IS_FULLY_CHARGEDA boolean that tells you if the battery is fully charged
DEVICE_BATTERY_IS_CRITICALA boolean that tells you if the battery is at a critical level

For example:

Hello ${USER_FULL_NAME}, welcome to Octory!

Will be replaced by:

Hello John Doe, welcome to Octory!

Dynamic Placeholders

Octory offers several dynamic placeholders. Like placeholders, you can use them directly but their value can evolve along the Octory session. Those dynamic placeholders are particularly useful with conditions.

PlaceholderDescriptionPossible values
CURRENT_SLIDE_VALIDIndicates whether the current slide is valid or not.true, false
CURRENT_SLIDE_INDEXThe index of the current slide in the slides array-
INSTALLATION_COMPLETEIndicate if all the app monitors specified in the monitoring are installed. Note that the monitors with conditions evaluated as false are not taken in accounttrue, false

Computed Variables

In addition to the placeholders, Octory offers the capability to insert dynamic content in different places by using computed variables.

In the General → Variable section of the configuration file, you can define custom variables that will be replaced in any string in which they are present. You define a variable by its name, like myVariable and you use it in strings elsewhere in Octory with a dollar sign and enclosed in brackets like ${myVariable}.

For example:

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" >
<plist version="1.0">
<dict>
<!-- ... -->
<key>General</key>
<dict>
<key>Variables</key>
<dict>
<key>company</key>
<string>Acme Inc.</string>
</dict>
</dict>
<!-- ... -->
</dict>

When displaying an informative message to the end user, you can write

Welcome to ${company}!

The result will be

Welcome to Acme Inc.!

User inputs variables

When the user entered some info, you can anticipate to use it elsewhere. To know how the input can be used, you should refer to the input components. For example, if you ask the user the asset tag of the machine, you may choose to name the input variable user_asset_tag. When the user entered the asset tag and validated it, you can use it in a string like:

Can you confirm that your asset tag is ${user_asset_tag} ?

About URLs

Octory will populate any URL you write. So, you could use the placeholder ${USER_NAME} to specify a path like /User/${USER_NAME}/Documents. You can also define define a path for your resources and use it in a URL. For example: ${Resources}/index.html You can also use placeholder or computed variables to populate other computed variables. For example, to define an icon folder in in resources directory: ${Resources}/Icons and you use it after as ${IconFolderPath}.