There are some instances where you have many journal entry items in a single journal entry may want to roll up either their credit or debit multiple entries into a single line with a rolled up amount.
To do so, simply follow the steps below.
1. We will have to use the create object -> GL batch action, this involves creating journal entries with custom objects. (shown below)
2. In the entry source list field, we need to put in an array input of line items. For the credit/debit side that will exist as individual line items, we would add in the data pill. This would mean that we would create as many journal entry lines respective to the system which we are bringing the journal entry from.
However, for the opposite entry, we will not be adding in any data pill. This would mean that we will only be creating one entry.
3. In order to roll up the amount, we would have to use the pluck function on the pill that we would want to roll up, in this case UnitPrice (do note that it is case sensitive) from the array input, which is the opportunity product in this case. And sum the entire amount up.