I have a main ticket where an internal budget has been approved for X amount. Later, overtime, multiple tickets with invoices are linked to this main ticket. I'm then adding up the invoice values and comparing it to the main ticket's approved amount to identify when we are on budget.
However, as very often these invoice tickets are linked all at once, the automations do not run in succession and some invoice values are overriden and not accounted for. I want to run a scheduled automation that runs for each main ticket, goes through each invoice ticket and adds up the invoice amount of all and then stores it in the main ticket.
eg.
Main ticket
Invoice Ticket A (invoice amount: 25)
Invoice Ticket B (invoice amount: 17)
Invoice Ticket C (invoice amount: 8)
I want to run an automation that goes to the Main Ticket, then evaluates all linked tickets that meet a certain condition and then add up all the invoice amount and stores the result in the main ticket so that I get invoice amount: 50 in the Main Ticket.