...
Digizuite has a very powerful automation engine which allows customers to construct business logic in a drag & drop fashion (no code). The logic consists of a number of steps that can either be a trigger, an action, a filter or for-loop (iterating elements). So an automation could be triggered based on metadata changes on an asset, or an asset arriving at a certain state in a workflow, and then the steps can filter if that change is relevant and if it is then perform certain actions within the DAM or externally. Full docs are here: DC 5.6 Automations.
It comes out-of-box with your Media Manager:
...
In this context, it is the ‘externally' part that is interesting to integration. An automation has an action which can invoke an external endpoint with values from the current automation (could be an asset ID or workflow ID) as query parameters. The external system could be simply utilizing a 3rd party service but it could also be a data integration where a downstream system must be notified (broadcast).
...
One way to extend the Automation is by using own services or maybe creating small purpose-built Azure Functions. For a simple teams or slack integration, or if you wish to extend the platform to talk to your favorite Task & Project Management Software then simply add that API logic in an an Azure Function with 4-5 lines of code and let it be invoked from automation as described above.
If you need to synchronize certain elements from a downstream system (two-way) then an option could be to use a scheduler that would trigger external logic to handle the fetch. Could be an azure function using the SDK to update metadata or similarly but always be careful with data heavy integrations.
...
Integration Endpoints
Integration Endpoints
...
Standardizing the Integration Process with Patterns makes it simple to be notified on all asset changes (create, modify, delete) and then any metadata definition within the platform. The main difference is its sole focus on outbound integration and making that as easy and centralized as possible to create, maintain and monitor an integration that requires a middle-layer to handle what should happens to those assets as they are changing.
Use automation when you have the need to construct business logic in a no-code fashion and have a more lightweight integration such as Teams, Slack or maybe even Project Management tools since you can easily tie it together with the Digizuite Workflows by using out-of-box. Integration Endpoints is the go-to for data heavy integrations where volume is high and any errored asset must always be retried if it fails.
...
So for any integration endpoint, it can be clicked and the below notification overview is shown for you to easily ensure that all failed can be retried and delivered.
...
The Integration Endpoint can similarly to the Invoke Endpoint in Automation, invoke any external service with URL and custom headers for authorization.
...
In the service, then all the custom integration logic can be placed. Again, this could an Azure Function that acts as the connection to your downstream platform.
Extensions with Azure Functions (or own Service)
A simple approach to extending integration capabilities is using the Azure Platform and more specifically Azure Functions. It provides an on-demand cloud service (serverless compute) where the focus is on pieces of code that matter to your infrastructure and then the Functions handle the rest and it will scale.
A simple example would be needing a teams integration that must trigger based on certain things happening in a workflow or maybe metadata changing so that you must be notified.
A simple azure function that could be deployed within your own infrastructure in minutes is:
Code Block |
---|
[FunctionName("TriggerTeamsIntegration")] [OpenApiOperation(operationId: "TeamsIntegration", tags: new[] { "Teams", "Integration" })] [OpenApiSecurity("function_key", SecuritySchemeType.ApiKey, Name = "code", In = OpenApiSecurityLocationType.Query)] [OpenApiParameter(name: "title", In = ParameterLocation.Query, Required = true, Type = typeof(string), Description = "The **Title** parameter")] [OpenApiParameter(name: "text ", In = ParameterLocation.Query, Required = false, Type = typeof(string), Description = "The **Text ** parameter")] [OpenApiParameter(name: "color", In = ParameterLocation.Query, Required = true, Type = typeof(string), Description = "The **Color** parameter")] [OpenApiParameter(name: "assetId", In = ParameterLocation.Query, Required = true, Type = typeof(string), Description = "The **Color** parameter")] [OpenApiResponseWithBody(statusCode: HttpStatusCode.OK, contentType: "text/plain", bodyType: typeof(string), Description = "The OK response")] public async Task<IActionResult> RunTeams( [HttpTrigger(AuthorizationLevel.Function, "post", Route = null)] HttpRequest req) { _logger.LogInformation("C# HTTP trigger function processed a request."); string title = req.Query["title"]; string text = req.Query["text"]; string color = req.Query["color"]; string assetId = req.Query["assetId"]; var assetUrl = $"https://demo-dam-dam-dam.my-domain.com/asset/{assetId}/asset"; if (string.IsNullOrEmpty(title) || string.IsNullOrEmpty(text) || string.IsNullOrEmpty(color)) { return new BadRequestErrorMessageResult("Invalid Query parameters. Title, text and color are all mandatory"); } // Adding get asset name to title var asset = await GetAssetById(assetId); if (asset != null) { title += $" ({asset.Name})"; } // Let us try it out! var url = "<INSERT WEBHOOK URL HERE>"; var client = new TeamsNotificationClient(url); var message = new MessageCard(); message.Title = title; message.Text = text; message.Color = color; message.Sections = new List<MessageSection>(); message.PotentialActions = new List<PotentialAction>(); message.PotentialActions.Add(new PotentialAction() { Name = "Open Asset in Media Manager", Targets = new List<PotentialActionLink>() { new() { Value = assetUrl } } }); await client.PostMessage(message); _logger.LogInformation($"Good to go {JsonConvert.SerializeObject(new { message })}"); return new OkObjectResult(message); } |
Using the SDK in the above context (using The Azure Functions can also use the Digizuite SDK if there is a need for fetching more information about the assets. It can be done by getting our Open Source SDK (https://github.com/Digizuite/Digizuite.SDK ) and then using simple dependency injection as described here https://docs.microsoft.com/en-us/azure/azure-functions/functions-dotnet-dependency-injection to inject it). Then asset information (and all other availble functions in the SDK) can be fetched like this:
Code Block |
---|
..... public async Task<Asset> GetAssetById(string assetId) { var parameters = new SearchParameters("GetAssets") { {"sAssetId", assetId} }; var response = await _searchService.Search<Asset>(parameters); var listOfAssets = response.Items.ToList(); return listOfAssets.Count > 0 ? listOfAssets.First() : null; } |
...
To the Invoke Endpoint as made above then simply take the URL and add it here (remembering to add the right asset ID parameter):
...