05-15-2020 09:59 PM
Hello community
I have been assigned to look into content personalization capability in Alfresco Content Services.
What we are looking for is that, how to personalize contents stored in repository so that users see personalized content (be it search or doclib or any allowed part in repo) based on some presonalized criteria such as Time zone, Markets, Devisions, etc. etc.
Have you implemented this kind of functionality in Alfresco? Is there any add-on available?
Can you advice whether it's feasible and doable or not?
05-21-2020 11:10 AM
I have not dealt with content personalization as yours before, but based on what you have mentioned, i can think of doing following steps to achive the goal. I am not sure if this will fit exactly to your requirement and someone else may have a better solution than this.
What is known:
1- REST APIs will be used for content requests.
2- You know the creteria on which the content will be returned in response. Some are market, a specific city/state, zone, existing user credentials (not sure what will come in the request)
3- I am assuming editors are using share ui for adding/uploading content and metadata.
Based on above known conditions:
1- Create a custom content model for personalized content mapping.
For reference: https://ecmarchitect.com/alfresco-developer-series-tutorials/content/tutorial/tutorial.html#part-1-i...
2- Create aspects for mapping the personalized content metadata.
e.g.: marketsAspect, citiesAspect, statesAspect, avaibaleZonesAsepcts etc.
For reference: https://ecmarchitect.com/alfresco-developer-series-tutorials/content/tutorial/tutorial.html#aspects
3- Create constraints mapping to the markets, cities, states, availableZones etc. and use them for the properties within aspects, so that you see a fixed list of options on share UI).
For reference: https://ecmarchitect.com/alfresco-developer-series-tutorials/content/tutorial/tutorial.html#constrai...
4- An additional aspect for marking the start date/time and end date/time of this personalized content, so that this content can be marked archived or renewed after expiry (end date/time).
5- Implement a behavior to apply these aspects on node/content creation (when editors upload/create content).
For reference: https://ecmarchitect.com/alfresco-developer-series-tutorials/behaviors/tutorial/tutorial.html#implem...
Or mark these aspests as mandatory aspects so they are by default available on all the newly added content.
example:
<mandatory-aspects> <aspect>demo:markets</aspect> <aspect>demo:states</aspect> <aspect>demo:cities</aspect> .... an so on </mandatory-aspects>
Or force the properties on share forms (e.g. <show id="demo:city" force="true"/>) for the content types so that when editors select/apply metadata, the aspect is applied automatically.
Note- For existing content/nodes, you would have to write a cleanup script to apply these aspects (find all nodes in repository within any scope e.g. site/share files etc. and apply the aspect where these aspects are not present) if you want existing content to be used for personalization. I assume it would be.
6- Map aspects/properties to the share form for the selected content types or based on aspects.
For reference:
https://docs.alfresco.com/6.2/tasks/forms-aspect-display.html (Refer point 5 in this doc.)
7- Implement a custom webscript/rest api for filtering the content and return to the web-app (as you mentioned) based on required inputs. You can call this webscript/api as a custom search api may be. Model your request and response formats for this api based on requirement. You can choose to ue json request containing all creteria or accept each creteria as param. JSON Request is preffered approach as it gives you flexibility to consume single payload and process it instead of working through n number of params.
You can use Services such as: SearchService, NodeService, TaggingService, etc. depending on your response needs.
Here is reference to full servives and apis:
https://docs.alfresco.com/5.2/concepts/dev-services.html
https://docs.alfresco.com/5.2/references/dev-extension-points-public-java-api.html
Again, this is just an idea i can think trough for your use case.
07-14-2020 08:09 PM
We took the approach to start with as suggested. Thanks again for all the help
Explore our Alfresco products with the links below. Use labels to filter content by product module.