Add Asset to Batch Set from metadata property values | Community
Skip to main content
Level 2
September 13, 2024
Solved

Add Asset to Batch Set from metadata property values

  • September 13, 2024
  • 3 replies
  • 679 views

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 

 

This post is no longer active and is closed to new replies. Need help? Start a new post to ask your question.
Best answer by khamat_bn
@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.

 

3 replies

kautuk_sahni
Community Manager
Community Manager
October 17, 2024

@digarg17 @diksha_mishra @priyankaku @rahulmohan @tarunkumar @khamat_bn Curious to hear your perspectives on this question. Do you all mind sharing your thoughts?

Kautuk Sahni
Adobe Employee
October 18, 2024

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.

khamat_bn
khamat_bnAccepted solution
Level 4
October 19, 2024
@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.