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.
Variable names are case-sensitive.
Placeholders
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 |
PROCESSOR_TYPE | Device processor type Example: Intel or Apple |
INSTALLED_MONITORS_COUNT | The count of the installed app monitors Availability: 2.1.0+ |
NOT_INSTALLED_MONITORS_COUNT | The count of the app monitors that are not installed yet Availability: 2.1.0+ |
FAILED_INSTALL_MONITORS_COUNT | The count of the monitors whose installation has failed Availability: 2.1.0+ |
MONITORS_COUNT | The 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_STATUS | Current % charged of the battery |
DEVICE_BATTERY_IS_CHARGING | A boolean that tells you if the battery is charging |
DEVICE_BATTERY_IS_FULLY_CHARGED | A boolean that tells you if the battery is fully charged |
DEVICE_BATTERY_IS_CRITICAL | A 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.
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 app 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 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}
.