Happy Business Starts Here

Senior Tutor

Re: Quote Template Sample with Advanced Customizations

First off, thanks so much for this! So helpful and I'm hoping we'll be able to leverage this to omit "item removed" line items from our renewal forms.

 

I've just about gotten this working, but I'm having trouble getting the nested table to line up with the "parent" table when using the Zuora engine to generate PDF versions of the quote. It looks just fine and everything is flush in Word, but the final PDF file is a bit off. I've been tweaking the size and even trying to make it slightly off-kilter in the Word doc in attempt to make it look good in the PDF, but with no success so far.

Did you happen to run into this at all?

 

 

Here's what my template table looks like with the hidden text showing and hidden, respectively. FYI I'm using a custom formula field in Salesforce ("ChargeSummary.Exclude__c") to determine whether each item should be excluded or not, as well as a few custom fields inside the table.

 

 

 

 

 

 

And how it looks on the PDF:

 

 

Guru

Re: Quote Template Sample with Advanced Customizations

@markgschafer looks awesome. I like the approach of using a formula in Salesforce for hiding, as it simplifies the template logic (which lets face it is not even close to being easy to read when you start nesting IF statements)

 

So on to table alignment: Yes, this was one of the banes of my existence for a while. Word is a bit twitchy when it comes to precision alignment of things, so my approach was as follows:

 

1. The outer table's cell that is being looped should have all margins set to 0

2. My inner table has alignment set to "Center" and Text Wrapping set to "None"

3. The inner table does NOT have a preferred width set (leave it unchecked)

4. Specify each columns preferred with numerically in inches (i.e. in my sample column 1 is 0.88" wide). This should match up with the cell widths of your header row in the outer table.

5. Word is quirky if you make small adjustments to the preferred width as it seems to have some internal snapping logic (i.e. changing from 0.88 to 0.89 may not reflect properly. The workaround is to change it to a larger interval, save and then change to your other one... (so 0.88, change to 1.88, save, change to 0.89, save again) Its silly but it worked and corrected some of my off by a pixel errors.

 

Usually I found if it was looking correct in word but messing up in PDF that it was because the table was adjusting based on the text inside it which generally meant the width was not explicitly specified.

Senior Tutor

Re: Quote Template Sample with Advanced Customizations

Thanks @feisley That very much helped. My two nested tables now seem to line up quite well (though now I'm having a different problem). I was having trouble at first with the fixed width actually "sticking" but I realized you need to click on the table, then go to Layout -> AutoFit and select "fixed column width" there or otherwise it wasn't coming out correctly.



The problem is now I keep getting an empty line in between the header and the nested table. I've tried about 20 versions of the template trying to fix this, but I can't seem to get it to go away. I was having all kinds of issues copying the table between docs or pasting other things into your doc, so I ended up starting from scratch and recreating everything. 

Did you see this at all? It didn't seem to come up for me working directly off your doc, but I can't seem to get it to go away when starting from scratch.

Looks like this in Word when showing and not showing hidden text:




 

and like this in the PDF:

 

From there, I was digging into your original doc, and I'm actually having trouble finding the cell the inner table is nested inside of. It almost seems more like two tables right next to each other but not actually nested inside of each other. So I tried putting the hidden stuff in between two tables of exactly the same dimensions. Again it looks perfect inside of Word, but now the gap in between the two is even larger:








@doyeli any chance you have any input here? Have you seen other customers use this approach?

Senior Tutor

Re: Quote Template Sample with Advanced Customizations

ps. working with Zuora and some Word ninjas on my end- as well I'll post back if I figure it out!

Support SME

Re: Quote Template Sample with Advanced Customizations

Hi @markgschafer sorry, I was out of office last week, so could not respond back earlier.

I would like to request you to please post your solution here if it has been sorted out.

Thank you very much

 

Doyeli






If you found my answer helpful, please give me a kudo ↑
Help others find answers faster by accepting my post as a solution √

Senior Tutor

Re: Quote Template Sample with Advanced Customizations

Kevin from Zuora was able to help me. Even though I'd checked very thoroughly for characters/spaces/line breaks that weren't hidden, we were able to make it work by hiding the entire table and the selecting the header row of the outer table and unhiding it and then selecting the nested table and unhiding it.

Highlighted
Support SME

Re: Quote Template Sample with Advanced Customizations

Thank you very much for the  update @markgschafer

If it is ok with you, can you please attach the sample Quote template for future reference?

 

Thanks again

Doyeli






If you found my answer helpful, please give me a kudo ↑
Help others find answers faster by accepting my post as a solution √

Senior Tutor

Re: Quote Template Sample with Advanced Customizations

Link to doc here (there's not a way to add attachements directly in this forum).

Sample Renewal Form with Logic.doc

 

This is similar to the original doc with a few differences:

  • I'm doing a lot less in my version. I only have logic for skipping the "item removed" and also for exlcuding/including special terms based on the value of Terms__c, but not some of the other logic that @feisley used in his doc.

  • I found it was easier to align the tables without using nested tables. Instead, I'm using two tables of identical dimensions right above/below each other with logic in hidden fields in between them.  I also added a third table to have a box around the final total at the bottom.

  • I'm using Previewed Delta TCV because I found the Total field can be infuenced by outstanding balances on the customer's account and other things like that. I prefer to have the Total equal the sum of all products on that form and have the invoices cover other outstanding balnces, etc.

  • I'm using some custom fields in here, including a feid I'm using to determine whether a line item should be skipped or not.FYI here's the the formula field I'm using on the Quote Charge Summary object in Salesforce for the logic:
    IF(TEXT(zqu__QuoteRatePlan__r.zqu__QuoteAmendment__r.zqu__Type__c)="RemoveProduct", "Exclude", null)
Guru

Re: Quote Template Sample with Advanced Customizations

Very nice @markgschafer!

 

Our template is indeed a bit complex. The main reason for so much complexity is a) some backwards compatibility due to how we implemented in the early days (which we are in the process of removing where possible). Additionally, we use one template to handle all quote types (new, amend, renew) so there is a decent amount of logic that pertains to handling those scenarios in a consistent manner.

 

Interesting point about the lack of nested tables. I recalled hitting an issue when I did this previously (though i am foggy on if it was on Quotes or Invoices) but the issue was that if the "TableStart" / "TableEnd" merge fields were not actually inside a table, they would throw an error. So either you found a way around this or the conditions were slightly different (or perhaps Zuora fixed that behavior on the backend). At any rate, I am going to retest when I have a moment, because as you say, life is much happier without nested tables.

 

Previewed_Total does include Draft invoices as I recall (which in some ways is logical, and in other ways causes me frustration). I would be curious as to @nathanc's thoughts on this behavior. With all that said, there are changes coming to Quote metrics that (in my opinion) will vastly improve the clarity of metrics in a quote (i.e. order) context.

Support SME

Re: Quote Template Sample with Advanced Customizations

Thank you very much @markgschafer.

Regarding not being able to attach files to comunity thread, please review the comment from our communty manager here

 

https://community.zuora.com/t5/Community-Advocates/Community-Attachments/gpm-p/17092#M10

 

Thank you
Doyeli






If you found my answer helpful, please give me a kudo ↑
Help others find answers faster by accepting my post as a solution √