ImpulseSync™ User Manual
HomePricingContact Us
  • Introduction
    • What is Impulse?
  • Crash Course of ImpulseSync
    • Overview Of ImpulseSync
    • Step 1: Endpoints
      • Endpoint Configuration
    • Step 2: Jobs
      • Job Configuration
      • Step 2a: Content manipulators
      • Step 2b: Content mapper
    • Step 3: Syncing
  • Getting Started
    • Core Concepts
    • Creating Endpoints
    • Creating Jobs
    • Starting a Transaction
    • Transaction Reports
    • Automating Jobs with Pipelines
    • Scripting Post Sync
    • Scheduling Jobs and Pipelines
    • Dashboard
    • Managing Jobs/Pipelines
    • Content Mapper
      • Aligning Mismatched Content
      • Connector Matrix
      • Locked Fields
      • Content Aligner
      • Aligning Content Challenges
  • Reports
    • Reports Screen
    • Debug Report
    • Messages
  • Connectors
    • Common Job Options
    • All Connectors List
    • Source Connectors
      • Contentful
      • Contentstack
      • dotCMS
      • Drupal v7
      • Drupal v9
      • GitHub
      • GraphQL
      • MS Teams
      • SCP
      • Snapshot
      • Strapi v3
      • Strapi v4
    • Destination Connectors
      • Contentful
      • Contentstack
      • dotCMS
      • SCP
      • Strapi v3
      • Strapi v4
  • Content Manipulators
    • Common Manipulator Options
    • Add Replace Field
    • AI(Artificial intelligence)
    • Change ID Manipulator
    • CSV Store Manipulator
    • Dynamic Job Store Manipulator
    • File to Text
    • Folder Manipulator
    • Get and Set Field
    • Language
    • Liquid Field
      • Liquid On the Quick
      • Basics
        • Impulse Values
        • Impulse Variables
        • Operators
        • Truthy and falsy
        • Types
        • Whitespace control
      • Tags
        • Control flow
        • Impulse Content Objects
        • Iteration
        • Utility
        • Variable
      • Filters
        • abs
        • append
        • capitalize
        • ceil
        • compact
        • concat
        • date
        • date_str
        • default
        • divided_by
        • downcase
        • escape
        • escape_once
        • first
        • floor
        • getStoredValue
        • htmlQuery
        • htmlReplace
        • idMap
        • join
        • jq
        • json
        • last
        • lstrip
        • map
        • minus
        • modulo
        • newline_to_br
        • plus
        • prepend
        • remove
        • remove_first
        • replace
        • replace_first
        • reverse
        • round
        • rstrip
        • section
        • sections
        • size
        • slice
        • sort
        • sort_natural
        • split
        • str_to_date
        • strip
        • strip_html
        • strip_newlines
        • times
        • truncate
        • truncatewords
        • type
        • uniq
        • upcase
        • utl_decode
        • url_encode
      • Liquid Playground
    • Markdown
    • Regex
    • Relationship
    • Store Field
    • Tidy
  • Time Machine
    • Snapshot
    • Viewing Snapshots
    • Delivery from Snapshots
  • Cookbook Recipes
    • Adding Fields
    • Aligning Content between Endpoints
    • Avoid overriding Fields
    • Avoid syncing Content Types
    • Combing Fields
    • Default Field Value
    • File (.doc) to Structured Content
    • File (.docx) to Structured Content - Expanded
    • HTML to Structured Content
    • Language (Locale) mismatch between endpoints
    • Paths/IDs Changed
    • Reference to Value
    • Single Content Type to Multiple
    • Splitting Content with Reference
    • Syncing Content with Languages
    • Text Select to Boolean
    • Text to Reference
    • Text to Reference - liquid
    • Two Sources to One Destination
    • Changing a folder path
    • Combining data between content types
    • Converting HTML Sections
    • JSON object to reference
    • Use CSV to convert values
    • Storing fields with Store field motator
  • Troubleshooting
    • What to do if I run into a Job Problem
    • Troubleshooting via UI
    • Submitting a ticket
  • Using Impulse Headlessly
    • Getting Started with cURL
      • Creating Endpoints
      • Creating Jobs
      • Starting a Transaction
      • Transaction Reports
      • Automating Jobs with Pipelines
      • Scheduling Jobs and Pipelines
      • Aligning Mismatched Content
      • Scripting Post Sync
  • Organization Tier Restrictions
  • Content Storage Options
Powered by GitBook
On this page
  • Using the ImpulseSync Liquid playground
  • Inputting Data
  1. Content Manipulators
  2. Liquid Field

Liquid Playground

Previousurl_encodeNextMarkdown

Last updated 1 year ago

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.

Using 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.

Inputting Data

The data to input is a JSON object with the following structure.

[
 {
  "contentId": <string value (optional)>
  "langauge": <string value (optional)>
  "fields": [
   {
    "fieldId": <string value>
    "fieldType": <string value of Motation field types (optional)>
    "fieldValue": <string value OR array of string values OR Motation field value in debug report>
   }
  ] 
 }
]

Content ID

The contentId attribute is optional. When it's not set the ID will be a combination of "test-content-id" and the language attribute.

Language

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.

Fields

The fields attribute is an array of field objects. This is the data to be referenced in the Liquid template.

Field ID

The fieldId attribute is the name of the field to be used to reference the field in the Liquid template.

Field Type

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".

Field Value

The fieldValue attribute is the value of the field. It can have one of the value types.

  1. string value

  2. array of string values

  3. Motation field value

    • Debug report uses Motation field values

Examples

Single value

[
    {
        "language": "en",
        "fields": [
            {
                "fieldId": "title",
                "fieldValue": "my content's title"
            }
        ]
    }
]

Array of fields

[
    {
        "language": "en",
        "fields": [
            {
                "fieldId": "title",
                "fieldValue": "my content's title"
            }, 
            {
                "fieldId": "body",
                "fieldValue": "my content's body field. \n some additional things are here"
            },
            {
                "fieldId": "number",
                "fieldValue": "7.5"
            }
        ]
    }
]

Multiple string values in single field

[
    {
        "language": "en",
        "fields": [
            {
                "fieldId": "title",
                "fieldValue": [
                    "first title value", 
                    "second title value", 
                    "third title value"
                ]
            }
        ]
    }
]

Motation Field Value (Debug Report)

[
    {
        "contentId": "entry::756f1T59Bb0LT584f9FSKF"
        "language": "en",
        "fields": [
            {
                "fieldId": "title",
                "fieldValue": [
                    {
                        "binary": {},
                        "order": 0,
                        "relations": {},
                        "value": "Benchmark Test - test"
                    }
                ]
            }
        ]
    }
]

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.

ImpulseSync Content objects
getStoredValue
debug report's