Using Sitecore 9.1
I need to add profile values programmatically to a profile created under Marketing Control Panel. Once this is achieved, the idea is to use it for personalization by setting up rules. After much of research, I came to know that XConnect Behavior Profiles needs to be used for personalization based on historical profile data and that which would work in multiple visitor sessions, but I need more guidance in achieving it or the code snippet. How can I save the profile data to the visitor/contact and then use it for personalization by setting up rules? Please guide me.
If adding profile score would not be enough / complex, please let me know how I can set pattern cards instead. Thanks