Liquid Playground
Last updated
Last updated
The Liquid Field Manipulator is specific to running in ImpulseSync, so there may be times where an external Liquid playground will not work to test the Liquid template needed. However, when viewing the configuration for a Liquid Field Manipulator you can access the ImpulseSync Liquid playground.
First start by configuring or viewing the configuration for a Liquid Field Manipulator. Then press the "Test Liquid Template" button below the "Fieldvalue" config option.
This will open the ImpulseSync Liquid playground.
From here you can add a template and data to test the template against.
Once the template and data have been added press the "Test Liquid Config" to test the template using the input data. The result will be displayed on the right in the JSON viewer.
The data to input is a JSON object with the following structure.
The contentId attribute is optional. When it's not set the ID will be a combination of "test-content-id" and the language attribute.
The language attribute is optional. If no language value is set, then no langauge value should be used in the Liquid template to reference fields. Akin to when a system does not support languages for content.
The fields attribute is an array of field objects. This is the data to be referenced in the Liquid template.
The fieldId
attribute is the name of the field to be used to reference the field in the Liquid template.
The fieldType
attribute is optional. If the fieldValue
attribute is a string or an string array then the fieldType
will be "String" or "Array" respectively.
If the fieldValue
attribute is a Motation field value object, then the fieldType
attribute can be set to any Motation field type. If it is not set, it will default to "String".
The fieldValue
attribute is the value of the field. It can have one of the value types.
string value
array of string values
Motation field value
Debug report uses Motation field values
Single value
Array of fields
Multiple string values in single field
Motation Field Value (Debug Report)
Not all Liquid tags and filters are supported in the Liquid playground. i.e., tags to retrieve additional , like categories or domains, or the filter.
The array of content objects at each step can be copied and pasted as the data value. Allowing for a Liquid template to be tested against the value from the debug report.