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
  • Properties
  • Specifics
  • How to use
  • applyOn
  • fieldType
  • fieldValue
  • Examples
  1. Content Manipulators

Add Replace Field

The add-replace-field manipulator adds a field to the definition of a content type and, also, could replace the value of an existing field.

You can use this manipulator to copy values from an existing field in the content type or to set a default value for the new/updated field.

Properties

It is important to note that all these field... (i.e. fieldId, fieldType, etc) properties are motation properties, they have to use the same syntax as the motation system. Just like the ones used in the connector's Transformers.

Property
Purpose
Required

runManipulator

When to run this manipulator? Set one of the following options: ALWAYS, VALUE_EMPTY, FIELD_NOT_EXISTS, REGEX

True

runManipulatorRegex

Regular Expression to match the Field Value

Only when REGEX was selected above

fieldId

ID of the field to add

True

fieldType

Type of the field to add

True

fieldValue

Value to set for the field

True

fieldName

Name of the field to add

False

fieldSystemType

Motation System type of the field to add

False

fieldOrder

Order of the field to add

False

Specifics

How to use

It is very straightforward to use this manipulator. You just need to:

  1. Set runManipulator to one of the options and set the runManipulatorRegex if you selected REGEX in the previous step. Note: if you select a non-valid option, the manipulator will select FIELD_NOT_EXISTS by default. The options are:

    1. ALWAYS will always run the manipulator.

    2. VALUE_EMPTY will run the manipulator only if the value of the field is empty or doesn't exist.

    3. FIELD_NOT_EXISTS will run the manipulator only if the field doesn't exist.

    4. REGEX will run the manipulator only if the value of the field matches the runManipulatorRegex.

  2. Set the fieldId, fieldType and fieldValue properties. Like you would do in the motation system.

applyOn

This manipulator can be used only on read

fieldType

fieldValue

The fieldValue property can be set to a hardcoded value or to another field value using brackets {{another-field-id}}. For example, if you want to set the value of the field to the value of another field, you can do it like this:

Let's say you "Headline" at source needs to be "Headline" and "Mobile Headline" at destination. You can do it like this:

{
  "name": "Add-Field-Motator",
  "contentType": "voyage",
  "applyOn": "read",
  "order": 1,
  "config": {
    "runManipulator": "FIELD_NOT_EXISTS",
    "fieldId": "mobileHeadline",
    "fieldType": "String",
    "fieldValue": "{{headline}}",
    "fieldName": "Mobile Headline",
    "fieldSystemType": "Symbol",
    "fieldOrder": "2"
  }
}

Assuming you have a field called "Headline" in your content type, with an id of "headline", the value of the field "mobileHeadline" will be the value of the field "headline".

You could even merge fields, like this:

{
  "name": "Add-Field-Motator",
  "contentType": "voyage",
  "applyOn": "read",
  "order": 3,
  "config": {
    "runManipulator": "ALWAYS",
    "fieldId": "merged",
    "fieldType": "BigString",
    "fieldValue": "Merged Text: {{headline}} - {{body}}",
    "fieldName": "Merged",
    "fieldSystemType": "Text",
    "fieldOrder": "3"
  }

Examples

This would be the API call for a job with this manipulator (also using Regex manipulator):

{
...
"mutate": {
      "motatorsBinary": [
        {
          "name": "Add-Replace-Field-Motator",
          "contentType": "informa",
          "applyOn": "read",
          "order": 1,
          "config": {
            "runManipulator": "FIELD_NOT_EXISTS",
            "fieldId": "mobileHeadline",
            "fieldType": "String",
            "fieldValue": "{{headline}}",
            "fieldName": "Mobile Headline",
            "fieldSystemType": "Symbol",
            "fieldOrder": "1"
          }
        },
        {
          "name": "Regex-Motator",
          "contentType": "informa",
          "applyOn": "read",
          "fieldName": "body",
          "order": 2,
          "config": {
            "regex": "dummy",
            "replace": "pretty smart"
          }
        },
        {
          "name": "Add-Replace-Field-Motator",
          "contentType": "informa",
          "applyOn": "read",
          "order": 3,
          "config": {
            "runManipulator": "NOT_CORRECT_CONFIG",
            "fieldId": "merged",
            "fieldType": "BigString",
            "fieldValue": "Merged Text: {{headline}} - {{body}}",
            "fieldName": "Merged",
            "fieldSystemType": "Text",
            "fieldOrder": "3"
          }
        },
        {
          "name": "Add-Replace-Field-Motator",
          "contentType": "informa",
          "applyOn": "read",
          "order": 4,
          "config": {
            "runManipulator": "VALUE_EMPTY",
            "fieldId": "emptyField",
            "fieldType": "String",
            "fieldValue": "{{headline}} -- This was empty",
            "fieldName": "Empty Field",
            "fieldSystemType": "Symbol",
            "fieldOrder": "4"
          }
        },
        {
          "name": "Add-Replace-Field-Motator",
          "contentType": "informa",
          "applyOn": "read",
          "order": 5,
          "config": {
            "runManipulator": "VALUE_EMPTY",
            "fieldId": "notEmptyField",
            "fieldType": "String",
            "fieldValue": "{{headline}} -- This was not empty",
            "fieldName": "Not Empty Field",
            "fieldSystemType": "Symbol",
            "fieldOrder": "5"
          }
        },
        {
          "name": "Add-Replace-Field-Motator",
          "contentType": "informa",
          "applyOn": "read",
          "order": 6,
          "config": {
            "runManipulator": "FIELD_NOT_EXISTS",
            "fieldId": "existingField",
            "fieldType": "String",
            "fieldValue": "This Field shouldn't have this value",
            "fieldName": "Existing Field",
            "fieldSystemType": "Symbol",
            "fieldOrder": "6"
          }
        },
        {
          "name": "Add-Replace-Field-Motator",
          "contentType": "informa",
          "applyOn": "read",
          "order": 7,
          "config": {
            "runManipulator": "ALWAYS",
            "fieldId": "alwaysField",
            "fieldType": "String",
            "fieldValue": "This Field is always updated",
            "fieldName": "Always Field",
            "fieldSystemType": "Symbol",
            "fieldOrder": "7"
          }
        },
        {
          "name": "Add-Replace-Field-Motator",
          "contentType": "informa",
          "applyOn": "read",
          "order": 8,
          "config": {
            "runManipulator": "REGEX",
            "runManipulatorRegex": "This is regex original",
            "fieldId": "regexField",
            "fieldType": "String",
            "fieldValue": "Regex value updated",
            "fieldName": "Regex Field",
            "fieldSystemType": "Symbol",
            "fieldOrder": "8"
          }
        },
        {
          "name": "Add-Replace-Field-Motator",
          "contentType": "informa",
          "applyOn": "read",
          "order": 9,
          "config": {
            "runManipulator": "REGEX",
            "runManipulatorRegex": "Not matching regex",
            "fieldId": "regexNotMatchingField",
            "fieldType": "String",
            "fieldValue": "Regex value updated",
            "fieldName": "Regex Not Matching Field",
            "fieldSystemType": "Symbol",
            "fieldOrder": "9"
          }
        }
      ]
    }
...
}
PreviousCommon Manipulator OptionsNextAI(Artificial intelligence)

Last updated 1 year ago

It could be any of the Motation's TypeEnum, for example: String BigString Boolean Integer BigInteger Decimal Float ... These Field type values are what we use in relation to our motation in order to manipulate the content these exact motation field types can be found in our

Connector Matrix