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. The variables are case sensitive. Those features can also be used within actions to improve the support workflow.


Placeholders

By default, the application offers a small range of placeholders that can be inserted into strings of characters. Here is the exhaustive list.

Placeholder Description
OCTORY_DIRECTORY Directory where Octory.app is located.
Example: /Users/jdoe/Library
/Application Support/Octory
USER_NAME User’s login name
Example: jdoe
USER_FULL_NAME User’s full name
Example: John Doe
USER_FIRST_NAME User’s first name
Example: John
USER_LAST_NAME User’s last name
Example: Doe
DEVICE_MODEL_NAME Name of the device
Example: MacBook Pro
DEVICE_MARKETING_MODEL_NAME Full name of the device,
as presented on media.
Localized if possible.
Example: 13" MacBook Pro with
Thunderbolt 3 and Touch ID (Mid 2017)
DEVICE_NAME Friendly name of the device
Example: Woody's MacBook Pro
DEVICE_SERIAL_NUMBER Device serial number
Example: C05T25JRLVGN
DEVICE_UUID Device UUID (Unique Identifier)
Example: F503KB3U-804E-
5D7G-AC3G-95F34G9F0BEB
DEVICE_PROCESSOR Device processor
Example: Quad-Core Intel Core i5

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.

Placeholder Description Possible values
CURRENT_SLIDE_VALID Indicates whether the current slide is valid or not. true, false
CURRENT_SLIDE_INDEX The index of the current slide in the slides array -
INSTALLATION_COMPLETE Indicate if all the monitors specified in the monitoring are installed.
Note that the monitors with conditions evaluated as false are not taken in account
true, 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 GeneralVariable 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:

<key>General</key>
<dict>
    <key>Variables</key>
    <dict>
        <key>company</key>
        <string>Acme Inc.</string>
    </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 to 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: ${ResourcesFolderPath}/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: ${ResourcesFolderPath}/Icons and you use it after as {IconFolderPath}.