---
schema_version: "1"
id: 67c07713bdc98be4a3ef985dc042a449398c91dc131762a5721e080db3e9df00
title: Set Values Action for Integration Procedures
collection: admin
version: current
locale: en-us
portal_url: https://docs.salesforce.com/admin/current/en-us/xcloud/264-0-0/os_set_values_for_integration_procedures_50310.md
canonical_url: https://help.salesforce.com/s/articleView?id=xcloud.os_set_values_for_integration_procedures_50310.htm&release=264.0.0&type=5
source_site: help.salesforce.com
content_type: documentation
content_hash: ccf143ad60975f70fc6ffa4f03a14b5c39bf424bbbaf1bdffef8cb54180880a1
description: The Set Values action sets values in the data JSON of an Integration Procedure using literal values, merge fields, or formulas.
products:
  - Omnistudio
release: "264"
---
# Set Values Action for Integration Procedures

The Set Values action sets values in the data JSON of an Integration Procedure using literal values, merge fields, or formulas.

![Note](https://sf-zdocs-cdn-prod.zoominsoftware.com/tdta-xcloud-omnistudio-264-0-0-production-enus/f526eaa8-ae05-487a-8944-4bb99b0b78ac/images/icon_note.png)

Note

Any text between two percent (%) signs in a Set Values formula is treated as a [merge field](https://help.salesforce.com/s/articleView?id=xcloud.os_access_integration_procedure_data_json_with_merge_fields_48435.htm&release=264.0.0&type=5 "Enable Integration Procedure elements and element properties to access data JSON using merge fields. A merge field is a variable that references the value of a JSON node. For example, if a JSON node is \"FirstName\": \"John\", then the merge field %FirstName% returns John."). To represent literal percent (%) signs, use the `$Vlocity.Percent` [environment variable](https://help.salesforce.com/s/articleView?id=xcloud.os_environment_variables_in_dataraptors_and_integration_procedures_47878.htm&release=264.0.0&type=5 "You can use environment variables to define Default Values and Filter Values, and in Formulas.").

The Set Values action doesn’t support custom labels.

## Properties

<table class="slds-table slds-table_bordered slds-max-medium-table_stacked slds-m-bottom_small ">
        <colgroup>
          <col>
          <col>
        </colgroup>
        <thead class="slds-text-title_caps ">
          <tr class="">
            <th scope="col" class="slds-cell-wrap" style="vertical-align:top;" id="d11416e74">
              <p style="margin-bottom:0;">Property</p>
            </th>
            <th scope="col" class="slds-cell-wrap" style="vertical-align:top;" id="d11416e80">
              <p style="margin-bottom:0;">Description</p>
            </th>
          </tr>
        </thead>
        <tbody>
          <tr class="">
            <td data-label="Property" class="slds-cell-wrap" style="vertical-align:top;" headers="d11416e74 ">
              <p style="margin-bottom:0;">Element Value Map: Element Name</p>
            </td>

            <td data-label="Description" class="slds-cell-wrap" style="vertical-align:top;" headers="d11416e80 ">
              <p style="margin-bottom:0;">The JSON node for which the value is to be set.</p>
            </td>

          </tr>
          <tr class="">
            <td data-label="Property" class="slds-cell-wrap" style="vertical-align:top;" headers="d11416e74 ">
              <p style="margin-bottom:0;">Element Value Map: Value</p>
            </td>

            <td data-label="Description" class="slds-cell-wrap" style="vertical-align:top;" headers="d11416e80 ">
              <p>The value to assign to the JSON node. Options:</p>
              <ul>
                <li>
                  <p>Merge fields from a previous step (%elementName%)</p>
                </li>

                <li>
                  <p>Literal value</p>
                </li>

                <li>
                  <p>Concatenated values</p>
                </li>

                <li>
                  <p>Results of formulas and functions</p>
                </li>

                <li>
                  <p>Expressions that combine the options: "Case Status: %caseStatus%"</p>
                </li>

              </ul>
            </td>

          </tr>
        </tbody>
      </table>

## Examples

For the following examples, consider this sample input JSON.

```json
{
    "Name": {
        "FirstName": "John",
        "LastName": "Smith"
    },
    "Finances": {
        "GrossIncome": "100000",
        "Expenses": "60000"
    }
}
```

**Rename Nodes in the Input Data**

To shorten and simplify the input JSON nodes, set the Element Value Map like this example.

<table class="slds-table slds-table_bordered slds-max-medium-table_stacked slds-m-bottom_small ">
        <colgroup>
          <col>
          <col>
        </colgroup>
        <thead class="slds-text-title_caps ">
          <tr class="">
            <th scope="col" class="slds-cell-wrap" style="vertical-align:top;" id="d11416e188">
              <p style="margin-bottom:0;">Element Name</p>
            </th>
            <th scope="col" class="slds-cell-wrap" style="vertical-align:top;" id="d11416e194">
              <p style="margin-bottom:0;">Value</p>
            </th>
          </tr>
        </thead>
        <tbody>
          <tr class="">
            <td data-label="Element Name" class="slds-cell-wrap" style="vertical-align:top;" headers="d11416e188 ">
              <p style="margin-bottom:0;">FirstName</p>
            </td>

            <td data-label="Value" class="slds-cell-wrap" style="vertical-align:top;" headers="d11416e194 ">
              <p style="margin-bottom:0;">%Name:FirstName%</p>
            </td>

          </tr>
          <tr class="">
            <td data-label="Element Name" class="slds-cell-wrap" style="vertical-align:top;" headers="d11416e188 ">
              <p style="margin-bottom:0;">LastName</p>
            </td>

            <td data-label="Value" class="slds-cell-wrap" style="vertical-align:top;" headers="d11416e194 ">
              <p style="margin-bottom:0;">%Name:LastName%</p>
            </td>

          </tr>
          <tr class="">
            <td data-label="Element Name" class="slds-cell-wrap" style="vertical-align:top;" headers="d11416e188 ">
              <p style="margin-bottom:0;">GrossIncome</p>
            </td>

            <td data-label="Value" class="slds-cell-wrap" style="vertical-align:top;" headers="d11416e194 ">
              <p style="margin-bottom:0;">%Finances:GrossIncome%</p>
            </td>

          </tr>
          <tr class="">
            <td data-label="Element Name" class="slds-cell-wrap" style="vertical-align:top;" headers="d11416e188 ">
              <p style="margin-bottom:0;">Expenses</p>
            </td>

            <td data-label="Value" class="slds-cell-wrap" style="vertical-align:top;" headers="d11416e194 ">
              <p style="margin-bottom:0;">%Finances:Expenses%</p>
            </td>

          </tr>
        </tbody>
      </table>

**Set Literal Values**

To set literal values, which are useful for testing or for specifying data that doesn't change, set the Element Value Map like this example.

<table class="slds-table slds-table_bordered slds-max-medium-table_stacked slds-m-bottom_small ">
        <colgroup>
          <col>
          <col>
        </colgroup>
        <thead class="slds-text-title_caps ">
          <tr class="">
            <th scope="col" class="slds-cell-wrap" style="vertical-align:top;" id="d11416e286">
              <p style="margin-bottom:0;">Element Name</p>
            </th>
            <th scope="col" class="slds-cell-wrap" style="vertical-align:top;" id="d11416e292">
              <p style="margin-bottom:0;">Value</p>
            </th>
          </tr>
        </thead>
        <tbody>
          <tr class="">
            <td data-label="Element Name" class="slds-cell-wrap" style="vertical-align:top;" headers="d11416e286 ">
              <p style="margin-bottom:0;">Location</p>
            </td>

            <td data-label="Value" class="slds-cell-wrap" style="vertical-align:top;" headers="d11416e292 ">
              <p style="margin-bottom:0;">San Francisco</p>
            </td>

          </tr>
          <tr class="">
            <td data-label="Element Name" class="slds-cell-wrap" style="vertical-align:top;" headers="d11416e286 ">
              <p style="margin-bottom:0;">Code</p>
            </td>

            <td data-label="Value" class="slds-cell-wrap" style="vertical-align:top;" headers="d11416e292 ">
              <p style="margin-bottom:0;">2345</p>
            </td>

          </tr>
        </tbody>
      </table>

**Concatenate Literal Values and Merge Fields**

To concatenate a literal string with a merge field, set the Element Value Map like this example.

<table class="slds-table slds-table_bordered slds-max-medium-table_stacked slds-m-bottom_small ">
        <colgroup>
          <col>
          <col>
        </colgroup>
        <thead class="slds-text-title_caps ">
          <tr class="">
            <th scope="col" class="slds-cell-wrap" style="vertical-align:top;" id="d11416e355">
              <p style="margin-bottom:0;">Element Name</p>
            </th>
            <th scope="col" class="slds-cell-wrap" style="vertical-align:top;" id="d11416e361">
              <p style="margin-bottom:0;">Value</p>
            </th>
          </tr>
        </thead>
        <tbody>
          <tr class="">
            <td data-label="Element Name" class="slds-cell-wrap" style="vertical-align:top;" headers="d11416e355 ">
              <p style="margin-bottom:0;">LocationCode</p>
            </td>

            <td data-label="Value" class="slds-cell-wrap" style="vertical-align:top;" headers="d11416e361 ">
              <p style="margin-bottom:0;">Code is %LocationData:Code%</p>
            </td>

          </tr>
        </tbody>
      </table>

The `%LocationData:Code%` merge field retrieves data from the previous component, LocationData.

**Define an Array**

To set up an array, click **Edit as JSON** and edit the `ElementValueMap` node like this example.

```json
"elementValueMap": {
   "Departments": [
      "Sales",
      "Development",
      "Support",
      "Training"
   ]
},
```

**Perform Simple Calculations Using Formulas**

To perform calculations, use operators in the the Element Value Map like these examples.

<table class="slds-table slds-table_bordered slds-max-medium-table_stacked slds-m-bottom_small ">
        <colgroup>
          <col>
          <col>
        </colgroup>
        <thead class="slds-text-title_caps ">
          <tr class="">
            <th scope="col" class="slds-cell-wrap" style="vertical-align:top;" id="d11416e433">
              <p style="margin-bottom:0;">Element Name</p>
            </th>
            <th scope="col" class="slds-cell-wrap" style="vertical-align:top;" id="d11416e439">
              <p style="margin-bottom:0;">Value</p>
            </th>
          </tr>
        </thead>
        <tbody>
          <tr class="">
            <td data-label="Element Name" class="slds-cell-wrap" style="vertical-align:top;" headers="d11416e433 ">
              <p style="margin-bottom:0;">AfterTaxIncome</p>
            </td>

            <td data-label="Value" class="slds-cell-wrap" style="vertical-align:top;" headers="d11416e439 ">
              <p style="margin-bottom:0;">=%Inputs:GrossIncome% * 0.7</p>
            </td>

          </tr>
        </tbody>
      </table>

Set the Element Value Map of CalculateNet as follows:

<table class="slds-table slds-table_bordered slds-max-medium-table_stacked slds-m-bottom_small ">
        <colgroup>
          <col>
          <col>
        </colgroup>
        <thead class="slds-text-title_caps ">
          <tr class="">
            <th scope="col" class="slds-cell-wrap" style="vertical-align:top;" id="d11416e480">
              <p style="margin-bottom:0;">Element Name</p>
            </th>
            <th scope="col" class="slds-cell-wrap" style="vertical-align:top;" id="d11416e486">
              <p style="margin-bottom:0;">Value</p>
            </th>
          </tr>
        </thead>
        <tbody>
          <tr class="">
            <td data-label="Element Name" class="slds-cell-wrap" style="vertical-align:top;" headers="d11416e480 ">
              <p style="margin-bottom:0;">NetIncome</p>
            </td>

            <td data-label="Value" class="slds-cell-wrap" style="vertical-align:top;" headers="d11416e486 ">
              <p style="margin-bottom:0;">=%AfterTax:AfterTaxIncome% - %Inputs:Expenses%</p>
            </td>

          </tr>
        </tbody>
      </table>

**Concatenate Two Merge Fields**

To concatenate two merge fields, set the Element Value Map like this example.

<table class="slds-table slds-table_bordered slds-max-medium-table_stacked slds-m-bottom_small ">
        <colgroup>
          <col>
          <col>
        </colgroup>
        <thead class="slds-text-title_caps ">
          <tr class="">
            <th scope="col" class="slds-cell-wrap" style="vertical-align:top;" id="d11416e534">
              <p style="margin-bottom:0;">Element Name</p>
            </th>
            <th scope="col" class="slds-cell-wrap" style="vertical-align:top;" id="d11416e540">
              <p style="margin-bottom:0;">Value</p>
            </th>
          </tr>
        </thead>
        <tbody>
          <tr class="">
            <td data-label="Element Name" class="slds-cell-wrap" style="vertical-align:top;" headers="d11416e534 ">
              <p style="margin-bottom:0;">FullName</p>
            </td>

            <td data-label="Value" class="slds-cell-wrap" style="vertical-align:top;" headers="d11416e540 ">
              <p style="margin-bottom:0;">=%Inputs:FirstName% + " " + %Inputs:LastName%</p>
            </td>

          </tr>
        </tbody>
      </table>

Notice the literal space included to separate the first and last names.

**Use a Function and Retrieve an Array Value**

This example uses the IF function. It also uses listnode`|`listnumber notation to retrieve array values.

<table class="slds-table slds-table_bordered slds-max-medium-table_stacked slds-m-bottom_small ">
        <colgroup>
          <col>
          <col>
        </colgroup>
        <thead class="slds-text-title_caps ">
          <tr class="">
            <th scope="col" class="slds-cell-wrap" style="vertical-align:top;" id="d11416e593">
              <p style="margin-bottom:0;">Element Name</p>
            </th>
            <th scope="col" class="slds-cell-wrap" style="vertical-align:top;" id="d11416e599">
              <p style="margin-bottom:0;">Value</p>
            </th>
          </tr>
        </thead>
        <tbody>
          <tr class="">
            <td data-label="Element Name" class="slds-cell-wrap" style="vertical-align:top;" headers="d11416e593 ">
              <p style="margin-bottom:0;">Department</p>
            </td>

            <td data-label="Value" class="slds-cell-wrap" style="vertical-align:top;" headers="d11416e599 ">
              <p style="margin-bottom:0;">=IF(%Inputs:FirstName% =
                "John",%DeptArray:Departments|2%,%DeptArray:Departments|3%)</p>
            </td>

          </tr>
        </tbody>
      </table>

This component assigns a Department value of Development to anyone named John and a Department value of Support to anyone not named John. Notice that the second equals sign has spaces before and after it, to distinguish it from the function.

![Note](https://sf-zdocs-cdn-prod.zoominsoftware.com/tdta-xcloud-omnistudio-264-0-0-production-enus/f526eaa8-ae05-487a-8944-4bb99b0b78ac/images/icon_note.png)

Note By default, if an IF function output is a large number, it's converted to scientific notation. To prevent this conversion if the large number is an identifier and not a math operand, wrap the IF function in a TOSTRING function.

**Perform a Complex Date Calculation**

This example uses four nested date functions to return the first day of the current month.

<table class="slds-table slds-table_bordered slds-max-medium-table_stacked slds-m-bottom_small ">
        <colgroup>
          <col>
          <col>
        </colgroup>
        <thead class="slds-text-title_caps ">
          <tr class="">
            <th scope="col" class="slds-cell-wrap" style="vertical-align:top;" id="d11416e653">
              <p style="margin-bottom:0;">Element Name</p>
            </th>
            <th scope="col" class="slds-cell-wrap" style="vertical-align:top;" id="d11416e659">
              <p style="margin-bottom:0;">Value</p>
            </th>
          </tr>
        </thead>
        <tbody>
          <tr class="">
            <td data-label="Element Name" class="slds-cell-wrap" style="vertical-align:top;" headers="d11416e653 ">
              <p style="margin-bottom:0;">FirstOfThisMonth</p>
            </td>

            <td data-label="Value" class="slds-cell-wrap" style="vertical-align:top;" headers="d11416e659 ">
              <p style="margin-bottom:0;">=ADDDAY(EOM(ADDMONTH(TODAY(),-1)),1)</p>
            </td>

          </tr>
        </tbody>
      </table>

**Create a Structure for Output Data**

This example creates a JSON structure for the transformed data. To set up the structure, click **Edit as JSON** and edit the `ElementValueMap` node like this sample JSON.

```json
"elementValueMap": {
    "Output": {
        "FullName": "%ConcatName:FullName%",
        "Department": "%RetrieveDept:Department%",
        "AfterTaxIncome": "%AfterTax:AfterTaxIncome%",
        "NetIncome": "%CalculateNet:NetIncome%",
        "Location": "%LocationData:Location%",
        "LocationCode": "%TextWithCode:LocationCode%",
        "FirstOfThisMonth": "%CalcFirstOfThisMonth:FirstOfThisMonth%"
    }
},
```