Finally got this working. In case someone get here here’s how I did it.
Kept the previous function that updates the attributes when an order is saved using “Shopware_Modules_Order_SaveOrder_ProcessDetails” , the problem is that at that point the attributes are already fetched so you need to subscribe to the filter to pass the attriubute value, I have used ‘Shopware_Modules_Order_SaveOrder_FilterAttributes’. In that function you need to retrieve the attributeData and attach your value. Once this is done you can return it.
Hope this helps