Happy Business Starts Here

Quote Template Sample with Advanced Customizations


Quote Template Sample with Advanced Customizations

Over the past year, we have put a bunch of work into our quote template and I wanted to share these efforts with the community so that others might benefit from our research and experimentation (and hopefully get some feedback from others on possible improvements or clever tricks).


How To Use


First of all, if you have not done advanced template formatting, here are a few basics. I work on a Mac using Word 2016 so screenshots and keyboard shortcuts may vary slightly if you use Windows.


When opening the template, you need to be sure to show hidden text as well as show field codes:

  1. To enable hidden text click the following button:
    1. Screenshot 2017-03-27 13.17.55.png
  2. To show field codes, you will need to press Alt/Option + F9 to toggle field codes. When this is done you should see things like { MERGEFIELD } throughout the document. If you are on a Mac laptop, you will also need to hold the 'Fn' key while pressing Alt/Option + F9 to enable the function keys instead of media shortcuts.


One caveat to mention is that in order to show some of the advanced functionalities, we had to leave in the custom fields we had created to make this work. Due to this, you will not be able to simply upload this quote as-is to Zuora and expect it to work. This sample is intended as a starting point that you can take and adapt into your quote based on the features that you need.





The primary goal of these cusomizations were to make the Quote template dynamic so that our entire organization had exactly one template. This same template is used for a) multiple legal entities / subsidiaries, b) multiple currencies d) new, amended, and renewal subscription quotes.




The template design relies heavily on a number of building blocks that allow the advanced customizations to work. The two biggest ones are {IF} conditional statements and bookmarks (or practically speaking variables) using {SET}


EDIT: An additional concept I had not included initially was that of hidden text. Hidden text allows you to have formulas and logic formatted cleanly without the line breaks showing up in the rendered output. Hidden text is denoted by a faint dotted underline as shown here:

Screenshot 2017-05-02 13.46.24.png


Note that the dotted line does not appear under the line break special character, but rest assured its there if you highlighted the full line of text to hide it.


This text will be hidden once you un-select the show hidden content / characters on the toolbar:

Screenshot 2017-03-27 13.17.55.png


To hide text, highlight it, right click and select "Font", and then check the box for "Hidden" on the font options window.






The following features have been included in this template:

  1. Dynamic Company address based on legal entity.
  2. Dynamic currency symbols based on Quote currency (i.e. shows £ 10.00 and € 12.00 instead of GBP10.00 and EUR12.00)
  3. Tax naming by jurrisdiction - Certain countries refer to their tax differently (i.e. VAT or GST). The quote will replace the labels dynamically so that it appears in the local terminology
  4. Dynamic hiding of product descriptions - Sometimes sales wants to hide row level descriptions and show only SKU / quantity / price. There is a quote level attribute to hide the descriptions when requested.
  5. Conditional Rows
    1. This is by far the most advanced part of the template. It is built by nesting a table within another table and simulating a single table by virtue of the fact that the template packs the individual tables close together. Thereby giving the illusion of a single table but allowing us flexibility to show or hide rows.
  6. Grouping of Rows
    1. This is less a feature of the template and more a trick using the Salesforce platform.
    2. We wanted out Quote items to be sorted as follows:
      1. By Amendment Type (i.e. new products first, removed products at the bottom)
      2. By Product Type (i.e. Subscriptions above One-Time purchases)
      3. By Product Category (Base plans above Add-Ons)
    3. We implemented this sort in the Quote using the "TableSort" mergefield but the fields it uses are formula fields in Salesforce that implement our sorting business logic and emit a numeric value the system can sort on. (since normally the system would sort lexographically based on the category name for example which would not achieve the desired outcome.)




There are a few caveats I wanted to point out:

  1. As mentioned above, this relies on some custom fields, so you wont be able to simply upload and try this. You need to remove the features that depend on the custom fields or add the custom fields first.
  2. The total column in the table has some logic that was there for legacy reasons (i.e. quotes that were created before some of the new billing preview fields were available and populated. In practice the ChargeSummary.BillingSubtotal field should cover almost all use cases.
  3. There is a work-in-progress section at the top for the Quote header information where we can show one version with Bill To and End User and another with a Bill To, Reseller, and End User (designed for use with distributors). You will see this is hardcoded to use the simplified one as we have not yet developed out this functionality.


Help / Questions


This is by no means exhaustive documentation for this template, if you have questions or would like clarrification on a particular area, please post below and I will be glad to help out.





Ok now for the exciting part (hopefully you have read the above as well):






Community Manager

Re: Quote Template Sample with Advanced Customizations

This is awesome!!!  Thanks for sharing @feisley!!!


Are you coming to Subscribed '17? If so, stop by our booth so that we can all give you some major high-fives 😄

Lana Lee | Senior Community Manager and Strategist
"A little consideration, a little thought for others, makes all the difference." —A. A. Milne
Zuora Alumni

Re: Quote Template Sample with Advanced Customizations

Thank you SO MUCH @feisley



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

Valued Scholar

Re: Quote Template Sample with Advanced Customizations

Hi @feisley! Thank you for the template. Can you help me understand the 'SET showRow "1"' followed by 'If 0 = 1' part? Where are we defining what's is the set, and I'm completely lost about what zero equals one means! 


We're trying to only hide recurring products which have effective price of zero and are effecitvely duplicates. While we would like to show one time charges with effective price of zero because they waves strategically and we would like to show them that it was waved. 


Thank you! 



Re: Quote Template Sample with Advanced Customizations

@Salome Our logic sets showRow = 1 and then based on the values of the AmendmentType and QuoteType we optionally do a SET showRow = 0.


If you are seeing IF 0 = 1 it may be you have not expanded all the merge fields. Our template looks like the following when expanded:


Screenshot 2017-04-26 11.51.59.png


Valued Scholar

Re: Quote Template Sample with Advanced Customizations

Much more helpful! Thanks! 


I'm still having an issue where either everything is displaying or nothing. Where do I define set zero? Also, how come it's not parsing to only pickup charges that are both recurring and have price greater than zero? Screen Shot 2017-04-26 at 4.53.57 PM.png


Happy to take this offline salome@socialtables.com and would love to either jump on a screenshare or shoot over the word doc! 



Re: Quote Template Sample with Advanced Customizations

It looks like your issue is that you are referencing fields without the mergefield syntax.


If you are referencing a field from Salesforce Quote/Rateplan/etc it should look like:


{ MERGEFIELD ChargeSummary.QuoteRatePlan.AmendmentType }


If you are referencing a variable in the Quote that you created using SET ( i.e. { SET showRow 1 } then you can reference it by the name only:


{ showRow }



As a side note, I notice your rows are built using the "QuoteRatePlanCharge" object. If you are on Quotes v6.5 or higher, I suggest moving to use the "ChargeSummary" object as its now present for all quote types and has a lot more flexibility in my opinion.

Valued Scholar

Re: Quote Template Sample with Advanced Customizations

Thanks, @feisley! Unfortuantley, I've spent couple of hours on this and am still hitting a wall where either too much is displayed or nothing at all. Is there any way we could do a 30 min screenshare? 


Re: Quote Template Sample with Advanced Customizations

@Salome messaged you privately to take a look.


Re: Quote Template Sample with Advanced Customizations

Updated the original article with notes on how Hidden Text works with respect to templating.