Digizuite DAM integration service provides an API where integration endpoints can register for notifications regarding asset and metadata changes. We have made it easy to setup the connection between Sitecore and Digizuite. You registrer an url and your Sitecore instance will receive notifications from Digizuite whenever an asset changes. In Sitecore we have created a new controller, which is located at the following route [siteUrl]/damforsitecore/silo/update. This is the endpoint that receives notifications from Digizuite. An important thing to note here is, that the endpoint should must be reachable by the Digizuite server. Otherwise, the notifications won't be sent. This is usually the case for developers on local environments.
...
Code Block |
---|
public class UpdateNotification { public ChangeTypeList<ChangeData> ChangeTypeData { get; set; } } public class ChangeData Data { get; set; } } public ChangeType ChangeType { get; publicset; class} ChangeData { public int ItemId { get; set; } public int BaseId { get; set; } } |
The property ChangeType indicates whether it's an AssetChanged, MetafieldChanged, ComboValueChanged or TreeValueChanged. The DAM for Sitecore connector only support the event type AssetChanged. The following happens when we recive the AssetChanged event:
Run the pipeline
DFS.DigizuiteUpdateNotification
Call Digizuite api to fetch the asset information.
Save the asset in the asset silo (/sitecore/media library/Digizuite/Assets).
Delete items, which has been deleted or unpublished form the Sitecore channel in Digizuite.
Clear local asset cache.
Send remove event to all CD servers and clear cache.
Info |
---|
If you want to execute your on custom code around these update events, then hook into the pipeline. |
Setup the endpoint
Go to DFS 11.0 - Digizuite Integration
Verify the connection
If Digizuite DAM server can access your site, change an asset in the Digizuite DAM Center and verify that the notification has been sent to Sitecore.
Go to the DAM Center and find an asset that is published to the Sitecore channel.
Change some of the metadata, e.g. the title. The Digizuite DAM will notify all registered integration endpoints with the update.
You should see the following log statement in the file dfs.digizuiteintegration.log. This indicates that Digizuite DAM has delivered the notification to the controller inside Sitecore.
Code Block DFSDigizuiteIntegrationLog 40008 13:03:11 INFO DigizuiteIntegration UpdateEvent: ID: 2095 ChangeType:AssetChanged