I created a custom property for the Company object named Customer Lifetime Value. I want to automatically calculate the value of this property based on the sum of all associated deals.
ChatGPT suggested creating a workflow that updates the value every time a deal is marked as Closed Won, but I also want to apply this retroactively — not just for deals moving forward. What’s the best way to achieve this? Any tips, tricks or best practices?
Many thanks!
Hi @level-ground,
A nice example of generative AI giving misleading advice 
This can be achieved easily (and retroactively) using a roll-up property: Create calculation and rollup properties
Let me know if you have any follow-up questions!
This was super helpful! I was able to calculate Lifetime Value based on past deals. For some reason, it’s giving me a higher amount than the total sum of invoices. I’ll keep working on it and report back 
A workflow is a great start, but for retroactive calculations, a custom script or scheduled automation might work better. You could use a CRM report or Magistv Apk API call to sum past deals and update the property in bulk. Have you checked if your CRM allows batch updates.