# Troubleshooting missing or malformed JSON data

*Omnistudio Developer Study Guide · Troubleshooting and Debugging · Last updated October 27, 2026 · https://www.certifyforce.com/study-guide/omnistudio-developer/troubleshooting-and-debugging/troubleshooting-missing-or-malformed-json-data*

How to fix JSON that doesn't land where an Omniscript or Integration Procedure expects it: repeatable blocks that stay empty, default values replaced by prefill, serialized strings that paths can't read, and stale data in Omniscript preview.

- Certification: Salesforce Omnistudio Developer
- Exam section: Troubleshooting and Debugging
- Study guide: https://www.certifyforce.com/study-guide/omnistudio-developer

**Official exam objective:**

> Resolve missing or broken JSON.

## What the exam expects

- Fix a repeatable block that stays empty by matching the returned array's root node and keys to the block and its elements.
- Explain when a Default Value is replaced by prefilled data.
- Convert a serialized JSON string into an object with DESERIALIZE so later steps can read its nodes.
- Reset stale data fields in Omniscript preview before retesting.

Key terms:
- **Data JSON**: the running JSON an Omniscript shows in the preview Debug panel.
- **Repeatable block**: a Block with Repeat checked, or an Edit Block, filled from an array.
- **Serialized JSON string**: JSON stored as escaped text, which paths can't walk into.
- **DESERIALIZE**: function that converts a JSON string into a JSON object.

## Key facts

| Fact | Detail | Source |
|---|---|---|
| Repeatable block prefill format | Array whose root node matches the block element name | [Prefill Repeatable Blocks](https://help.salesforce.com/s/articleView?id=xcloud.os_prefill_repeatable_blocks_21959.htm&language=en_US&type=5) |
| Keys in each array item | Must match element names inside the block | [Prefill Repeatable Blocks](https://help.salesforce.com/s/articleView?id=xcloud.os_prefill_repeatable_blocks_21959.htm&language=en_US&type=5) |
| Edit Blocks | Inherently repeatable; store entries as an array | [Prefill Repeatable Blocks](https://help.salesforce.com/s/articleView?id=xcloud.os_prefill_repeatable_blocks_21959.htm&language=en_US&type=5) |
| Default Value vs prefill | Overwritten when prefilled from a Data Mapper or JSON response | [Load Data into Omniscript Elements](https://help.salesforce.com/s/articleView?id=xcloud.os_load_data_into_omniscript_elements_21907.htm&language=en_US&type=5) |
| DESERIALIZE | JSON string in, JSON object out | [JSON Object Functions](https://help.salesforce.com/s/articleView?id=xcloud.os_omnistudio_json_object_functions.htm&language=en_US&type=5) |
| TOSTRING | Returns a String | [String Functions](https://help.salesforce.com/s/articleView?id=xcloud.os_omnistudio_string_functions.htm&language=en_US&type=5) |
| Reset preview data | Click the reload icon | [Preview and Test an Omniscript](https://help.salesforce.com/s/articleView?id=sf.os_preview_an_omniscript_8849.htm&language=en_US&type=5) |

## Check yourself

- Why does a repeatable block stay empty when the array's keys differ from its element names?
- When is an element's Default Value replaced?
- Why does a path into an escaped JSON string return nothing until you convert it?
- When you change element defaults and preview still shows earlier values, what resets the data fields?

## Sources

- [Prefill Repeatable Blocks](https://help.salesforce.com/s/articleView?id=xcloud.os_prefill_repeatable_blocks_21959.htm&language=en_US&type=5)
- [Load Data into Omniscript Elements](https://help.salesforce.com/s/articleView?id=xcloud.os_load_data_into_omniscript_elements_21907.htm&language=en_US&type=5)
- [Omnistudio JSON Object Functions](https://help.salesforce.com/s/articleView?id=xcloud.os_omnistudio_json_object_functions.htm&language=en_US&type=5)
- [Omnistudio String Functions](https://help.salesforce.com/s/articleView?id=xcloud.os_omnistudio_string_functions.htm&language=en_US&type=5)
- [Preview and Test an Omniscript](https://help.salesforce.com/s/articleView?id=sf.os_preview_an_omniscript_8849.htm&language=en_US&type=5)
- [Test Data Source Settings on a Flexcard](https://help.salesforce.com/s/articleView?id=sf.os_test_data_source_settings_on_a_flexcard_37522.htm&language=en_US&type=5)

## About the full unit

The "Core concepts", "Exam traps" and "Worked scenario" sections of this unit, its 4 linked practice questions, and unlimited timed mock exams are included with the Omnistudio Developer pack (USD $19): https://www.certifyforce.com/practice-exams
