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
  • Impulse API Authentication
  • What to do when the content type doesn't match between the source and destination?
  • How to align mismatched content
  • Create/Update Config API
  • Running a Sync
  • Additional uses
  • Aligning Mismatched Content Additional Doc
  • Default content types
  • Referencing the correct content
  • Aligning Mismatched Content Deep Dive
  1. Getting Started
  2. Content Mapper

Aligning Mismatched Content

PreviousContent MapperNextConnector Matrix

Last updated 1 year ago

Impulse API Authentication

Before you can call many of the Impulse API endpoints, you will need to have a user. Once you have a user you can use basic auth to access the endpoints.

What to do when the content type doesn't match between the source and destination?

When syncing content between repositories, you will run into cases when the content doesn't match up correctly. Maybe the name of a field is wrong or the content type has a different name. Let's say that you have a WebContentGeneric CT in the source but a RichText CT in the destination, that will store the same data. You can solve this by creating a content mapping configuration.

How to align mismatched content

At this time, we do not have this functionality available in our UI. Instead you will need to use the REST endpoints to save the content mapping configuration. However, we do plan on add this functionality to the UI. Stay tuned.

Create/Update Config API

To create a content mapping config, you will need to use the "Motator" . Using cURL, you can make a request like the following:

curl --location -g --request POST '{{impulse-protocol}}://{{impulse-domain}}:{{impulse-port}}/private/motator/mappings/{{job-id}}' \
--data-raw '{
  "endpointId" : "8eb1794f-b0e7-45f0-911d-45c2dd2798c6",
  "destinationContentTypeUniqueName": "MotatorImpulsePoc",
  "fieldMappings": [
    {
     "sourceFieldUniqueName": "title",
     "destinationFieldUniqueName": "motatorTitle",
     "destinationFieldType": "String"
    },
    {
     "sourceFieldUniqueName": "body",
     "destinationFieldUniqueName": "motatorBody",
     "destinationFieldType": "Textarea",
     "systemProperties": {"system_key": "system_value"}
    }
  ]
}'

Request Body

The request body with variables to send is similar to the following:

{
  "endpointId" : "8eb1794f-b0e7-45f0-911d-45c2dd2798c6",
  "destinationContentTypeUniqueName": "MotatorImpulsePoc",
  "fieldMappings": [
    {
     "sourceFieldUniqueName": "title",
     "destinationFieldUniqueName": "motatorTitle",
     "destinationFieldType": "String"
    },
    {
     "sourceFieldUniqueName": "body",
     "destinationFieldUniqueName": "motatorBody",
     "destinationFieldType": "Textarea",
     "systemProperties": {"system_key": "system_value"}
    }
  ]
}

Each attribute of the request body maps a portion of the source content to the destination content. A quick description of each attribute follows:

  • endpointId: Destination Endpoint Id.

  • destinationContentTypeUniqueName: Destination Content Type Unique Id.

  • fieldMappings: Array of the fields that you want to map.

    • fieldMappings.sourceFieldUniqueName: Source Field Unique Id/Name, for example in dotCMS -> velocity variable name.

    • fieldMappings.destinationFieldUniqueName: Destination Field Unique Id/Name.

    • fieldMappings.systemProperties: JSON object or escaped string of a JSON object that has key value pairs for system specific attributes.

      • optional

Running a Sync

After the content mapping config is created, you can run a sync. While the transaction is in progress the source content will be mapped based on the saved config. Then when the content is synced to the destination, it will match the destination content type from the mapping.

Additional uses

There are some additional uses with this ability to map different content types together.

  1. Break a single source content into two destination contents.

    You may have a single source content type that you want to break into two different content types at the destination. I.e., A source "person" content type may include details about the person and their address. But the destination has two content types, "person" and "address"..

    You can create two jobs each with the same endpoints and for the same source content type. But create different mappings for the destination content type. This will allow the same source content to become two different destination contents with different content types.

  2. Change content parts of the content model.

    You may have a source content type that uses a text area field as the body. But the destiantion content type uses a WYSIWYG field as the body. You can create a mapping that sets the field type of the content from a text area to a WYSIWYG field.

Aligning Mismatched Content Additional Doc

Default content types

  1. The contentType job option will be used for any content from a source endpoint.

    1. If contentType job option is not set and content is picked up, the content type is assumed to be file.

  2. The destinationContentTypeUniqueName from a content mapping will be used for any content from the associated destination endpoint.

    1. If there is no mapping for the endpoint, then the source content type will be used.

Note: content that have changed their content type are treated as different content, even if they have the same content ID. I.e. sync content, change the unique ID for that content type, resync those content with new content type ID. The second sync for those content will treat the content as new content.

Referencing the correct content

Impulse allows for syncing 1 source content to multiple destination contents over multiple jobs. This can become a problem when another content has a relationship/reference to that content which is now multiple destination contents.

To be able to reference the correct content, you must define the source and destination content types of the content to be referenced. This can be done by using the following convention for the destination field name.

source_content_type||destination_content_type||destination_field_name

|| are used as the delimiter between content type values and the field name. This means that a field name may not include || in it's name. This convention only applies to a field with the Relationship type.

If this convention is not used, there is no guarantee for what content type will be used. However, this convention is only required if there are multiple content types that a source content was synced to.

Aligning Mismatched Content Deep Dive

  • All mapped content will live under Diesel /mapped bucket, using the same id that the motation.

  • All matches are case-sensitive. Be aware of that when using the API.

  • You could use the All keyword to use mapping saved to All endpointId or/and to All originUniqueId.

  • If you have a mapping for All endpoints, and you also have a mapping for a specific endpoint. The mapping with the specific endpoint will take priority.

There is a specific set of rules Impulse follows for setting the content type for content. This content type may be required to be used when setting up references to content or .

Further details can be found in the .

API
manipulating field values with IDs
API doc