Document version history
Version number | Modified by | Modifications made | Date modified | Status |
1.0 | Shelf | Initial release of the document. | 15 Sep 2023 | Expired |
1.1 | Shelf | New chapters have been added to the document to reflect addition of two new parameters in the Connection Profile settings. | 23 April 2024 | Active |
Document purpose
- What is the Shelf Content Integration Layer?
- What purposes does this feature serve?
- What is a Contentful connector?
- How is it configured?
- How is it used in practice?
Glossary
Prior to starting to learn about the Contentful connector and its configuration and usage, you need to learn the terminology used by Shelf.
Shelf KMS (Knowledge Management System) is a knowledge management platform that employs AI capabilities to create, edit, process, store, export/import, and otherwise handle various content. The platform sports multiple AI-enabled features such as Search Copilot, Analytics Copilot, Semantic Search, Content Intelligence etc., all of which are intended to optimize and centralize customer organizations’ knowledge and provide fast, accurate, and consistent answers.
The Content Integration Layer (CIL) in Shelf Knowledge Management System (Shelf KMS) is a feature that allows for the seamless integration of various types and formats of content into the system. It enables users to import and organize content from various sources and knowledge repositories.
A connector is an entity that defines which external Content Management System Shelf KMS needs to connect to via Content Integration Layer (e.g. the Contentful connector is a set of API parameters to define how to connect Shelf to Contentful). Shelf KMS has a set of preconfigured connectors (Contentful, Zendesk, Sharepoint, Confluence connectors, etc.) but also allows for creating the custom ones.
A connection profile is a feature that allows users to establish a connection to various external applications or sources. It enables seamless integration and collaboration between Shelf KMS and other platforms such as external content repositories. Using Shelf’s connection profiles, users can import and synchronize various content and generally streamline workflows between Shelf KMS and external systems. This feature enhances the overall efficiency and effectiveness of knowledge management processes by enabling easy access to relevant information from different sources within the Shelf platform.
A sync flow is a feature that is responsible for the synchronization of content from external sources to Shelf KMS. Shelf’s sync flows can work on schedule or on demand, making it a versatile tool for content synchronization and prompt knowledge delivery.
An API key is a unique identifier used to authenticate a user, developer, or calling program to an API (Application Programming Interface). Simply put, an API key is like a password that allows applications to communicate with each other. For the purpose of this document, API key is a unique identifier that allows Shelf KMS access Contentful for content retrieval and synchronization.
Prerequisites
For proper operation of your Contentful connector and successful synchronization of your content from the Contentful platform into Shelf KMS, the following preconditions must be met:
- Admin Panel must be accessible on your Shelf KMS account
- Settings menu must be accessible for you on your Contentful account
- Content items (articles, documents, etc.) must be available on your Contentful account.
Content Integration Layer and its purpose
The Content Integration Layer feature makes it possible to integrate various content types and formats into a single platform, Shelf KMS, from where users can further derive useful information to deliver accurate and relevant answers to their clients.
The Content Integration Layer ensures that content is indexed, tagged, and categorized appropriately, making it easily searchable and accessible to users within the knowledge management system. It provides capabilities for content mapping, transformation, and synchronization, enabling the consolidation and synchronization of data from multiple sources.
CIL also ensures that the latest version of content is always available to users and facilitates efficient content updating and maintenance.
Overall, the Content Integration Layer plays a crucial role in providing a centralized repository of relevant and up-to-date information, making it easier for users to find and access the knowledge they need.
The detailed information about the CIL feature can be found in the relevant chapters of the Shelf Content Integration Layer Feature User Guide.
Understanding the Content Integration Layer workflow
In-depth configurations and use cases of the Shelf Content Integration Layer are described in the dedicated Shelf Content Integration Layer Feature User Guide mentioned above, but the short example of the CIL workflow is as follows:
- You access the Content Integration Layer feature in your Shelf KMS (Admin Panel).
- You select one of Shelf-preconfigured connectors or create your custom one (based on the external content repository from which you need to sync content)
- You create a connection profile that uses the selected or created connector, and configure it: indicate credentials (username/password/API key/token/etc.) to access your external repository. All these credentials and access details can be taken from that external platform, and in the respective section below we will show you how to get them on Contentful.
- You create a sync flow that uses the created connection profile and configure this sync flow to run either on some specific schedule or on demand. It is here where you can apply filters to tell CIL which exactly content needs to be synced.
- You run the created sync flow manually (if set to run on demand) or wait for the scheduled run, and get your content from the needed external source right in Shelf KMS.
For the proper operation of the Contentful connector to sync your content from Contentful into Shelf KMS, you need to do certain actions both in Contentful and in Shelf. Read the chapters below to learn what exactly you need to do.
Configurations on the Contentful side
First, to make the configurations described below, you need to have the Administrator role permissions in Contentful.
To check your user role permissions, once logged in to your Contentful account, go to the Settings menu and select the Roles and permissions option.
Figure 1. Accessing the Roles and permissions settings in Contentful
In the main part of the Roles & permissions window, click on the link next to the Administrator role item. Then, in the Users window that appears, find your user. If it is on the list, you are good to go.
Figure 2. Checking the user role and permissions in Contentful
Obtaining API key for your Contentful storage
Once you have confirmed your Administrator permissions, it is time to enable Shelf KMS access to your Contentful storage for content syncing.
To do so, you need either to get the existing API key for your Contentful space or create a new dedicated API key specifically for Shelf KMS. We recommend creating a new API key as it may help prevent unauthorized access to sensitive content stored in your Contentful space.
Creating a new API key
To create a dedicated API key, follow the below steps.
- Go to the Settings menu and select the API keys option.
Figure 3. Accessing API keys parameters in Settings
Figure 4. Starting the API key creation process in Contentful
- Name (1): a mandatory field you need to fill in that contains the name of the API key you are creating.
- Description (2): an optional field so you may or may not add some description for the API key.
- Space ID (3): a platform-generated identifier of your Contentful storage that is needed for configuring communication between Shelf and Contentful. Copy and save it somewhere for further use.
- Content Delivery API - access token (4): a platform-generated identifier that acts as an authentication and authorization means for your Contentful storage and can be used by other systems - Shelf KMS - to access and sync your content. You also need to copy and save it for further use.
- Content Delivery API - access token and Environment parameters are not needed for the purposes of this document.
Figure 5. Working with the API key parameters
Using an existing API key
If you don’t need to create a new API key to let Shelf KMS connect to your Contentful storage, you may use one of the existing keys, if any.
To do so, go to the API keys option in the Settings menu (Figure 3), select and open the needed API key in the APIs page (Figure 4), and, finally, find and copy the Space ID and Content Delivery API access token values (Figure 5).
Once you have created a new API key or used an existing one and copied the relevant values, you are done with the configurations on the Contentful side. Before proceeding to the configurations on the side of Shelf KMS, make sure you have content in your Contentful storage.
Configurations on the Shelf side
This chapter and its subsections describe the steps you need to take to get your Contentful connector configured and ready for use.
Accessing Content Integration Layer
From the standard workflow described above you see that to start configuring and using your Contentful connector you need to access the Content Integration Layer feature. To do so, perform the following steps:
- Log into your Shelf KMS account using valid credentials.
- Once logged in, go to the Admin Panel by selecting the respective option in the dropdown menu.
Figure 6. Accessing Admin Panel in Shelf KMS
Figure 7. Accessing CIL modules in Admin Panel
Configuring Contentful connector
In fact, no configurations are needed for your Contentful connector. It is prebuilt and preconfigured by Shelf. You can see it in the connector list that appears once you select the Connectors option in the Content Integration Layer section.
Figure 8. Viewing the Contentful connector in CIL
What you need to do next is to create and configure a connection profile dedicated to work with the external content source such as your Contentful instance.
Configuring Contentful connection profile
The Contentful connection profile is a feature that uses the prebuilt Contentful connector and allows Shelf KMS to access, authenticate on Contentful, and communicate with it to find and sync content stored there. But to enable its proper operation, you need to create and configure it as described in the procedure below.
- In the Admin Panel in Shelf KMS, go to the Content Integration Layer section, find and select the Connection Profiles option.
- In the Connection Profiles window that appears, you see the list of available connection profiles. Neither the prebuilt nor other custom connection profiles can be used for communicating with Contentful, so you need to create a new connection profile. Click the Create Connection Profile button to start.
Figure 9. Accessing CIL connection profiles and starting creating a new connection profile
Figure 10. Configuring the Contentful connection profile in Shelf
In the Runtime Settings section, you need to use your Contentful Space ID you have previously copied from the Contentful settings. In this section, you also fill in other fields required to identify content collections and items stored in Contentful.
- Сollection сontent type ID: This parameter identifies the type of content in a specific collection. The value 'wikiCollection' suggests this collection contains wiki-type content
- Collection field ID: With the value ‘collection’ this parameter identifies the field in the data that contains information about the collection
- Primary content type ID: - This parameter identifies the main type of content in the collection. In our case, the primary content is a 'wikiArticle'.
- Collection title field ID: This identifies the field that contains the title of the collection because our value is 'title'
- Rich text field ID: With the value 'body' this identifies the field that contains the main body of text in the content, likely formatted in a rich text format that allows for more complex layouts than just plain text
- Title field ID: With the value 'title' this identifies the field that contains the title of the individual content items.
- Description field ID: With the value 'description' this parameter identifies the field that contains a description
- Use single virtual collection: This parameter is used to tell Shelf how you want to categorize the content synced from Contentful: under individual collections (as used in Contentful) or under one virtual collection. The value here can be ‘false’ if you go with the first case or ‘true’ if you choose the second option
- Preview URL: This parameter allows you to preview content created in a Contentful space either in a local or an online version of your website or app. The value to be placed here looks as follows: https://[YOUR_PREVIEW_DOMAIN]/[PLACEHOLDER_TOKEN]. Details of this parameter and explanation of its operation can be found in the respective section below
- Sync empty content items: This parameter can have either “true” or “false” value and allows to sync the published global Contentful articles WITH local articles which are inside such global content items and have the draft or unpublished status. See the details in the relevant section below.
In the Credentials section, the Access token field, you need to enter the Content Delivery API - access token you have previously found and copied in the Contentful settings.
❗Note:
Fields with the asterisk symbol (*) are mandatory. If they are left blank, you are not able to save the connection profile you are creating.
Configuring Contentful sync flow
Now that you have configured the Contentful connector and connection profile, you need to create and configure the Contentful sync flow. Sync flows are basically sets of instructions telling Shelf KMS what content and when it needs to pull from external sources, in our case - Contentful.
To create and configure the Contentful sync flow, perform the following steps.
- In the Admin Panel in Shelf KMS, go to the Content Integration Layer section, find and select the Sync Flows option.
Figure 11. Starting creating Contentful sync flow
Figure 12. Configuring the Contentful sync flow
Figure 13. Configuring the scheduled run of Contentful sync flow
Once done, click the Create button to finish your Contentful sync flow creation.
Running Contentful sync job
Once you have created the Contentful sync flow, you can either wait until it performs the content sync per schedule (if you have selected the On-schedule option for the sync flow run type), or start the sync manually at any time (if you have selected the On-demand option for the run type).
To manually start syncing your content from Contentful into Shelf, follow the below steps.
- Open the newly created Contentful sync flow, find and go to the Jobs tab in its window.
- In the tab window, find and click the Trigger Now button to start syncing content.
Figure 14. Manually running content syncing from Contentful into Shelf
Figure 15. Confirming the sync start
Figure 16. Viewing the running Contentful sync job
❗Note:
The sync job can be triggered manually both for the on-schedule and on-demand sync flows, unless there is a sync job running at that time.
In the first case, the manually triggered job overrides the schedule set for the sync flow. At the same time, the sync flow execution will resume to occur per schedule after the manually triggered sync job is finished. If you manually trigger the sync flow job, it starts immediately.
If there is a running sync job in this sync flow when you attempt to start a new job, this new job will not be created and, respectively, the content sync will not be started. In this case you will see the error message informing that the job is already running.
If there are no other sync jobs running in this sync flow, the Jobs tab window refreshes, and a new job with the IN PROGRESS status appears in the table grid.
Figure 17. Stopping the sync job
Checking syncing results
Once the sync job triggered manually or on schedule is finished, you will see it to change the status to SUCCESS (if the sync was successful) or FAILED (if some issues occurred during the sync). In the latter case, check your configurations in the Contentful connection profile and sync flow and rerun the sync job.
If the sync was successful, you can see the recently sync content directly from this window. To do so, open the Recent Sync tab and check the content items synced from Contentful into Shelf.
Figure 18. Viewing the recently synced content from Contentful
Note that the tab shows not more than 50 content items, so if you have synced more items, you will see them only after going back to the Shelf KMS Homepage and selecting the respective source - Contentful.
Configuring Contentful permissions in User Groups
Even when you successfully configured the Contentful connector, connection profile, sync flow, run the sync job and pulled the content from your Contentful repository, you need to add Contentful collections to the permitted sources via Shelf’s User Groups feature. Otherwise, you will not be able to search for the synced content and otherwise manage it in Shelf KMS.
To set the mentioned collection permissions, go back to the Admin Panel where find and select the User Groups option in the left sidebar menu. Select the needed user group from the list to open it.
Figure 19. Accessing User Groups in Shelf
In the selected user group window that opens, go and select the Collection Permissions tab. Once it opens, click the Add Collection button.
Figure 20. Starting to set Contentful collection permissions in Shelf
In the form that opens, find and select the needed Contentful collections you want to allow.
Figure 21. Selecting Contentful collections
Confirm your choice by clicking the Add button. Once the collections are added, they appear in the list.
Figure 22. Viewing the added Contentful collections
Once done, you are finished with all the configurations needed to sync content from Contentful into Shelf KMS using the Contentful connector.
Viewing Contentful resources in Shelf
After completing all the configurations on your Contentful connector and associated features and options, you can now view and work with the content synced into Shelf KMS from your Contentful repository.
Go back to Shelf KMS homepage and select Contentful as the needed source in the navigation panel.
Figure 23. Viewing content synced from Contentful into Shelf
Note that if you select any content item synced from Contentful it will open in Contentful (or in your relevant online website or app, if the Preview URL parameter in the Connection Profile settings is configured accordingly) not in Shelf KMS.
Figure 24. Viewing content item in Contentful
Now, you can enjoy all the benefits, including the AI-enabled features such as Search and Analytics Copilots, of Shelf KMS in relation to your content synced from Contentful.
In particular, you can filter this content using the Collections filter in Shelf KMS’s advanced search, as shown in the figure below.
Figure 25. Searching the synced content using the Collections filter in Shelf KMS search
You can also search across the articles synced from Contentful by title, description, and content (keyword(s) or phrase(s)). Generally, you can use virtually all the capabilities of Shelf KMS in relation to searching, viewing, and managing content synced from Contentful.
Figure 26. Viewing the search results for Contentful articles
Viewing Contentful resources in other platforms/websites/apps
As mentioned above, in most cases the content items you sync from Contentful using Shelf’s Contentful Connector are opened and viewed not in Shelf KMS but in Contentful. However, there is a possibility to reroute this content to open in another platform, website, or app. This possibility is enabled by the Preview URL parameter in the Connection Profile settings.
Figure 27. Viewing the Preview URL parameter in the Contentful Connection Profile settings in Shelf
This capability - viewing Contentful articles on platforms, websites or applications other than Shelf KMS and Contentful - is derived from the Contentful Preview functionality and works in a similar way. Let’s see how this feature works.
Adding Preview URL value in Shelf
As mentioned in the Configuring Contentful connection profile section above, the Preview URL parameter in the Connection Profile settings allows viewing Contentful articles on other platforms, even when such articles are synced to Shelf KMS via Contentful Connector.
To make it possible, we need to adapt the Preview URL template shown below to our needs.
Preview URL template: https://[YOUR_PREVIEW_DOMAIN]/[PLACEHOLDER_TOKEN]
In this template,
YOUR_PREVIEW_DOMAIN - is the base path of your preview platform, website, or app (for example, https://ring.com/support/articles/), and
PLACEHOLDER_TOKEN - is a token that resolves into an actual value when you click on the preview link.
For better understanding, we take a real-world example, where you want to display your content on the Ring platform.
In Shelf, the template displayed above is transformed into the following one, which is then entered in the Preview URL field in the Contentful Connection Profile settings:
https://example.com/{entry.fields.HelpId}/{entry.fields.slug} (generic)
https://ring.com/support/articles/{entry.fields.ringHelpId}/{entry.fields.slug} (Ring-specific)
where
https://ring.com/support/articles is YOUR_PREVIEW_DOMAIN
{entry.fields.ringHelpId} is an additional parameter of the Ring platform that points Contentful and Shelf at the specific section of the Ring Help Knowledge Base, and
{entry.fields.slug} is the article name on Ring.
Figure 28. Indicating Preview URL to enable the article display on Ring
URL of the article we expect to see is https://ring.com/support/articles/qzhz4/how-to-reconnect-your-video-doorbell-or-security-camera-to-wifi
Figure 29. Viewing the article on Ring and understanding the article’s URL
Once you created the Contentful connection profile, you can go back to our Contentful space and make the appropriate configurations there.
Adding Preview URL configurations in Contentful
To enable Contentful to redirect us to our external platform (Ring) for viewing the needed content, you need to follow these steps.
1. Once in your Contentful space, go to the Content tab.
2. Then, click Add entry in the right corner of the window.
3. In the menu that expands, select the Article - Global option.
Figure 30. Creating an article (Article - Global) in Contentful space
4. On the article page that opens, fill in the needed fields such as the article title and others as required.
5. Scroll down the page and find the Ring Help Id and Slug fields. Enter their respective values as explained above.
Figure 31. Adding Preview URL configurations in Contentful
Once done, click Publish to publish your article in Contentful.
Figure 32. Publishing article in Contentful
Creating and running Shelf Sync Flow for Preview URL feature
Now we need to create a dedicated sync flow to sync the article we want to see. Follow the steps displayed in the respective section above, but choose the Connection Profile where the Preview URL value has been added.
Figure 33. Creating dedicated Sync Flow in Shelf
Figure 34. Running Sync Flow job
Figure 35. Viewing Sync Flow job status
Following that, add the needed permissions to the Contentful collection(s) via Shelf’s User Group feature as described in the relevant section above.
Viewing articles on external platform
Once all the above configurations are made, go to your Shelf KMS homepage, select Contentful as the needed source, and look for the needed article in the synced content.
Figure 36. Selecting Contentful as content source in Shelf
Figure 37. Searching for the needed article in the synced content
After the article is found, click it to open. If everything is configured properly, the article will open in the specified external platform, in our case - on www.ring.com.
Figure 38. Viewing the synced Contentful article on Ring
❗Note:
If you want to change the way the Preview URL is created in the future, you will need to set up a new connection profile with the updated value and sync your content again.
Syncing Contentful articles with or without empty nested articles
In certain cases, there is a need to create global articles on Contentful that contain local content item(s). These local content items may be localizations of their parent global article or contain some reference materials etc. And, like their parent article, they may be published or unpublished (that is, be in the Draft status).
To overcome the issue of Shelf’s Content Intelligence Layer not syncing Contentful articles which contain unpublished or draft local content items, Shelf has added a parameter to the Contentful connection profile settings that enables syncing such content items.
Figure 39. Viewing the Sync empty content items parameter that allows syncing unpublished (draft) content
As mentioned above, this parameter - Sync empty content items - is located in the Runtime Settings of your Contentful connection profile settings. It can acquire true (if you want to enable draft local content item syncing) or false (if the need is to disable such sync) values.
Let’s see where empty (or unpublished/draft) local content items are in a Contentful article and how the Sync empty content items parameter works.
Figure 40. Viewing a Contentful global article with empty (draft) local article inside
As seen in the Figure above, there is a global article on Contentful that has an unpublished or draft (or, in Shelf terminology, empty) local content item.
If you assign the false value to the Sync empty content items parameter when you create and configure your Contentful connection profile and subsequently create and configure the Contentful sync flow and run the relevant sync job, the Contentful articles that contain draft content items will not be synced.
Figure 41. Creating/configuring Contentful connection profile with the disabled empty content syncing
Figure 42. Creating and configuring Contentful sync flow
Figure 43. Running the Contentful sync job
Figure 44. Viewing the sync job status
Figure 45. Checking whether Contentful articles with empty (draft) content items inside are synced to Shelf
As seen in Figure 45 above, the article that contains empty (draft/unpublished) content items in it is not synced because the Sync empty content items parameter has been set to false.
Now, let’s see what would change if we set this parameter to true and then create the relevant sync flow and run the relevant sync job.
Figure 46. Creating/configuring Contentful connection profile with the enabled empty content syncing
Figure 47. Running the Contentful sync job
Figure 48. Running the Contentful sync job and checking its status
Figure 49. Verifying that Contentful article with empty (draft/unpublished) content items inside it is synced
If, after opening the Recent Sync tab in the Contentful sync flow you can see the needed article on the list, it means that you have successfully enabled the empty content items syncing for your Contentful connection profile.