Sitecore Best Practice Series:


Sitecore Content Hub Best Practices


# Practice Rationale
1. Use account impersonation to test security access Content Hub allows impersonating user accounts, to view the client UI from their perspective. This a great shortcut to testing security configuration instead of creating a separate test user.
2. Always apply company’s branding to the Content Hub theme This practice improves Content Hub's usability and adds familiarity to the interface.
3. Use email templates for all emails Email templates allow customizing email content without having to modify scripts or underlying code in many cases.
4. Use domain naming convention in multi-tenant environments The easiest way to keep separation between entity type is by including the domain in the name. For instance, YourBrand.Product.
5. Use XMP metadata in asset creation XMP metadata allows storing information about asset’s context and metadata inside the file. This information can be extracted and display in Content Hub, which can assist with taxonomy and rights management.
6. Structure Content Hub asset collections based on their intent, use, and security requirements rather than type Collections allow grouping related assets into isolated groups. Structuring them based on intent allows for easier sharing, maintenance, and security access assignment.
7. Align showing and hiding empty fields functionality with the user expectations Based on existing tools Content Hub users will either find hiding empty fields on asset detail page confusing, or expected. This expectation likely comes from their experience with existing tools. Making Content Hub behave consistently with the rest of the stack will improve its usability (there are times when it makes sense to modify the other tools instead, however, they are less frequent).
8. Display most frequently user filters, facets and functions closer to the top in all lists Doing so improves usability and accessibility.
9. Display faceting in the left column and dropdown filtering at the top in asset listing views Following this practices improves usability of the filtering controls.
10. To figure out the import Excel file column naming – perform a sample export After extensive schema modifications, it may be hard to figure out the exact column naming for importing new assets via Excel. Uploading a sample asset and then exporting it via Manage > Import Export is the easiest way to figure that out.
11. Make long running scripts run in the background In-process script processing of long-running script will dramatically delay execution in the UI.
12. Keep names developer-friendly and labels – user-friendly Content Hub’s API frequently uses names to access entities, thus, keep them in camel case without spaces, while always use proper casing and spacing for labels for readability.
13. Use extensive logging in scripting Content Hub’s logging is limited in the information it provides, thus, performing your own extensive logging in scripts will assist with issue troubleshooting.
14. Use Content Hub queries in scripting instead of doing multiple calls to the API Querying in Content Hub is robust and allows chaining complex filters to avoid calling the API multiple times, especially if you are calling it through the web.
15. Develop Content Hub scripts using the StyleLabs SDK in your IDE of choice Although the Content Hub scripting interface does provide intellisense, it lack other productivity and debugging tools. Think of it as the Sitecore IDE, if you’ve been around long enough.
16. Avoid enabling the API Token for user accounts Use OAuth and user login credentials to generate a token. Once an API Token is created for a user account, which is a legacy API access way, that user will on longer be bale to login to the online client.
17. Consider including asset Lifecycle Status when applying validation rules Validation needs to happen at the time assets are sent for review, therefore, make sure to explicitly set that as the required status to avoid triggering validation on asset updates in Create view or even when trying to upload.
18. Include repository clause in all conditions related to Content Hub validation, security, and functionality Sitecore Content Hub has various repositories that assets can be long to, for instance, Standard is used for the DAM. It’s important to include repository specification to avoid applying conditions in unintended areas.