How do you create a Zuora invoice template that sums up the quantity field of multiple charges of the same name?

Edited

Here are the steps to achieve this:

1. Insert a TableStart merge field to mark the beginning of the table. For example, if you want to sum up the quantity field of charges, you can use the merge field: {MERGEFIELD TableStart:QuoteRatePlanCharges \* MERGEFORMAT}

2. Insert the merge fields for the fields you want to display in the table, including the quantity field. For example: {MERGEFIELD QuoteRatePlanCharge.Quantity \* MERGEFORMAT}

3. Insert a TableEnd merge field to mark the end of the table. For example: {MERGEFIELD TableEnd:QuoteRatePlanCharges \* MERGEFORMAT}

4. To sum up the quantity field, you can use the SUM function in the merge field. Modify the merge field for the quantity field as follows: {=SUM(QuoteRatePlanCharge.Quantity) \# 0}

The resulting merge field will look like this: {=SUM(QuoteRatePlanCharge.Quantity) \# 0}

By using the SUM function, the merge field will calculate the sum of the quantity field for all charges with the same name.

Please note that the specific merge fields and table names may vary depending on your use case and template configuration. Make sure to use the appropriate merge fields and table names based on your requirements.