Trados Studio
Trados Enterprise
Trados Team
Trados GroupShare
Trados Business Manager
Passolo
MultiTerm
RWS AppStore
Connectors
Beta Groups
Managed Translation
MultiTrans
TMS
WorldServer
Language Weaver
Language Weaver Connectors
Language Weaver Edge
Tridion Docs
Tridion Sites
LiveContent S1000D
XPP
Language Developers
Tridion Docs Developers
Community Help
RWS User Experience
Internal Trados Ideas Community
Mercury
RWS Community Internal Group
RWS Training & Certification
Style Guides
RWS Campus
RWS Enterprise Technology Partners
Trados Approved Trainers
ETUG (European Trados User Group) Public Information
Nordic Tridion Docs User Group
Tridion West Coast User Group
Trados Studio Ideas
Trados GroupShare Ideas
Trados Team Ideas
Trados Team Terminology Ideas
Trados Enterprise Ideas
Trados Business Manager Ideas
MultiTerm Ideas
Passolo Ideas
RWS Appstore Ideas
Tridion Docs Ideas
Tridion Sites Ideas
Language Weaver Ideas
Language Weaver Edge Ideas
Managed Translation - Enterprise Ideas
TMS Ideas
WorldServer Ideas
LiveContent S1000D Ideas
Contenta S1000D
XPP Ideas
Events & Webinars
To RWS Support
Detecting language please wait for.......
This blog post will describe how you can get started to develop connectors using the Tridion Integration Framework. It will describe step-by-step on how you generate connector projects for Java and .NET and how to install & configure connectors.
The Tridion Integration Framework (TIF) is a new framework for writing connectors on the SDL Tridion DX platform. It was first made available in SDL Tridion Sites 9.1. Currently we are looking into how to make the framework available for SDL Tridion Docs as well.
TIF is agnostic framework that allows deployment both on Content Management and the Dynamic Experience Delivery (DXD) side. The framework is also agnostic to programming languages. Currently C# and Java is supported, but other languages might be supported in future versions.
In SDL Tridion Sites 9.1 you can write connectors that can be consumed by External Content Library (ECL) and the Public Content API (PCA). More extension points will follow. Via the ECL extension point connectors will appear as a mountpoint on the same level as Tridion native content in the Tridion Content Manager. This allows you to consume external content, multimedia & other external data in the same way you do with native content. In PCA the connector will be exposed through GraphQL allowing you to perform various CRUD, list and search requests towards the external system/service.
There are currently commercial TIF connectors available to Aprimo DAM, SAP Commerce Cloud and Salesforce CRM. More are coming later this year.
To install connectors is very easy, thanks to the new Add-on Service introduced in SDL Tridion Sites 9.1. What you need is the following:
The ZIP file you then upload to the Add-on service. The manifest information are used to identify the connector and display information about it. After successful upload the connector is shown in the list of installed add-ons.
As the connector needs configuration before it can be used by any parts of the system, a JSON configuration file needs to be uploaded as well. The JSON configuration has the following format:
{ "configuration": { "<Connector name>": { "configuration": { <Generic configuration for all environments> } } }, "<Environment name, e.g. sitesCm, staging>": { "isEnabled": <true/false>, "<Connector name>": { "namespaces": { "<Connector namespace>": { <Environment specific configuration that overrides generic configuration> } } } }, ...}
Each connector can deploy one or several namespaces, where each namespace can have its own unique configuration like endpoints, different repositories etc. In ECL this maps to different mountpoints. In GraphQL you use namespaces to scope your queries.
Example configuration (taken from the SAP Commerce Cloud connector configuration):
{ "configuration": { "HybrisCommerce": { "configuration": { "pageSize": 100, }, }, "sitesCm": { "isEnabled": true, "HybrisCommerce": { "namespaces": { "hybris": { "displayName": "Hybris", "stubFolders": ["tcm:2-71-2"], "privilegedUserName":"Administrator", "configuration": { "url": "https://stage-hybris.company.com:9002", "clientId": "tridionapi", "clientSecret": "secret" } } } } }, "dxd-staging": { "isEnabled": true, "HybrisCommerce": { "namespaces": { "hybris": { "configuration": { "url": "https://stage-hybris.company.com:9002", "clientId": "tridionapi", "clientSecret": "secret" } } } } }, "dxd-live": { "isEnabled": false }}
So each environment (Content Manager, DXD staging, DXD live etc) can have its own configuration or use a common one. In addition each namespace can have its own configuration as well, which means there can be three different levels of configurations.
More information on connector manifest files & configuration format:https://docs.sdl.com/LiveContent/content/en-US/SDL%20Tridion%20Sites-v2/GUID-64B2DE72-6024-45D5-8727-C66C2BF841A3 https://docs.sdl.com/LiveContent/content/en-US/SDL%20Tridion%20Sites-v2/GUID-699C9AC1-76DD-4D77-B535-FCC80ED9171D https://docs.sdl.com/LiveContent/content/en-US/SDL%20Tridion%20Sites-v2/GUID-604E96A9-2F3E-4CDC-BC0D-B6AACEC7E2B7
After the configuration has been uploaded to the Add-on Service, the connector is deployed in ECL and PCA. ECL will pickup the connector and deploy it on-the-fly, while the PCA service needs to be restarted to get the connector deployed.
The next-coming sections will go through the steps to generate fully functional connector projects for .NET and Java using templates available in the NuGet/Maven public repositories. After completed the below steps you can use the connector right away, as it comes with some dummy data.
There is .NET Core template available for TIF connectors. You need to have .NET Core SDK 2.2 or higher installed on your machine. To install the template on your machine you do the following:
dotnet new --install Tridion.Connector.Template
You can verify that it's properly installed by running only the dotnet new command. After this you are ready to create new connector projects using this template by using the following steps:
dotnet new
dotnet new tridionconnector --n <connector name>
Where <connector name> is the name you want to use for the new project. The command builds the connector project with everything you need to build your connector. The project includes the following resources and samples:
<Target Name="PublishWithoutBuilding" DependsOnTargets="ResolveReferences;ComputeAndCopyFilesToPublishDirectory;GeneratePublishDependencyFile;GeneratePublishRuntimeConfigurationFile" />
dotnet build
stubFolders
,"staging": { "isEnabled": true, "<connector name>": { "namespaces": { "<connector namespace": { } } } }
There is a Maven archetype available to generate a fully functional Java TIF connector. You need to have Maven 3.x and JDK installed (JDK 8 or higher).
To generate a new connector project you do as following:
mvn archetype:generate
Choose a number or apply filter (format: [groupId:]artifactId, case sensitive contains): : tcfChoose archetype:1: remote -> com.sdl.tridion.connectorframework:tcf-archetype (Archetype to create SDL Tridion connectors)
mvn package
Via Tridion Content Manager you will see the new connector as a new mountpoint which you can navigate through the demo folders and view a few test items. The metadata of the test items can be updated as well.
The connector is also available via the PCA GraphQL interface. You can use the embedded GraphQL client in the PCA (if it is enabled) to run the queries, which is available on the following URL: <content service address>/cd/api/graphiql (for example http://tridion.sdldemo.com:8081/cd/api/graphiql)
<content service address>/cd/api/graphiql
Below are a few examples of GraphQL requests that interacts with the connector. To use them in your environment you might need to modify the namespace ("dem") and the type names ("DemoFile" and "DemoFolder").
Get a single item:
{ externalItem( identity: { namespace: "dem", id: "file1", type: "DemoFile" }) { ... on DemoFile { title thumbnail details { length numberOfAccess } } }}
Response:
{ "data": { "externalItem": { "title": "File 1", "thumbnail": "http://tridion.sdldemo.com:8081/cd/api/external/binary/dem/thumbnail/DemoThumbnail.jpg", "details": { "length": 100, "numberOfAccess": 5 } } }}
List a folder:
{ externalItems(namespace: "dem" filter: { context: { id: "folder1" type: "DemoFolder" } }) { edges { node { ... on DemoFile { identity { namespace id type } title } } } }}
{ "data": { "externalItems": { "edges": [ { "node": { "identity": { "namespace": "dem", "id": "file1", "type": "DemoFile" }, "title": "File 1" } }, { "node": { "identity": { "namespace": "dem", "id": "file2", "type": "DemoFile" }, "title": "File 2" } }, { "node": { "identity": { "namespace": "dem", "id": "file5", "type": "DemoFile" }, "title": "File 5" } } ] } }}
For more information about the connector GraphQL requests, see: https://docs.sdl.com/LiveContent/content/en-US/SDL%20Tridion%20Sites-v2/GUID-C1540E2B-9C9A-4071-B4AD-3B490FBBD9B6 https://docs.sdl.com/LiveContent/content/en-US/SDL%20Tridion%20Sites-v2/GUID-8A849DCF-70AB-469F-8D8C-9DBE009FB304
Using the different templates for C# and Java can kickstart your development of new Tridion connectors. In addition the add-on service makes it easy to centrally configure and deploy your connectors to various parts of your Tridion system. In the next blog post I will describe more in details the concepts of the Tridion Integration Framework and go through an example connector.
In meantime here are a few additional resources:
Very nicely explained! Thanks for sharing this with us.
Great to see templates for these, Nic. Should make development a lot easier to get started with.
Excellent Nic, very well explained article. Way forward to build new connectors.