Rendering decision policy in code base campaign error | Community
Skip to main content

1 reply

Level 3
June 22, 2026

The error "malformed JSON at line 3 column 3 path $[0]" indicates that the JSON generated by your Handlebars template is not valid JSON syntax. This usually happens because the output includes extra characters, missing commas, or improper braces.

Looking at your example:

[ {{#each decisionPolicy.50979f77-e0e6-45f7-8087-bc4ad110ac3f.items as |item|}}  
Look at that offer {{item._orlen.Vitay.OpisOferty}},
{{/each}} ]

This will output something like:

[ Look at that offer Offer1, Look at that offer Offer2, ]

This is not valid JSON because:

  • The strings are not quoted.
  • There are trailing commas.
  • The text "Look at that offer" is not valid JSON syntax inside an array.


If you want an array of objects with an "offerDescription" field, you can write:

[
{{#each decisionPolicy.50979f77-e0e6-45f7-8087-bc4ad110ac3f.items as |item|}}
{
"offerDescription": "Look at that offer {{item._orlen.Vitay.OpisOferty}}"
}{{#unless @last}},{{/unless}}
{{/each}}
]

While the official Adobe documentation provides this plain-text structure for open text fields (like email bodies), it will fail when pasted into strict JSON validation boxes (such as Code-Based Experience fields or Custom Actions). The text strings are unquoted, they lack key-value formatting, and the hardcoded comma leaves an invalid trailing comma on the final item of the array.

Hope this helps!

Found this helpful? Mark the thread as solved so other community members can quickly locate the answer.