---
schema_version: "1"
id: eb7f9a2c03512e06780f1e43c4cd544b3f379da29789d25aa467beb7c5b619c9
title: Omnistudio JSON Object Functions
collection: admin
version: current
locale: en-us
portal_url: https://docs.salesforce.com/admin/current/en-us/xcloud/264-0-0/os_omnistudio_json_object_functions.md
canonical_url: https://help.salesforce.com/s/articleView?id=xcloud.os_omnistudio_json_object_functions.htm&release=264.0.0&type=5
source_site: help.salesforce.com
content_type: documentation
content_hash: a55191dd4e15e5f035254a78557291e4ed2b78ac57c217c2a850633500542add
description: Functions that operate on JSON objects.
products:
  - Omnistudio
release: "264"
---
# Omnistudio JSON Object Functions

Functions that operate on JSON objects.

- **[Omnistudio DESERIALIZE Function](https://help.salesforce.com/s/articleView?id=xcloud.os_omnistudio_json_object_functions.htm&release=264.0.0&type=5)**  
    Converts a JSON string into a JSON object.
- **[Omnistudio RESERIALIZE Function](https://help.salesforce.com/s/articleView?id=xcloud.os_omnistudio_json_object_functions.htm&release=264.0.0&type=5)**  
    Reserializes a previously serialized JSON string.
- **[Omnistudio SERIALIZE Function](https://help.salesforce.com/s/articleView?id=xcloud.os_omnistudio_json_object_functions.htm&release=264.0.0&type=5)**  
    Converts a JSON object into a JSON string.
- **[Omnistudio VALUELOOKUP Function](https://help.salesforce.com/s/articleView?id=xcloud.os_omnistudio_json_object_functions.htm&release=264.0.0&type=5)**  
    Returns the value of a node that exists at any depth of a JSON object hierarchy.

## Omnistudio DESERIALIZE Function

Converts a JSON string into a JSON object.

Deserialization converts a serialized JSON string into its JSON object structure. Serialization and deserialization promote the efficient exchange of data between different systems and applications.

### Signature

`DESERIALIZE(jsonString)`

### Return Value

JSON object

### Parameters

<table class="slds-table slds-table_bordered slds-max-medium-table_stacked slds-m-bottom_small ">
            <colgroup>
              <col style="width:16.666666666666664%">
              <col style="width:16.666666666666664%">
              <col style="width:16.666666666666664%">
              <col style="width:50%">
            </colgroup>
            <thead class="slds-text-title_caps ">
              <tr class="">
                <th scope="col" class="slds-cell-wrap" style="vertical-align:top;" id="d33460e137">
                  <p style="margin-bottom:0;">Parameter</p>
                </th>
                <th scope="col" class="slds-cell-wrap" style="vertical-align:top;" id="d33460e143">
                  <p style="margin-bottom:0;">Data Type</p>
                </th>
                <th scope="col" class="slds-cell-wrap" style="vertical-align:top;" id="d33460e149">
                  <p style="margin-bottom:0;">Necessity</p>
                </th>
                <th scope="col" class="slds-cell-wrap" style="vertical-align:top;" id="d33460e155">
                  <p style="margin-bottom:0;">Description</p>
                </th>
              </tr>
            </thead>
            <tbody>
              <tr class="">
                <td data-label="Parameter" class="slds-cell-wrap" style="vertical-align:top;" headers="d33460e137 ">
                  <p style="margin-bottom:0;"><code><var>jsonString</var></code></p>
                </td>

                <td data-label="Data Type" class="slds-cell-wrap" style="vertical-align:top;" headers="d33460e143 ">&nbsp;</td>

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

                <td data-label="Description" class="slds-cell-wrap" style="vertical-align:top;" headers="d33460e155 ">
                  <p style="margin-bottom:0;">The previously serialized JSON string to be deserialized.</p>
                </td>

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

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

JSON Object Example

Sample data: `"SerializedContact": "{"LastName":"Edison","MiddleName":"Alva","FirstName":"Thomas"}"`

Formula: `DESERIALIZE(%SerializedContact%)`

Return value:

```
{
  "MiddleName": "Alva",
  "LastName": "Edison",
  "FirstName": "Thomas"
}
```

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

JSON Array Example

Sample data: `"SerializedContacts": "[{"lastName":"Jones","firstName":"Cathy"},{"lastName":"Smith","firstName":"Albert"},{"lastName":"Smith","firstName":"Ben"}]"`

Formula: `DESERIALIZE(%SerializedContacts%)`

Return value:

```
[
  {
    "firstName": "Cathy",
    "lastName": "Jones"
  },
  {
    "firstName": "Albert",
    "lastName": "Smith"
  },
  {
    "firstName": "Ben",
    "lastName": "Smith"
  }
]
```

## Omnistudio RESERIALIZE Function

Reserializes a previously serialized JSON string.

The `RESERIALIZE` function is equivalent to calling the `DESERIALIZE(SERIALIZE())` functions. The function converts a JSON string into a generic `Map<String, Object>` format. It is useful in remote actions for converting Apex class output to a format that Data Mappers and Integration Procedures can accept. For more information, see [Remote Action for Integration Procedures](https://help.salesforce.com/s/articleView?id=xcloud.os_remote_action_for_integration_procedures_54037.htm&release=264.0.0&type=5 "The Remote Action element calls the specified Apex class and method or the specified invocable action.")

### Signature

`RESERIALIZE(jsonString)`

### Return Value

JSON string

### Parameters

<table class="slds-table slds-table_bordered slds-max-medium-table_stacked slds-m-bottom_small ">
            <colgroup>
              <col style="width:16.666666666666664%">
              <col style="width:16.666666666666664%">
              <col style="width:16.666666666666664%">
              <col style="width:50%">
            </colgroup>
            <thead class="slds-text-title_caps ">
              <tr class="">
                <th scope="col" class="slds-cell-wrap" style="vertical-align:top;" id="d33460e319">
                  <p style="margin-bottom:0;">Parameter</p>
                </th>
                <th scope="col" class="slds-cell-wrap" style="vertical-align:top;" id="d33460e325">
                  <p style="margin-bottom:0;">Data Type</p>
                </th>
                <th scope="col" class="slds-cell-wrap" style="vertical-align:top;" id="d33460e331">
                  <p style="margin-bottom:0;">Necessity</p>
                </th>
                <th scope="col" class="slds-cell-wrap" style="vertical-align:top;" id="d33460e337">
                  <p style="margin-bottom:0;">Description</p>
                </th>
              </tr>
            </thead>
            <tbody>
              <tr class="">
                <td data-label="Parameter" class="slds-cell-wrap" style="vertical-align:top;" headers="d33460e319 ">
                  <p style="margin-bottom:0;"><code><var>jsonString</var></code></p>
                </td>

                <td data-label="Data Type" class="slds-cell-wrap" style="vertical-align:top;" headers="d33460e325 ">
                  <p style="margin-bottom:0;">JSON string</p>
                </td>

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

                <td data-label="Description" class="slds-cell-wrap" style="vertical-align:top;" headers="d33460e337 ">
                  <p style="margin-bottom:0;">The previously serialized JSON string to be reserialized.</p>
                </td>

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

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

JSON Object Example

Sample data: `"SerializedContact": "{"LastName":"Edison","MiddleName":"Alva","FirstName":"Thomas"}"`

Formula: `RESERIALIZE(%SerializedContact%)`

Return value: `"{"LastName":"Edison","MiddleName":"Alva","FirstName":"Thomas"}"`

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

JSON Array Example

Sample data: `"SerializedContacts": "[{"lastName":"Jones","firstName":"Cathy"},{"lastName":"Smith","firstName":"Albert"},{"lastName":"Smith","firstName":"Ben"}]"`

Formula: `DESERIALIZE(%SerializedContacts%)`

Return value: `"[{"lastName":"Jones","firstName":"Cathy"},{"lastName":"Smith","firstName":"Albert"},{"lastName":"Smith","firstName":"Ben"}]"`

## Omnistudio SERIALIZE Function

Converts a JSON object into a JSON string.

Serialization converts a JSON object into a JSON string that can be easily stored, transmitted, and restored to its original object structure. Serialization and deserialization promote the efficient exchange of data between different systems and applications. (The results of the `SERIALIZE` function are different from the results of the `TOSTRING` function.)

### Signature

`SERIALIZE(jsonObject)`

### Return Value

JSON string

### Parameters

<table class="slds-table slds-table_bordered slds-max-medium-table_stacked slds-m-bottom_small ">
            <colgroup>
              <col style="width:16.666666666666664%">
              <col style="width:16.666666666666664%">
              <col style="width:16.666666666666664%">
              <col style="width:50%">
            </colgroup>
            <thead class="slds-text-title_caps ">
              <tr class="">
                <th scope="col" class="slds-cell-wrap" style="vertical-align:top;" id="d33460e497">
                  <p style="margin-bottom:0;">Parameter</p>
                </th>
                <th scope="col" class="slds-cell-wrap" style="vertical-align:top;" id="d33460e503">
                  <p style="margin-bottom:0;">Data Type</p>
                </th>
                <th scope="col" class="slds-cell-wrap" style="vertical-align:top;" id="d33460e509">
                  <p style="margin-bottom:0;">Necessity</p>
                </th>
                <th scope="col" class="slds-cell-wrap" style="vertical-align:top;" id="d33460e515">
                  <p style="margin-bottom:0;">Description</p>
                </th>
              </tr>
            </thead>
            <tbody>
              <tr class="">
                <td data-label="Parameter" class="slds-cell-wrap" style="vertical-align:top;" headers="d33460e497 ">
                  <p style="margin-bottom:0;"><code><var>jsonObject</var></code></p>
                </td>

                <td data-label="Data Type" class="slds-cell-wrap" style="vertical-align:top;" headers="d33460e503 ">
                  <p style="margin-bottom:0;">JSON object</p>
                </td>

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

                <td data-label="Description" class="slds-cell-wrap" style="vertical-align:top;" headers="d33460e515 ">
                  <p style="margin-bottom:0;">The JSON object to be serialized. Use the <code>LIST</code> function to pass
                    a JSON array.</p>
                </td>

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

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

JSON Object Example

Sample data:

```
"Contact": {
  "FirstName": "Thomas",
  "MiddleName": "Alva",
  "LastName": "Edison"
}
```

Formula: `SERIALIZE(%Contact%)`

Return value: `"{"LastName":"Edison","MiddleName":"Alva","FirstName":"Thomas"}"`

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

JSON Array Example

Sample data:

```
"Contacts": [
  {
    "lastName": "Jones",
    "firstName": "Cathy"
  },
  {
    "lastName": "Smith",
    "firstName": "Albert"
  },
  {
    "lastName": "Smith",
    "firstName": "Ben"
  }
]
```

Formula: `SERIALIZE(LIST(%Contacts%))`

Return value: `"[{"lastName":"Jones","firstName":"Cathy"},{"lastName":"Smith","firstName":"Albert"},{"lastName":"Smith","firstName":"Ben"}]"`

## Omnistudio VALUELOOKUP Function

Returns the value of a node that exists at any depth of a JSON object hierarchy.

The function returns the value of a JSON node referred to by another JSON node. The function lets you retrieve a specified node dynamically.

### Signature

`VALUELOOKUP(startNode, node...)`

### Return Value

String

### Parameters

<table class="slds-table slds-table_bordered slds-max-medium-table_stacked slds-m-bottom_small ">
            <colgroup>
              <col style="width:16.666666666666664%">
              <col style="width:16.666666666666664%">
              <col style="width:16.666666666666664%">
              <col style="width:50%">
            </colgroup>
            <thead class="slds-text-title_caps ">
              <tr class="">
                <th scope="col" class="slds-cell-wrap" style="vertical-align:top;" id="d33460e674">
                  <p style="margin-bottom:0;">Parameter</p>
                </th>
                <th scope="col" class="slds-cell-wrap" style="vertical-align:top;" id="d33460e680">
                  <p style="margin-bottom:0;">Data Type</p>
                </th>
                <th scope="col" class="slds-cell-wrap" style="vertical-align:top;" id="d33460e686">
                  <p style="margin-bottom:0;">Necessity</p>
                </th>
                <th scope="col" class="slds-cell-wrap" style="vertical-align:top;" id="d33460e692">
                  <p style="margin-bottom:0;">Description</p>
                </th>
              </tr>
            </thead>
            <tbody>
              <tr class="">
                <td data-label="Parameter" class="slds-cell-wrap" style="vertical-align:top;" headers="d33460e674 ">
                  <p style="margin-bottom:0;"><code><var>startNode</var></code></p>
                </td>

                <td data-label="Data Type" class="slds-cell-wrap" style="vertical-align:top;" headers="d33460e680 ">
                  <p style="margin-bottom:0;">JSON node</p>
                </td>

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

                <td data-label="Description" class="slds-cell-wrap" style="vertical-align:top;" headers="d33460e692 ">
                  <p style="margin-bottom:0;">A node or node path of a JSON object. The node or node path must begin at the root of
                    the JSON object from which values are to be returned. For example, for the <code>Name</code>
                    object of a <code>Contact</code> object, you can specify <code>Contact, Name</code>
                    or <code>Contact:Name</code>. Use a node path to traverse a JSON array.</p>
                </td>

              </tr>
              <tr class="">
                <td data-label="Parameter" class="slds-cell-wrap" style="vertical-align:top;" headers="d33460e674 ">
                  <p style="margin-bottom:0;"><code><var>node</var>...</code></p>
                </td>

                <td data-label="Data Type" class="slds-cell-wrap" style="vertical-align:top;" headers="d33460e680 ">
                  <p style="margin-bottom:0;">JSON node</p>
                </td>

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

                <td data-label="Description" class="slds-cell-wrap" style="vertical-align:top;" headers="d33460e692 ">
                  <p style="margin-bottom:0;">A comma-separated list of one or more nodes of a JSON object. Each node must either be an
                    immediate child of the previously specified node or refer to a child of that node. The final
                    node must identify the node whose value is to be returned.</p>
                </td>

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

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

JSON Object Example

Sample data:

```
"Contact": {
  "Name": {
    "FirstName": "Thomas",
    "MiddleName": "Alva",
    "LastName": "Edison"
  },
  "Address": {
    "City": "San Francisco",
    "State": "CA",     
    "ZipCode": 94110
  }
},
"GetNameGroup": "Name",
"GetLastNameField": "LastName",
"GetAddressGroup": "Address",
"GetStateField": "State"
```

Formula: `VALUELOOKUP(Contact, GetNameGroup, GetLastNameField)`

Formula: `VALUELOOKUP(Contact:Name, GetLastNameField)`

Return value: `"Edison"`

Formula: `VALUELOOKUP(Contact, GetNameGroup)`

Return value:

```
{
  "MiddleName": "Alva",
  "LastName": "Edison",
  "FirstName": "Thomas"
}
```

Formula: `VALUELOOKUP(Contact, GetAddressGroup, GetStateField)`

Formula: `VALUELOOKUP(Contact:Address, GetStateField)`

Return value: `"CA"`

Formula: `VALUELOOKUP(Contact, GetAddressGroup)`

Return value:

```
{
  "City": "San Francisco",
  "ZipCode": 94110,
  "State": "CA"
}
```

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

JSON Array Example

Sample data:

```
"AccountList": [
  {
    "CaseList": [
      {
        "Case1": {
          "CreatedDate": "2/1/2024T16:35:30 GMT -0500 (EDT)",
          "LastUpdate": "2/8/2024T09:15:00 GMT -0500 (EDT)",
          "NextCase": "Case2"
        }
      },
      {
        "Case2": {
          "CreatedDate": "2/2/2025T11:05:05 GMT -0500 (EDT)",
          "LastUpdate": "2/3/2025T15:50:57 GMT -0500 (EDT)",
          "NextCase": "Case3"
        }
      },
      {
        "Case3": {
          "CreatedDate": "2/4/2025T11:05:05 GMT -0500 (EDT)",
          "LastUpdate": "2/6/2025T15:50:57 GMT -0500 (EDT)",
          "NextCase": null
        }
      }
    ]
  }
],
"GetFirstCase": "Case1",
"GetNextCase": "NextCase"
```

Formula: `IF(GetFirstCase, GetFirstCase, "Empty list")`

Return value: `"Case1"`

Formula: `VALUELOOKUP(AccountList:CaseList:Case1, GetNextCase)`

Return value: `"Case2"`

Formula: `VALUELOOKUP(AccountList:CaseList:Case2, GetNextCase)`

Return value: `"Case3"`

Formula:

```
IF(VALUELOOKUP(AccountList:CaseList:Case3, GetNextCase),
  VALUELOOKUP(AccountList:CaseList:Case3, GetNextCase),
  "End of list")
```

Return value: `"End of list"`