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
  • Case
  • Solution
  1. Cookbook Recipes

Text to Reference

PreviousText Select to BooleanNextText to Reference - liquid

Last updated 1 year ago

Case

Assume the content being synced is an article. This article has a special json field which uses text to "reference" a content of another content type, topic.

But when syncing the article content to the destination, the destination content type is a proper reference field. Meaning a simple text value is not a valid value, instead an ID is required.

To fully sync this article to another system, both the topic and the article need to be synced. And the text value needs to be converted to the appropriate topic ID.

We need to be able to

  1. Sync the topic

  2. Sync the article

  3. Convert a text value to a content ID

Solution

To make use of the aligner, a common identifier value(s) must exist between the article and the topic. i.e., the source text value used to reference the topic matches the slug field of the topic

First, we create a job to sync the topic. When this job runs the topic content will sync from the source to the destination.

Next we'll create a second job, using the aligner, to create a link between the article content and the synced topic.

In this case, the article has a value that matches the slug of the topic, but the value is within a json field with other values. So, we will need to extract our specific value from the json and put it into a new field to use with the aligner.

Now that the article has a field with a value that can identify the referenced topic, we can set the aligner to align the article and topic contents.

Because we only want this job to align, and not overwrite the destination topic with the article content, we set the job to not deliver.

When this job runs, it will align the article content based on the field we created with the regex'd value with the topic content we previously synced.

Next, we need to create the final job which will sync the article content to the destination.

This job will sync the article content to the destination, and use the relationship manipulator to create a new relationship field.

This relationship manipulator is configured to create a new relationship field in the article content based on a previous content that article has synced as or been aligned with. Because our second job aligned the article with the topic, this relationship manipulator will create a new relationship field, with the aligned topic ID.

When this job runs, we'll see the destination article with the content fields populated and the referenced field set to the aligned topic.

ImpulseSync can solve this with a couple jobs, the , and the .

aligner
relationship manipulator