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

Paths/IDs Changed

PreviousLanguage (Locale) mismatch between endpointsNextReference to Value

Last updated 1 year ago

Case

Assume the content being synced is an article. In the body of the article there are images being set by via url.

Source image URL: 
src="https://eu-images.contentstack.com/v3/assets/blt66983808af36a8ef/blt17604d8fa654cda2/613f09322f7bb50798050a4c/chess-1314359_1280.jpg"

To fully sync this article to another system, both the image and the article need to be synced. However, when the image is synced, the ID and URL of the images changes to match the values of the destination system.

Destination image URL: 
src="https://eu-images.contentstack.com/v3/assets/blt69509c9116440be8/bltef0f9e1a32e09046/6468057000cbe421c7ef59f6/chess-1314359_1280.jpg"

We need to be able to

  1. Sync the image

  2. Sync the article

  3. Update the image URL in the article's body to the new image URL

Solution

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

But as previously stated the URL to the destination asset is different from the source asset.

Next we'll create a second job to sync the article content type and add a regex manipulator to the job.

This job will sync the article content from the source to the destination.

The regex manipulator we'll set up as seen below.

To understand how the regex config should be written we first need to understand the image URL. In this example the image url can be broken down as follows:

  • Domain (https://eu-images.contentstack.com)

  • API path (v3/assets)

  • Source system ID (blt66983808af36a8ef)

  • Content ID (blt17604d8fa654cda2)

  • Content Version ID (613f09322f7bb50798050a4c)

  • File Name (chess-1314359_1280.jpg)

In the replace field, groups 1, 3, 5, and 7 are all kept as is. However, group 2 captures the source system ID and replaces it with the static destination system value. Group 4 captures the content ID value and is used to search for a mapped content.id value by taking the content ID in group 4 and using it to search against Impulse's ID maps. Similarly, group 5 captures the content version ID value and is used to search for a mapped content.version.id value.

Finally, a pipeline can be created that runs both jobs in order.

After running this pipeline, the destination article now has the synced image

ImpulseSync can solve this with a couple jobs and the .

In the config for the regex manipulator, we see the regex field is broken into groups that capture parts of the URL. Each group is created with parentheses and can either be replaced, kept, or used to search for a mapped ID value. ()

regex manipulator
preview regex match