Presets

Presets service is responsible for managing the variable presets created by the admin and consumed by the users,

Value types
There are 5 value types available (Integer-Float-Boolean-String(255 bytes)-Text(65535 bytes))

Update type
Update types are used to apply logic before updating the variable value
There are 4 update types available
If new is max : update if new value is higher than the current variable value.
If new is min : update if new value is lower than the current variable value.
Create new : create new variable entry, this is particularly used in events.
Always update : always update variable with the new value.

Global value
a global scope preset value that is read only for users and (read/ write) for admins, it is used by admin to have remote control over events that happen on the application, such as enabling an already implemented hidden feature.

.Net Library
Example
Get a preset by id and print its name.
Instalation steps can be found here.
UserToken to get from a successful login request result.
Preset Id to get from nucle.cloud dashboard.

    using Nucle.Cloud;

    var userToken= "hr56g*************************08fa";
    var presetId= "55h*************************0jh";
    var presetModel = await Preset.GetById(userToken, presetId ) ;
    Console.WriteLine("preset name= " +  presetModel.name);
Nucle cloud presets