Happy Business Starts Here

Re: Nested Tables on Invoice Template

Nested Tables on Invoice Template

It would be a really big improvement for Invoice Template layouts if the ability to nest related tables was available, ie InvoiceItem and Subscription. With current functionality while the SubscriptionNumber is available from the InvoiceItem table when it is displayed on an invoice it gets listed out on each line (which makes sense since this is just another field). However, we would like to be able to lay-out the InvoiceItem table as it apears in the Zuora UI where the Invoice Line Items are listed grouped by Subscription (see below). This would be especially benificial when multiple subscriptions are billing on a single invoice, where it can be confusing to keep track of how many line items roll up to a single subscription.

Invoice Line Items.png


By being able to nest the InvoiceItem into the Subscription table we would also be able to include custom fields which are maintained on the Subscription without having to list out a second table on the template just to display that information.


 @bsanders Very much agree that being able to group items on the invoice like its shown on the invoice would be great. Going even further would be nice to group as follows:



|-- Rate Plan

      |-- Charges


This can be accomplished in Quoting by doing some fun (advanced) loops and building up the tables in a somewhat "programatic" manner. But we cannot do this workaround in invoices because invoices restrict you to one table of each type (I have an idea for the team to remove this limit here if you are interested: http://community.zuora.com/t5/Billing-Payment-Ideas/Allow-repeated-tables-in-invoice-template/idi-p/...


I think that feature, coupled with nested tables for the Subscription, Rate Plan, and Charges objects would be huge in terms of flexibility. Then you could do things like:


Subscription Summary:

- Subscription 1 

--- Rate Plan X

--- Rate Play Y


Rate Plans and Charges:

- Rate Plan X

--- Charge A

--- Charge B

--- Charge C

- Rate Plan Y

--- Charge E


You could separate things out where it makes sense or use one large nested structure to display everything.

Valued Scholar

@feisley You hit the nail on the head regarding grouping the layouts. Though the Invoice Templates do not currenlty have the Rate Plan or Rate Plan Charge objects available, this information is available through the InvoiceItem object. I think this is done intentionally because then the information is directly linked to what was charged while the Rate Plan and Rate Plan Charge objects can contain a wealth of information beyond what was actually invoiced including historical and future charges which may not be relevant.


I read your suggestion about multiple tables and agree that these go hand-in-hand and have up voted it.


Right, so you have a handful of fields from the Rate Plan, Charge, and Subscription included on the InvoiceItem objects.


Would be interesting to have multiple levels of access... Example: InvoiceItem.RatePlan.X or InvoiceItem.Charge.X or InvoiceItem.Product.X to give access to more details.


It would also be nice to have clener ways to summarize the data. For example, we have the subscription id shown with the invoice item so you might get:


A-S1 - Invoice Item 1 - Recurring
A-S1 - Invoice Item 2 - One Time
A-S2 - Invoice Item 1 - Recurring


Ideally as stated before it would be ideal to group by anything and summarize it (this would work well in nested tables):



-- Invoice Item 1 - Recurring

-- Invoice Item 2 - One Time


-- Invoice Item 1 - Recurring


Or to do it another way (this would not likely work in nesting, but still an interesting scenario):


Recurring Charges:

-- A-S1 - Invoice Item 1

-- A-S2 - Invoice Item 1

One Time Charges:

-- A-S1 - Invoice Item 2


Some thought would need to go into how to make this clean to implement in the template. With the multiple tables, loops, and variables (bookmarks) i bet i could implement it, but it would not be pretty and aproachable to the broader audience. A clean way of doing this using mergefield markup would be ideal.


Zuora Alumni
Status changed to: Coming Soon

Hi All,


We are planning to add table nesting for the InvoiceItem table. This will allow multiple levels of table nesting so that you can group charges by any InvoiceItem merge field. We already support nested tables for Usage and would like to extend this support to all tables. You will be able to use this new table-nesting capability in our June 2016 release. I welcome your feedback on this.


We will not be able to for example nest the Subscription table within the InvoiceItem table and vice versa. We may consider this for a future enhancement. Thanks.




@nharlow awesome news! We are looking forward to giving this a try in our templates.


While you mentioned you cannot nest the invoice items inside of the subscription table, could you still group/nest on the subscription level attributes in the InvoiceItem table? i.e. right now the InvoiceItem table has InvoiceItem.SubscriptionNumber so could we accomplish something like



-- Nested Table containining: InvoiceItem.ProductName, InvoiceItem.Quantity, etc that corelate to the above SubscriptionNumber


So visually you would have:


Subscriptions Table:

Sub123 - Sub.Detail, Sub.Detai, Sub.Detail

Sub456 - Sub.Detail, Sub.Detai, Sub.Detail


InvoiceItem Table(with nesting):


  II.Detail, II.Detail, II.Detail

  II.Detail2, II.Detail2, II.Detail2



  II.Detail3, II.Detail3, II.Detail3


Zuora Product Team
Status changed to: Implemented

The ability to create nested tables on an invoice template is available in Zuora. For information on how you can configure your invoice templates to display usage charges and invoice items in nested tables click here. To see examples on the Knowledge Center of using nested tables on invoices click here.