What is the merge field syntax for JSON sub nodes in OmniScripts?

Prepare for the Salesforce OmniStudio Consultant Test. Utilize comprehensive flashcards and various question formats, each with detailed hints and explanations. Achieve exam readiness!

Multiple Choice

What is the merge field syntax for JSON sub nodes in OmniScripts?

Explanation:
In OmniScripts, the merge field encodes the data type of the JSON sub-node. When that sub-node is a list of items (a JSON array), you mark it as an array so OmniScript treats it as a collection rather than a single object or primitive. That’s why the correct form is %node|1:array% — it signals that the sub-node holds multiple elements you can iterate over or access by index. Using object would imply a single JSON object, string would be a single text value, and scalar would denote a single primitive value (like a number or boolean). For a JSON sub-node that contains multiple items, the array type is the appropriate choice.

In OmniScripts, the merge field encodes the data type of the JSON sub-node. When that sub-node is a list of items (a JSON array), you mark it as an array so OmniScript treats it as a collection rather than a single object or primitive. That’s why the correct form is %node|1:array% — it signals that the sub-node holds multiple elements you can iterate over or access by index.

Using object would imply a single JSON object, string would be a single text value, and scalar would denote a single primitive value (like a number or boolean). For a JSON sub-node that contains multiple items, the array type is the appropriate choice.

Subscribe

Get the latest from Examzify

You can unsubscribe at any time. Read our privacy policy