Multi-level Connector configuration
Tridion Integration Framework supports a multi-leveled approach to Connector configuration. Within the JSON configuration file, you can configure each Connector per namespace and per environment, as well as generally for the Connector overall. Namespace configuration enables you to include multiple configurations per connector package.
The following diagram illustrates in the simplest form the multi-level structure of the configuration file:
This illustration shows how the file structure represents a Connector's integration with both the Content Management and Content Delivery sides of SDL Tridion Sites, as well as with multiple Content Delivery environments. At each level, you can include configuration settings (key-value pairs) that configure that particular level, such as a particular namespace and environment combination. These deeper level configurations override any equivalent setting at a higher level. In addition, a value defined in the configuration file will also override any default values that might exist for the same setting in the manifest.
The following sample code illustrates a customized configuration file for the Connector for SAP Commerce, which includes integration on the Content Management-side as well as configuration for both a live and staging Content Delivery environment:
{
"configuration": {
"SAPCommerce": {
"privilegedUserName": "global\\userID",
"configuration" : {
"url": "http://SAPSystem:9001",
"imageBaseUrl": "http://SAPSystem:9001",
"catalog": {
"name": "electronics",
"versionId": "electronicsProductCatalog/Online"
},
"clientId": "bestclient",
"clientSecret": "supersecret",
"pageSize": "1"
}
}
},
"sitesCm": {
"isEnabled": true,
"configuration" : {
"url": "http://SAPSystem:9001",
"imageBaseUrl": "http://SAPSystem:9001",
"catalog": {
"name": "electronics",
"versionId": "electronicsProductCatalog/Online"
},
"clientId": "bestclient",
"clientSecret": "supersecret",
"pageSize": "2"
},
"SAPCommerce": {
"namespaces": {
"sapcommerce": {
"displayName": "SAP Commerce",
"stubFolders": ["tcm:1-7-2"],
"logLevel": "DEBUG"
}
}
}
},
"staging": {
"isEnabled": true,
"SAPCommerce": {
"configuration" : {
"pageSize": "5"
},
"namespaces": {
"sapcommerce1": {
"displayName": "SAP Commerce 1",
"logLevel": "DEBUG"
}
}
}
},
"live": {
"isEnabled": true,
"SAPCommerce": {
"configuration" : {
"url": "http://SAPSystem:9001",
"pageSize": "5"
},
"namespaces": {
"sapcommerce1": {
"displayName": "SAP Commerce 1",
"logLevel": "DEBUG"
}
}
}
}
}