Add price when I add a product to the shopping list

Let’s see I can explain what I want to do, maybe it is not the best way to do it but for my knowledge it would be the simplest, I want to make an automation that when I add a product to the shopping list it adds the price in an assistant and adds up As products are added (price that I have in other sensors) the problem is that I cannot identify which product enters the list, if I identify when it enters the list of completed with the following templates

{{ ‘Coca Cola’ in trigger.to_state.state.split(‘;’) and ‘Coca Cola’ not in trigger.from_state.state.split(‘;’) }}

but to detect which product enters the shopping list it does not help me

thanks in advance