Contentful
The destination Contentful connector allows content to be transformed from Motation and synced to Contentful.
Specifics
The destination Contentful connector is able to sync both content and files (as references).
Entry Ids
Contentful uses a unique id for each entry. When creating and updating entries, Impulse will use the id from the source system. If the id exists, it will update the content, if not it will create it. According to the documentation, the id has to match this regex /^[a-zA-Z0-9-_.]{1,64}$/
. If the id does not match this regex, it will be cleaned and removed all characters that do not match the regex.
Content Status
Contentful has support for 4 status:
Draft: A draft entity is not published
Changed: An updated entity is published but has pending changes
Published: A published entity is published and has not been modified since
Archived: An archived entity is not published and can not be edited
Note: File Assets only support Draft and Published status.
Matrix of Entry status after Sync
Source - Draft
Draft
Changed
Changed
Draft
Source - Changed
Draft
Changed
Changed
Draft
Source - Published
Published
Published
Published
Published
Source - Archived
Archived
Archived
Archived
Archived
For example: If an entry is Changed in the source, and Published in the destination, after the sync, the entry will be updated in the destination and the status will be Changed.
Endpoint Config
When saving an endpoint for a Contentful repository via REST instead of the UI you must use the following key:value pairs in the payload.
contentRepo:contentful
contentRepoVersion:latest
Token
Content types
Spaces
Environments
Motation does not support environments so new environments will not be synced. By default content will ignore environments.
Locales
Locales are roughly equivalent to Motation's Languages. However, they are not supported yet. It wil use the default locale of the space.
Pickup Date time
Setting a time zone is not supported. You must provide the time for the time zone the system uses.
Number (Integer)
The Number (Integer) field type is supported however the value sent to the destination connector must be an integer. Otherwise it will default to 0. I.e.,if the value 7.000
is sent to the destination connector, the value saved to the system will be 0
not 7
. This can be solved using manipulators such as a Liquid manipulator to round the value to an integer.
Supported Fields
Text (Short)
Text (Long): Besides its standard use, this field will, also, be used to store any WYSIWYG content from other systems.
Number (Integer)
Number (Decimal)
Date and time
Boolean
Media
Reference
JSON Object
Array: Handled as an array of only strings.
Rich text: This field is handled internally by Contentful using a custom hierarchy. What makes this a System Field. What it means is that it will be synced only to Contentful and not other systems.
Unsupported Fields
Location
Unsupported Operations
Syncing Locales.
Creating "folders" in Contentful.
Adapter Properties
token
The content management token to use Contentful's API.
space
The space that should be searched for content and content should be synced to.
environment
The environment that should be searched for content and content should be synced to.
rateLimitPerSecond
It is used to control the rate at which certain operations can be executed to prevent excessive usage or abuse of resources (default: 7).
Job Options
space
The space that should be searched for content and content should be synced to.
Text
Yes
No Default Value
environment
The environment that should be searched for content and content should be synced to.
Text
Yes
No Default Value
contentType
The content type to search for.
Text
Yes
No Default Value
entry
Entry id will be searched and synced, sync job will only sync this specific entry
Text
No
No Default Value
dependenciesDepth
The max depth to look for dependencies. Files assets are dependencies.
Integer
No
1
contentDependencies
If dependencies should be picked up. Files assets are dependencies.
Boolean
No
false
query
Text
No
space Job Option
The value of the each space
option should be the ID of the space Impulse should check and sync content to.
environment Job Option
The value of the each environment
option should be the ID of the space Impulse should check and sync content to.
contentType Job Option
The value of the contentType
job option should match the Content Type ID from Contentful for the content type being checked/synced to.
Syncing all media files / assets
Use the following value for the contentType
job option to sync all media files / assets.
Troubleshooting
When syncing file assets from a Source to this destination with no content type attached you will need to set up a "dummy" content type with a media field in order to sync it over correctly with the content mapper.
Last updated