The Canto Sitecore Connector requires Sitecore 9.1.1 rev 002459 or higher as well as the .NET Framework 4.7.2 or higher.
The plugin is installed within the desired Sitecore instance using the toolkit provided by the environment.
The package can be downloaded here: https://team.canto.com/b/KBJPI
Using the Sitecore Desktop, utilize the Installation Wizard located in the Development Tools which are accessible through the Sitecore start menu.
Upload the installation package via the Upload package button and choose Next on the installation wizard dialog.
Follow the installation wizard prompts to successfully install the Importer package, choosing to overwrite files when prompted.
To ensure that Sitecore can access your Canto account via the plugin, a few changes are necessary in the config files of your website.
The configuration file Canto.Settings.config contain all the information required by Canto.
The Canto environment determines the region of your Canto repository.
In most cases, this would be canto.com for US customers or canto.global for all other customers.
Ensure that only one of the available Canto environment setting options is active!
The client credentials access token is required for Sitecore to connect directly to Canto without forcing users to enter their login information each time the importer is opened.
Those credentials can be generated in your Canto account under Settings > Configuration Options > API Keys > Support Client Credentials Mode.
The client credentials access token is required for the scheduled updater task (see below).
If you do not enter a Client Credential Token in the configuration file or if that token is incorrect, users need to manually log in to Canto whenever importing files to Sitecore.
The Canto tenant ID is the name of your individual Canto account, e. g. https://aaa.canto.com or https://bbb.canto.global.
The importable file types determine the files that are displayed in the Sitecore Connector.
These are generally standard file extensions such as “jpg”, “png”, “pdf” or “mp4”.
To add more, simply add the extensions, ensuring that they are separated by a semicolon.
The configuration file z.Sitecore.config patches values that are set by Sitecore.
Currently, it is used by the Canto plugin to patch media types, so that the updater is able to retrieve the required metadata in order to update the assets.
Additionally, these patched templates are used by the canto downloader to set the Canto metadata.
The Canto Sitecore Connector utilizes the Sitecore Globalization to translate the texts for status messages, button labels and the window title.
These can be modified and additional languages can be added via the language versions.
Items can be found in the Core database under /sitecore/system/Dictionary/Canto/.
Custom Media Types
The Canto Sitecore Connector is able to import all default Sitecore media types.
Should any custom types be defined, they will need to be added to the Canto meta definitions.
These are located in the /Templates/System/Canto tree node and a new entry should be added for each custom type which inherits from the original custom template as well as the CantoMediaAsset template.
This needs to be done once for Unversioned Items and once for Versioned variants.
Additionally, the Custom types must be patched in the App_Config/Include/Canto/z.Sitecore.config.
How to use
Each subfolder in Sitecore’s Media Library allows the option of uploading assets via the Canto importer.
When a Media Library folder is selected, the content tab now contains a button labelled Import from Canto.
In the popup window you can now browse through your folders and albums within your Canto Main Library (1) or search for a specific asset (2).
You can choose a single asset to be imported into your Sitecore Media Library...
... or select several assets to be imported in bulk.
A dialog with a progress bar shows the import process of all selected assets.
Once the import is done, you can use those assets in Sitecore as you usually would.
You can, for instance, insert an image to a text passage on your website.
Choose the desired image from your Sitecore Media Library...
... and accept your changes if satisfied.
Automatically update assets
After importing assets from Canto, any changes made in Canto are not automatically reflected in Sitecore.
However, all imported assets can be updated automatically by setting up and running the scheduled update Task.
By default, Sitecore stores the user scheduled tasks in the “/sitecore/system/Tasks” tree node.
After selecting the scheduled task item the schedule can be defined in the Schedule field.
The scheduling consists of a pipe-separated string which is made up of the following:
1) Start timestamp: Determines the start of the scheduled task. This timestamp uses the Sitecore ISO datetime format (yyyyMMdd’T’hhmmss). 20000101 or 20000101T000000 would be January 1st,
2000 at 00:00:00 hours.
2) End timestamp: Determines the end of the scheduled task. This timestamp uses the same format as the start timestamp.
3) Days to run: This variable is an additive representation of the days on which the scheduler should run. Using the values detailed in the below table, running the scheduler on Mondays and Fridays (2 + 32) would require this value to be set to 34. For the scheduler to run every day, a value of 127 needs to be set.
4) Interval: Determines the interval between each time the task is run. The default is set to 24:00:00.