Expand my Community achievements bar.

Add Asset to Batch Set from metadata property values

Avatar

Level 2

I wonder if there is a way to add an Asset to a Batch Set Preset but instead of matching a naming convention, to match it based on a metadata property.

 

Let's say that I have Assets with a metadata property which is an array of Strings:

 

jcr:content/metadata/dam:myCodes

 

And when I upload images that has this metadata property with values:

 

 my_testing_asset_one.png

 

3025070-100
7002011-369
6036221-045

 

 

 my_testing_asset_two.jpeg

 

3025070-100

 

 

 my_testing_asset_three.tif

 

7002011-369
5234620-136

 

 

It gets assigned to a Batch Set per one of myCode, and each site in Scene7 as follows will display:

 

https://company.scene7.com/is/image/projectName/3025070-100_is?req=imageset

projectName/my_testing_asset_one, projectName/my_testing_asset_two

 

https://company.scene7.com/is/image/projectName/7002011-369_is?req=imageset

projectName/my_testing_asset_one, projectName/my_testing_asset_three

 

https://company.scene7.com/is/image/projectName/6036221-045_is?req=imageset

projectName/my_testing_asset_one

 

https://company.scene7.com/is/image/projectName/5234620-136_is?req=imageset

projectName/my_testing_asset_three 

 

3 Replies

Avatar

Administrator

@digarg @diksha_mishra @PriyankaKu @RahulMohan @TarunKumar @khamat_bn Curious to hear your perspectives on this question. Do you all mind sharing your thoughts?



Kautuk Sahni

Avatar

Employee

I am not sure if we can do this, as batchset is based on asset Naming Convention and regex should match to create a set. I would suggest creating adobe support ticket to know the feasibility of this use case using batchset.

Avatar

Level 5
@pabloram23 
Instead
of relying on the asset name, the batch set assignment can be made dynamically based on the metadata property array values.
This can be done using a custom workflow or a service that iterates through your assets and checks for the matching metadata property values.

You need a custom AEM service or workflow that: which Iterates over your assets, checks the values of the dam:myCodes metadata property  & Groups assets with matching metadata values into batch sets. Then you need to do define Metadata-Based Asset Grouping (which means you  can categorise asset from dam:Mycodes ) 

Lastly, For each asset in the repository, you need to extract its dam:myCodes property. Then for each code in the dam:myCodes array, assign the asset to a batch set named after the code.
This way, assets with shared metadata codes will belong to the same batch set.

 

Let us know for doubts and further assistance.