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
  • Value
  • Relation
  • Example Use Case
  1. Content Manipulators
  2. Liquid Field
  3. Basics

Impulse Values

The liquid-field manipulator can use liquid templates to build a more complicated field value. There are two different attributes of the field that are used based on what type of field is being built.

  1. Value

  2. Relation

Value

A value field is used for most field types.

Used with field types:

  • Array

  • Big Integer

  • Big String

  • Boolean

  • Checkbox

  • Date

  • Date-Time

  • Decimal

  • Float

  • Integer

  • JSON

  • Key Value

  • Multi-select

  • Radio

  • Select

  • String

  • Text Area

  • Time

  • WYSIWYG

Template

[{"value":"<insert field value>"}]
[{"value":"<insert field value>"}, {"value":"<insert field value>"}]

Example

[{"value":"my static value"}]
[{"value":"my static value"}, {"value":"my second static value"}]
[{"value":"{{ content.fields.title.value }}"}]
[{"value":"{{ content.fields.first.value }}"}, {"value":"{{ content.fields.second.value }}"}]

Relation

A relation field is used for any relationship type field.

Used with field types:

  • Category

  • File

  • Image

  • Relationship

  • Tag

Template

[{"relations":{"parentIds":{"value":"{{content.id}}"}, "childIds":{"value":"<insert child ID value>"}}}]
[{"relations":{"parentIds":{"value":"{{content.id}}"}, "childIds":{"value":"<insert child ID value>"}}}, {"relations":{"parentIds":{"value":"{{content.id}}"}, "childIds":{"value":"<insert child ID value>"}}}]

Example

[{"relations":{"parentIds":{"value":"{{content.id}}"}, "childIds":{"value":"blt6eb2f3dd9c154fc7"}}}]
[{"relations":{"parentIds":{"value":"{{content.id}}"}, "childIds":{"value":"blt6eb2f3dd9c154fc7"}}}, {"relations":{"parentIds":{"value":"{{content.id}}"}, "childIds":{"value":"blt1716d8a3b330e674"}}}]

Example Use Case

This use case creates a new array of relation values based on values found from an attribute in a JSON field. This uses a variety of filters and tags in the liquid template to convert an array of json strings to an array of relation values for a relationship field.

[

<div data-gb-custom-block data-tag="assign" data-rel_arr=''></div>

<div data-gb-custom-block data-tag="assign" data-0='.secondaryTerm[]' data-1='.secondaryTerm[]' data-2='.secondaryTerm[]'></div>

<div data-gb-custom-block data-tag="for">

 

<div data-gb-custom-block data-tag="unless" data-0='' data-1='' data-2=''>

  

<div data-gb-custom-block data-tag="assign" data-0='content.id' data-1='content.id' data-2='content.id' data-3=', ' data-4=', ' data-5=', ' data-6=', ' data-7=', ' data-8=', ' data-9=', ' data-10='category_secondary' data-child_id=''></div>

  

<div data-gb-custom-block data-tag="-"></div>

   {{ rel_arr | append: '{"relations":{"parentIds":{"value":"' | append: content.id | append: '"}, "childIds":{"value":"' | append: term | append: '"} } }' }}
  

<div data-gb-custom-block data-tag="-"></div>

   {{ rel_arr | append: '{"relations":{"parentIds":{"value":"' | append: content.id | append: '"}, "childIds":{"value":"' | append: term | append: '"} } }' | append: ',' }}
  

<div data-gb-custom-block data-tag="-"></div>

 

</div>

</div>
{{ rel_arr }}
]
PreviousBasicsNextImpulse Variables

Last updated 1 year ago