26
JanOn the quote document, by default, we see only the quote total. But what if you'd like to see more granular subtotals? This is, of course, possible to accomplish. We could show a list total, which summarizes all the list prices before the discounts. We could also include a net total, including the quantities. Also, suppose there are discount schedules or anything affecting the regular prices. In that case, the difference between the list price and the regular price can be shown in another field - say regular total. Furthermore, if there are any additional discounts, the total discount can be shown in a discount total field. Thus, there are plenty of possibilities to get more granular when it comes to quote subtotals.
The implementation process for this contains several steps, but it's well worth it.
First, let's start by creating four pieces of template content containing the necessary merge fields on the quote object:
- List Amount Total
- Regular Amount Total
- Discount Amount Total
- Net Amount Total
For the first field, choose the HTML type, and in the Content Name field enter List Amount Total.
Then, edit the source code by clicking the source button in the toolbar. Copy and paste the following code:
Then click Save. Notice that what we get in the WYSIWYG text editor is a table with some text and a merge field.
So, what we've got here is actually the List Amount field on the quote, which is a roll-up of the quote lines list total.
Repeat the same steps for the rest of the fields by cloning the first template content and then by subsequently editing the template to include the API names of the following fields:
- Regular Amount Total: SBQQ__RegularAmount__c, a roll-up of regular amounts of quote products.
- Discount Amount Total: SBQQ__AdditionalDiscountAmount__c, a formula field showing the Amount of additional discount on the quote, that is the difference between Regular Amount and Customer Amount.
- Net Amount Total: SBQQ__NetAmount__c, another roll-up summary field which shows the Total Net Amount of each non-optional line item in the quote.
As soon as you've created the content, proceed with the next step, that is create four new corresponding template sections to be associated with these pieces of template content:
- List Amount Total
- Regular Amount Total
- Discount Amount Total
- Net Amount Total
Go to the necessary Quote Template, on the Related list, find the sections and click New. The first one it's going to be List Amount Total. Associate it with the corresponding Template Content. Assign this one a top margin of 0.25inch. This is the only time when we specify the top margin because we don't need a top margin for the other sections. Indicate a display order. Now we can either click Save & New or Save, then Clone, whichever suits you better.
Repeat the steps for the rest of the sections to associate them with the correct Template Content, specifying the display order so that they go right below one another.
Go back to the quote, preview the document, and you'll see a nice table containing these sections at the very bottom of the page, just below the line items table.
Stay tuned for another blog post in which we'll detail the steps for making these sections appear conditionally because Regular Total and Discount Total are not always necessary on the quote.
Comments (0)