Using Custom Fields as Wildcards
  • 23 Sep 2023
  • 8 Minutes to read
  • PDF

Using Custom Fields as Wildcards

  • PDF

Article summary

Scalefusion Dashboard gives you the ability to define custom fields and set values against them for each device. These custom fields can be used as wildcards when defining configurations for Play For Work applications or used in Device Profile to override the default URL.

This document helps you understand how to define the custom fields, set values for them and then use them for your Play For Work app configurations and specify a device-specific custom URL.

Before you Start

  1. Make sure you are signed into Scalefusion Dashboard.
  2. You have set up Android for Work and have some Play For Work applications.

Step 1 - Defining & Setting Values for Custom Fields

In this step, we will see how to define custom fields and set their values in bulk. These custom fields will be used as wildcards in the subsequent steps.

Method 1: For devices already enrolled

  1. Sign In to Scalefusion Dashboard.
  2. Navigate to the Devices tab.
  3. Click on the 3 dots menu and select Set Custom Fields as shown below,
  4. You will see a dialog as shown below. This dialog has two options,
    1. Field Name - You can use this section to create custom fields and define their types.
    2. Field Values - For each of the fields that you have defined, you can set values for each enrolled device.
  5. To define Fields and their types, click on the Field Nametab. Here enter the field name and select the corresponding type of this field. For eg. if the field is email id, the type should be Email. The field types can be one of the following:
    1. String
    2. Integer
    3. Email
    4. Boolean
      Click on ADD MORE FIELD to add a new field
      After defining field names, click SAVE.
  6. You can add a maximum of twenty (20) custom fields.
  7. To set values for these newly created custom fields, click on the Field Values tab and click DOWNLOAD CSV,
    Values for custom fields can also be set from Device Groups, which are then applicable to all devices in the group.
  8. A CSV file will be downloaded to your computer. The downloaded file name will have the "devices_yyyy-mm-dd-xx.csv" pattern. Depending on the number of devices that you have, it may take longer to download this file.
  9. Once the file is downloaded, locate the file on your computer and open it in an editor that can edit CSV files. I have used TextEdit on a Mac, as shown below.
    Do NOT EDIT the first four fields, that is, device_name, device_id, IMEI_No, Serial_No. These are used as mappings against the device, and editing them will corrupt the file.
  10. You can add or modify the values of custom fields separated by commas, as shown. You can choose not to enter values for devices that you don't want to or add only the values required. In the screenshot below, I have added all values for FrontDeskTab, and CallCentreDevice, but left the device named Joe Root empty and for the Store Kentucky device added only the email and default URL fields. Once done, save the file locally on your computer.
  11. Now navigate back to the Scalefusion Dashboard and upload the file in the dialog shown in Step 7 above. If the CSV could be read properly and there were no errors, then you would see the following confirmation.
  12. That's it! You have successfully added new custom fields and set the values for them. You can check those values against the device by clicking on the device and on the device details page, clicking on the Settings Menu (Gear Icon) > Set Custom Properties

Method 2: For devices that are not yet enrolled

Custom fields can also be configured before the device's enrollment, and data can be uploaded using their Serial number. Once the device is enrolled, the custom fields with the data will be automatically assigned to it.

  1. In the Devices section, define custom fields as explained in #1 to #6 above and Save
  2. Now, navigate to Device & User Enrolment > IMEI/Serial # based enrollment and download the custom CSV. The fields you defined in Custom fields are visible as additional columns in the CSV.
  3. Now, add values for custom fields and upload the CSV again.
    You can follow IMEI/Serial Number-based enrollment by visiting here.
  4. This is how data for custom fields can be entered before the device's enrollment.

After enrollment, if you go to the Devices section > View Details > Settings (gear icon) > Set Custom Properties, the custom properties box that opens will contain the values under all the fields (as entered above).

Step 2

Assuming that you have set up an Android for Work account and approved the GMail application to your Play for Work apps. In this step, we will see how to create dynamic app configurations using custom fields.

  1. In this step, we will see how to use the email and username custom fields that we created above in Step - 1 > 6.
  2. In Scalefusion Dashboard, navigate to Application Management > PLAY FOR WORK APPS,
  3. Click on Gmail to see the extended settings panel.
  4. In the Extended settings panel, click on the App Configurations tab,
  5. Click on CREATE to create a new configuration. You will be shown a configuration dialog.
  6. Give the configuration a name, and here in the fields for email and username, use $device.email and $device.username respectively,
  7. Click on SAVE to save the configuration. Once saved, it will appear under App Configurations, as shown below.
  8. Now you can publish this configuration to your Device Profiles & Devices, where you have installed the GMail application from Play for Work.
    You can use the custom fields as wild cards for configurations of any Play for Work application. For example, you can use it to configure Allowed Websites in Chrome, or use it to specify Device-specific Dropbox tokens, or use it to specify Outlook client configuration etc.

