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

File (.doc) to Structured Content

PreviousDefault Field ValueNextFile (.docx) to Structured Content - Expanded

Last updated 1 year ago

Case

Assume a Word document (.docx) is stored as a media file in a source system. That document has all the details on how to populate a content type in the destination system.

While this media asset exists at the source as a document file, the destination is actually a structured content type with fields that need to be populated based on values in the source document.

We need to be able to

  1. Parse the binary document into separate fields

  2. Map parsed fields into destination content type

Solution

First we create a job to pick up the source media asset and sync it to the destination content type.

Next we set up the file-to-text manipulator.

This manipulator is configured to take the binary of the asset and convert it into text. That text will be stored in a new field called binaryAsText field. This new binaryAsText field can be referenced later by other manipulators or the content mapper.

The next manipulator to configure is the liquid-field manipulator

This manipulator is configured to create a new field called field1 using a liquid template as the value.

liquid field value 1:

{{ content.en.fields.binaryAsText.value[1] | section: 'Booking code: ', 'Voyage name:  DO NOT CHANGE' }}

Similarly, 2 more fields are created using the liquid-field manipulator.

liquid field value 2:

{{ content.en.fields.binaryAsText.value[1] | section: 'Voyage name:  DO NOT CHANGE', 'Link to images for approval: ' }}

liquid field value 3:

{{ content.en.fields.binaryAsText.value[1] | section: 'VOYAGE DETAILS:', 'Short description: ' }}

In total, the job now has 4 manipulators. 1 file-to-text and 3 liquid-field manipulators

Finally, we configure the content mapper to map our newly created fields into the correct fields for the destination content type.

Mapping it as follows:

  • field1 -> bookingCode

  • field2 -> voyageName

  • field3 -> voyageDetails

Now we can run this job and view the synced content.

ImpulseSync can solve this with a single job and couple manipulators. We will use both the and .

The liquid template uses the previously created binaryAsText field's value and the to get a specific section of the document. In this case the section between Booking code: and Voyage name: DO NOT CHANGE will be set as the value for the new field field1

file-to-text
liquid-field manipulators
section filter