Variable

Overview

Variable holds number, string, array, Boolean, or object type values. Variables provide dynamic values to element properties instead of hardcoding the values.
The value of a variable can be user-defined or can come from an API call through the datapoint. For more details, refer to the section Datapoint.

All variables which are created in a project are saved locally to that project. In a blueprint or public block, you can convert a variable as public. Hence, it will be visible in a project created using the blueprint or public block. You can convert a public variable as editable to noneditable (or vice-versa). By default, a public variable is noneditable.

In the Agora workspace, when you create new public blocks, you can convert a variable as a wizard variable. Wizard variables of the public block can be associated with the datapoints of the project or blueprint while importing the public block into the project or a blueprint.

Note: By default, in any project, a variable named Storeid is created automatically.

How to

A user can:

Creating a New Variable

You can create a variable and reuse it across the project.

To create a variable,

  1. Log in to the Infosys Equinox Studio environment with valid credentials provided to you.
  2. Open the required project or asset.
  3. Click available in the left panel:

  4. Select the VARIABLES option:
  5. Click the Add Variable button:
    https://duseqpxtuo98y.cloudfront.net/studio/variable/studio-variable-select.png
    The ADD VARIABLE pop-up appears:
  6. In the pop-up, provide the required details:
    Field Name Description
    Variable name Indicates the name of the variable to be created.
    Note: The variable name MUST start with a lower-case alphabet, _ (that is, underscore symbol), or $ followed by the alphanumeric values.
    Variable type Indicates the type of variable. The value can be:

    • Object – The value of the variable is given as an object. An object can hold any number of child items of any type.
    • Array – The value of the variable is given as an array. A user needs to provide the required length and type of the items in an array. The array index starts from 0.
    • Number – The value of the variable is given as a number.
    • String – The value of the variable is given as a string.
    • Boolean – The value of the variable is given as either true or false.
    • Datamatrix – The value of the variable is given as a table. The value is retrieved from a data point.
      Note: For more details, see Datapoint.
    • Mediamatrix – The value of the variable is given as media URLs (via media gallery API). Once created, this type of variable is linked which contains media URLs. This variable should be set as the source for the mediagallery element. For more details, see Configuring the Mediagallery Element.
  7. Click the SAVE button:
    A variable is added under the VARIABLES option:

Assigning/Updating a Value to a Variable

You can assign a new value to a variable. The new value will reflect across the project.

To assign a new value to a variable,

  1. Log in to the Infosys Equinox Studio environment with valid credentials provided to you.
  2. Open the required project or asset.
  3. Click available in the left panel:
  4. Select the VARIABLES option:
  5. Click the desired variable to be updated.
    The following pop-up appears:
    https://duseqpxtuo98y.cloudfront.net/studio/variable/studio-variable-select.png
  6. Assign/update a value to the selected variable.
    Note:

    • To set locale-specific values, select the option available next to the Value field.
    • To use the variable, copy the Token using the  option.
      The value is assigned to the selected variable.

Linking a Variable with a Datapoint

You can link a variable with data from a datapoint (API).

To link a variable with a datapoint,

  1. Log in to the Infosys Equinox Studio environment with valid credentials provided to you.
  2. Open the required project or asset.
  3. Click available in the left panel:
    https://duseqpxtuo98y.cloudfront.net/studio/variable/studio-variable-selectvariables.png
  4. Select the VARIABLES option:
  5. Select a variable.
    The variable details appear:
  6. Click available in the variable panel.
  7. Select the Link to Datapoint option:
  8. In the pop-up, select a datapoint such as Login, PLP, PDP, etc.:

    Note: For more details on the datapoint, refer to the section Datapoint.
  9. Click the SAVE button.
  10. Click to select a specific data in the datapoint (API response):
    https://duseqpxtuo98y.cloudfront.net/studio/variable/studio-variable-datapoint-name.png
  11. Select the required data. For example,

    The data appears:
    https://duseqpxtuo98y.cloudfront.net/studio/variable/studio-variable-datapoint-name.png
    Note: You can use this variable in an element. For example,

    Here, the address is displayed from the datapoint (API response).

Deleting a Variable

You can delete a variable if it is no longer required.

To delete a variable,

  1. Log in to the Infosys Equinox Studio environment with valid credentials provided to you.
  2. Open the required project or asset.
  3. Click available in the left panel:
  4. Select the VARIABLES option:
  5. Select a variable.
    The variable details appear:
  6. Click available in the variable panel.
  7. Select the Delete option:

    The selected variable is deleted:
    https://duseqpxtuo98y.cloudfront.net/studio/variable/studio-variable-datapoint-data.png

Duplicating a Variable

You can duplicate an existing variable.

