---
schema_version: "1"
id: 801ace7c7a87b19147c54edf39695d7a9af4c5adfa40aa93eb62f64b46ef44f0
title: Metadata Wizard Expression
collection: legacydeveloper
version: current
locale: en-us
portal_url: https://docs.salesforce.com/legacydeveloper/current/en-us/retail_api/metadata_expression.md
canonical_url: https://developer.salesforce.com/docs/atlas.en-us.retail_api.meta/retail_api/metadata_expression.htm
source_site: developer.salesforce.com
content_type: documentation
content_hash: 933a03b2e19f42b56fc3a528c5932f068d1195f0cd234cb9bffb32a580f8ecb2
description: Expressions provide dynamic values to Wizard Components. Wizard Components accept expressions in some of their metadata properties. With expressions, you can also access instance values of other Wizard Components and dynamically set the metadata attributes, and create conditions. When a Wizard Component has an expression as a metadata attribute, the Wizard Component gets re-rendered every time the expression value changes.
---
# Metadata Wizard Expression

Expressions provide dynamic values to Wizard Components. Wizard Components accept expressions in some of their metadata properties. With expressions, you can also access instance values of other Wizard Components and dynamically set the metadata attributes, and create conditions. When a Wizard Component has an expression as a metadata attribute, the Wizard Component gets re-rendered every time the expression value changes.

## Literal Value

An expression that doesn’t match the structure of the other expression types.

**Example**

"{! !(promoTemplate.Name == 'Test' || promoTemplate.Name != 'Test2') }"
...

Access the properties of identifiers using the dot notation:

"{! promoTemplate.Name }"

<table class="featureTable sort_table" summary=""><tbody class="tbody"><tr><td class="entry"><strong class="ph b">Literal</strong></td><td class="entry"><strong class="ph b">Example</strong></td><td class="entry"><strong class="ph b">Resolves to</strong></td></tr><tr><td class="entry"><samp class="codeph nolang">true</samp></td><td class="entry"><samp class="codeph nolang">"{! true }"</samp></td><td class="entry">Boolean true</td></tr><tr><td class="entry"><samp class="codeph nolang">false</samp></td><td class="entry"><samp class="codeph nolang">"{! false }"</samp></td><td class="entry">Boolean false</td></tr><tr><td class="entry"><samp class="codeph nolang">null</samp></td><td class="entry"><samp class="codeph nolang">"{! null }"</samp></td><td class="entry">null</td></tr></tbody></table>

## String Expressions

A string with a specific start and end sequence of characters ("{!" and "}").

Use these expressions to retrieve values from other Wizard Component instances by specifying the component ID of the Wizard Component instance.

**Example**

...
{
    "id": "myCheckboxField",
    "type": "Checkbox",
},
...
{
    "id": "myOtherField",
    "active": "{! myCheckboxField }",
...

## Logical Expressions

An object with these three properties - left, right, and operator.

Use this expression to perform operations between different values.

**Example**

{
    "left": <expression>
    "operator": "equal",
    "right" : <expression>
}
  
// Example
...
"active" : {
    "left": "{! myCheckbox}",
    "operator":"equal",
    "right": true
},
...

List of available operators:

- and
- or
- equal
- notEqual
- greaterThan
- lessThan
- greaterThanOrEqual
- lessThanOrEqual
- sum
- subtract
- multiply
- divide

## Expression Variables

Additional values can also be referenced from expressions:

- \_input\_ → The input payload passed to the Wizard instance during its creation. Use this variable to set default values:
    - "{! \_input\_.Slogan }"

## Identifiers for Custom, SObject, and SObject Field Labels

To get custom, sObject, and sObject field labels, use the identifiers, $Label and $SObjectType in expressions.

![Note](https://developer.salesforce.com/docs/atlas.en-us.retail_api.meta/retail_api/images/icon_note.png)

#### Note

All Wizard Components support expressions with the $Label and $SObjectType identifiers.

**Expression Syntax for a Custom Label:** {! $Label.<Label name with namespace> }

**Expression Syntax for an sObject Label:** {! $SObjectType.<SObject names with namespace>.label }

**Expression Syntax for a Field Label:** $SObjectType.<SObject names with namespace>.fields.<SObject Field with namespace>.label }

**Examples:** {! $Label.cgcloud\_\_NPW\_KPI } {! 'Test ' + $Label.cgcloud\_\_NPW\_KPI + ' Test' } {! $SObjectType.cgcloud\_\_Promotion\_\_c.label } {! $SObjectType.cgcloud\_\_Promotion\_\_c.pluralLabel } {! $SObjectType.cgcloud\_\_Promotion\_\_c.fields.cgcloud\_\_Slogan\_\_c.label } {! $SObjectType.cgcloud\_\_Promotion\_\_c.label + ' - ' + $SObjectType.cgcloud\_\_Promotion\_\_c.fields.cgcloud\_\_Slogan\_\_c.label }