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
  • Specifics
  • Syncing Collection Types
  • Syncing Media files
  • UID Field
  • User Permissions
  • Same System Only
  • Private fields
  • Endpoint Config
  • Syncing Relationships
  • Syncing Roles
  • Pickup Date time
  • Login User
  • Unsupported
  • Adapter Properties
  • Job Options
  • path and contentType Job Options
  • Using UID Field
  • Syncing Collection Types
  • Motation Object Support
  • Content Mapper
  • Troubleshooting
  1. Connectors
  2. Destination Connectors

Strapi v4

The destination Strapi v4 connector allows content to transformed from motation and synced to Strapi versions 4.1.0.

Specifics

The destination Strapi v4 connector is able to sync both content and media files. In addition it can sync users and roles/permissions from Strapi v4 source.

Syncing Collection Types

Given the way the Strapi system stores and manages collection types, it is best practice to not sync collection types to a destination Strapi. This means that collection types should be synced via the SCP connector or created prior to a content sync and aligning the source content to the destination content via Impulse's functionality.

Syncing Media files

Syncing media files and assets to strapi will automatically send it into the strapi media library

UID Field

Impulse expects users to use the UID field provided in Strapi as a UUID for contents. Rather than rely on the auto incrementing ID of contents use the UID field and provide every content a UUID so that it can be queried and searched for. This is not only the best way to work with Impulse, but also the best way to build your Strapi deployment.

This is field can be referenced in the job options. Performing a sync without the UID field created for a collection type and the job option set is unsupported. We expect you to set up your Strapi v4 system and the destination endpoint job option this way.

User Permissions

To sync content to the Strapi system, you will need to pass a user's login credentials into the endpoint config. The user requires the appropriate permissions to be able to sync the content. The permissions required are the same as the admin UI permissions. If the user is able to use the admin UI, it will work in Impulse.

Because the adapters communicate with Strapi through Strapi’s REST API, the JWT timeout for that adapter user should be long enough to complete a sync.

The easiest option is to create a super user and use those credential for Impulse.

Same System Only

Strapi v4 has a few field types that are synced only to another Strapi system.

Those fields are:

  • Relationships

  • Component

  • Dynamic Zone

In addition Strapi v4 has a few Strapi v4 only objects that can be synced.

Those objects are:

  • Users

  • Roles

Note: When syncing roles, it is not uncommon to see retry logic. This will extend the length of time the sync takes, as well as send alerts. However, this is expected and the sync will fix itself with the retry logic.

Private fields

Any password field type attribute set will be randomly generated when synced.

Endpoint Config

When saving an endpoint for a Strapi v4 repository via REST instead of the UI you must use the following key:value pairs in the payload.

  • contentRepo:strapi

  • contentRepoVersion:4.1.0

Syncing Relationships

Note: When syncing relationships for a content that already has a relationship on the destination Strapi, that relationship will be added to the existing relationship. We do not clear out existing relationships before syncing new relationships.

Syncing Roles

Important: Each Impulse job syncs content in a specific order. Impulse will always sync primary content last. This means for a job that syncs users as the primary content with the roles option set to true, roles will be synced before users. This can cause some unexpected side effects.

gotcha 1: Job syncing users as primary content with roles option

The user being synced over has a UID that does not exist in the destination yet. But there is a user with the same Strapi content ID at the destination. This destination content with a matching ID will be updated because it was found before the UID was found. This is because the UID does not exist until the primary user content is synced which happens last.

To work around this you can run two user syncs.

  1. Without roles to sync the user content.

  2. With roles to sync the roles.

Pickup Date time

Setting a time zone is not supported. You must provide the time for the time zone the system uses. Strapi defaults to using UTC. This time zone may not match the time zone shown in the backend.

Login User

A "Login User" is a regular user created as a content in strapi to access the strapi API.

The login user used with Impulse requires full access to a content type's content. As well as access to the /api/user/me API.

It is best practice to set the login user up and use it's credentials in the sync. Using only an admin user is a deprecated functionality and may cause unexpected problems.

Unsupported

Multiple collection types per job. You can only sync one collection type per job. Setting multiple collection types will result in only one of them being synced.

Syncing image files from a non Strapi source.

Syncing relationships from a non Strapi source.

DotCMS binary field is not populated with the image when synced to Strapi destination.

DotCMS constant field has no value when synced to Strapi destination.

DotCMS custom field has no value when synced to Strapi destination.

Strapi v4 adapter does not support running as a remote adapter apart from Impulse.

Adapter Properties

Property
Purpose

strapiURL

The URL to access the Strapi system.

user

The user with appropriate permissions.

password

The password for the user with appropriate permission.

loginUser

The username for a regular user with appropriate permissions

loginPassword

The password for the regular user with appropriate permissions.

rateLimitPerSecond

It is used to control the rate at which certain operations can be executed to prevent excessive usage or abuse of resources (default: 10).

Job Options

Name
Description
Data Type
Required
Default Value

path

The path to pickup media files.

Array

No

No Default Value

contentType

The content type to pickup.

Text

No

No Default Value

contentTypeRoute

The endpoint route for the content type to pick up.

Text

uniqueId

Unique ID field of the collection types being synced to.

Array

No

No Default Value

deliverContentType

The option to deliver the collection type or not.

Boolean

No

true

query

Text

path and contentType Job Options

The path and contentType Job Options are used to search for contents that match the options criteria, the returned contents are used to compare against the source endpoint contents to define what needs to be synced to this destination connector.

Requesting specific contents of collection/single types.

To get the content of a collection type (or a single type) you will need to provide the API ID of the content type in the details of the endpoint like this: api::<api-id>.<api-id>

Note the difference between Strapi v3 using application::<api-id>.<api-id> and Strapi v4 using api::<api-id>.<api-id>

Example:

Syncing media files from the media library

Media files in the media library are treated as files that live under a path. As such the details to get files would be as follows: /uploads/files/<file-id>

Example 1: all media files

Example 2: specific media file with Id 1

Example 3: media files in a range This example will get all media files within the query range. I.e. 2 files starting at the second in the list.

Example 4: multiple media files by id

Note: This list may change order. It is based on modification date of the files. You may want to verify the query before using it.

Using UID Field

To use the UID Field as the primary id to sync based off rather than the default content auto incrementing id, set the value of the Uniqueid job option with the following pattern: api::<api-id>.<api-id>.<UIDFieldName>

Note: When syncing dependencies, you must provide the unique ID for every collection type to be synced.

Syncing Collection Types

To choose whether you sync a collection type or not set the Delivercontenttype job option. Best practice is to set this flag to false due to how Strapi handles creating and updating collection types.

When setting this flag to False, it is then expected that the content model is fully managed through other options. I.e. Another job, manually, etc.

Motation Object Support

Object
Supported

Category

No

Definition

Yes

Domain

No

Folder

No

Language

Yes

Relationship

No

Tag

No

Content Mapper

Below are details on how to find the appropriate values to use in the content mapper.

  • mapping.uniqueId

    • Collection type's api id

  • fields.mapping.uniqueId

    • Field name (case sensitive)

Troubleshooting

PreviousStrapi v3NextContent Manipulators

Last updated 1 year ago

Query params to add to the request to find contents to pickup. Follows the standard query params from .

If the content models do not match between source and destination the content may not sync as expected. You can view the for more information on how to handle this case.

Aligning Mismatched Content doc
strapi api doc