Step 3 - Overriding the Default URL using Custom Fields

You might have a business use case where you are setting up Scalefusion as a Kiosk Browser at multiple locations, and at each location, you want a different URL to be the default URL. With custom fields, instead of creating multiple profiles, you can create one profile with a default URL and then choose a custom field to override that at a device level. This section describes how to achieve it.

  1. We will use the default URL field created in Step-1 > 6 above.
  2. In Scalefusion Dashboard, navigate to Device Profiles & Policies > Device Profile and start creating or editing a profile.
  3. Navigate to the KIOSK/LAUNCHER SETTINGS tab and click on the SINGLE APP MODE section.
  4. If you select Scalefusion Browser as the default app, then you will be shown the following options,
  5. Now you can specify a default launch URL, and additionally, you can choose to override with a custom field. Select Override With Device Custom Property and choose the property you want to use as shown below,
  6. Click on UPDATE PROFILE to save the profile. This will send a push to all the devices where this profile is applied, and the following can be observed on devices,
    1. For all the devices where the value for the field defaulturl is set on Dashboard, they will use this URL as the launch URL.
    2. For all the devices where the value of the field defaulturl is NOT set on Dashboard, they will use the default launch URL.

What are the other Configurations where Custom fields can be Used?

  1. Wi-Fi Configurations:
    1. The Wi-Fi SSID field and the password fields accept $device. And $user. custom fields.
    2. If, for a particular device, the custom property is not defined/available, then the Wi-Fi configuration is not pushed to that device.
  2. Hotspot Configurations:
    1. The Hotspot SSID field and the password fields accept $device. And $user. custom fields.
    2. If, for a particular device, the custom property is not defined/available, then the Hotspot configuration is not pushed to that device.
  3. Exchange & Email Configurations:
    1. The email/username and password fields accept $device., $user. And $group. custom fields.
    2. The email/username field accepts $user.email for an employee-owned device.
    3. If, for a particular device, the custom property is not defined/available, then the configuration is not pushed to that device.
  4. Play For Work App Configurations
    1. Use $device., $user. or $group. Custom field in any of the configuration fields. You can also use $user.email for your employee-owned devices.
    2. However, please verify that the data type of the custom field is correct. That is, if a configuration accepts String and you are specifying a Numeric value via the custom field, then it may not work.
    3. If, for a particular device, the custom property is not defined/available, then the configuration is not pushed to that device.
  5. iOS App Configurations
    1. Custom fields are accepted only for String and String Array data types.
    2. Use $device. Or $group. Custom field in any of the configuration fields. You can also use $user.email for your employee-owned devices.
    3. In the case of a String Array, make sure that there is NO space between two entries.
      1. Working Example: $device.bookname,$device.author
      2. Wrong: $device.bookname, $device.author
    4. If, for a particular device, the custom property is not defined/available, then the configuration is not pushed to that device.
  6. Windows Single App Mode
    1. Use $device. Or $group. To specify the username when you are setting up your Windows machines as Kiosk and have multiple users on the device.
    2. If, for a particular device, the custom property is not defined/available, then the configuration is not pushed to that device.
  7. User Management
    1. Create custom fields for users by going to the 3 dots menu in Enrollment Configurations > User Enrollment on Dashboard and add the values against each user in the User Details section or add values for multiple users in the Field Values section.
    2. Use $user. Custom field in any of the configuration fields.
  8. User-Authenticated Enrollment of Kiosk Devices
    1. Custom Properties can also be used for user-based enrolled devices.
  9. Custom payloads
    1. Custom Properties, defined for devices and users, can also be used in custom payloads for iOS, macOS and Windows.
    2. Use $device.custom_property_key or $user.custom_property_key, and they will be replaced with the device or user-specific value.
  10. Shell Scripts
    1. Custom Properties, defined for devices and users, can also be used in custom payloads for macOS Shell scripts.
    2. Use %$device.custom_property_key% or %$user.custom_property_key% in the script, and they would be replaced with the device or user-specific value.

As you can see, with the custom fields, you can make your configurations completely dynamic and use them across devices. Do let us know if you run into any issues while using this feature.


Was this article helpful?