Custom variables are used to collect additional information from customers when purchasing a specific product.
%color%
variable in server commands is then dynamically replaced with the customer’s selected color.
In the example images below, a variable named “Color” was created and assigned to the VIP product. The “White” option is free, while “Blue” and “Red” have additional costs. Once the purchase is finalized, the %color%
variable in the server command is replaced with the selected color value.
%color%
.red
, the %color%
variable in product commands will be processed as red
. A command like say Color: %color%
will be sent to the server as say Color: red
.%identifier%
. For example, if you created a variable with the identifier color
, you can use it in commands as %color%
. The variable in the command will be replaced with the value entered by the user and sent to the server.
say hello LeaderOS, you selected the red color!