To duplicate a variable,

  1. Log in to the Infosys Equinox Studio environment with valid credentials provided to you.
  2. Open the required project or asset.
  3. Click available in the left panel:
  4. Select the VARIABLES option:
  5. Select a variable.
    The variable details appear:
  6. Click available in the variable panel.
  7. Select the Duplicate option:

    The selected variable is duplicated:
    https://duseqpxtuo98y.cloudfront.net/studio/variable/studio-variable-datapoint-data.png

Renaming a Variable

You can rename a variable.

To rename a variable,

  1. Log in to the Infosys Equinox Studio environment with valid credentials provided to you.
  2. Open the required project or asset.
  3. Click available in the left panel:
    https://duseqpxtuo98y.cloudfront.net/studio/variable/studio-variable-datapoint-data.png
  4. Select the VARIABLES option:
  5. Select a variable.
    The variable details appear:
    https://duseqpxtuo98y.cloudfront.net/studio/variable/studio-variable-datapoint-data.png
  6. Click available in the variable panel.
  7. Select the Rename option:
    https://duseqpxtuo98y.cloudfront.net/studio/variable/studio-variable-datapoint-name.png
  8. In the pop-up, provide a new variable name:
    https://duseqpxtuo98y.cloudfront.net/studio/variable/studio-variable-datapoint-data.png
  9. Click Rename.
    The selected variable is renamed:
    https://duseqpxtuo98y.cloudfront.net/studio/variable/studio-variable-datapoint-name.png

Converting a Variable as Public in a Blueprint or Public Block

You can convert a variable as public in a blueprint or public block.

To convert a variable as public,

  1. Log in to the Infosys Equinox Studio environment with valid credentials provided to you.
  2. Open the required blueprint or public block.
  3. Click available in the left panel:
    https://duseqpxtuo98y.cloudfront.net/studio/variable/studio-variable-datapoint-address.png
  4. Select the VARIABLES option:
    https://duseqpxtuo98y.cloudfront.net/studio/variable/studio-variable-datapoint-data.png
  5. Select the required variable.
    The variable details appear:
    https://duseqpxtuo98y.cloudfront.net/studio/variable/studio-variable-datapoint-data.png
  6. Click available in the variable panel.
  7. Select the Set as Public option:
    https://duseqpxtuo98y.cloudfront.net/studio/variable/studio-variable-datapoint-address.png
    The variable is converted as public:
    https://duseqpxtuo98y.cloudfront.net/studio/variable/studio-variable-datapoint-data.png
    Note:

    • To convert a public variable as editable, select the Set as Editable option
      https://duseqpxtuo98y.cloudfront.net/studio/variable/studio-variable-datapoint-name.png
    • To convert a public variable as private, select the Set as Private option

Using a Variable in an Element

You can use a variable as an element property value so that you can use the available value in an element.

To use a variable in an element,

  1. Log in to the Infosys Equinox Studio environment with valid credentials provided to you.
  2. Open the required project or asset.
  3. Click available in the left panel:
    https://duseqpxtuo98y.cloudfront.net/studio/variable/studio-variable-datapoint-data.png
  4. Select the VARIABLES option:
    https://duseqpxtuo98y.cloudfront.net/studio/variable/studio-variable-datapoint-data.png
  5. Select a variable.
    The variable details appear:
    https://duseqpxtuo98y.cloudfront.net/studio/variable/studio-variable-datapoint-address.png
  6. Click to copy the variable name to reuse across the project:
    Note: You need to add the @ symbol before the variable name to reuse it across the project. For example, @storeName
  7. Use the copied variable anywhere in an element where the value is needed.
    For example,
    https://duseqpxtuo98y.cloudfront.net/studio/variable/studio-variable-datapoint-name.png
    Note: While you are typing the @ symbol and a few characters in the SET TEXT box, you will get available variable names as suggestions.
    The value of the variable is applied to the selected element.

Converting a Variable as a Wizard Variable in a Public Block of Agora Workspace

You can convert a variable as a wizard variable in a public block of the Agora workspace.

To convert a variable as a wizard variable,

  1. Log in to the Infosys Equinox Studio environment with valid credentials provided to you.
  2. Open the required public block of the Agora workspace.
  3. Click available in the left panel:
    https://duseqpxtuo98y.cloudfront.net/studio/variable/studio-variable-datapoint-name.png
  4. Select the VARIABLES option:
    https://duseqpxtuo98y.cloudfront.net/studio/variable/studio-variable-datapoint-name.png
  5. Select a variable.
    The variable details appear:
    https://duseqpxtuo98y.cloudfront.net/studio/variable/studio-variable-datapoint-name.png
  6. Click available in the variable panel.
    https://duseqpxtuo98y.cloudfront.net/studio/variable/studio-variable-datapoint-data.png
  7. Select Set as Wizard.
  8. Now, the variable of the public block is converted as a wizard variable.

 

Revision History

Date   Description  Created By  Peer-Reviewed By  Approved By 
2023-06-22  Page created and content added.  AN JP Suganya