Happy Business Starts Here

New Student

Change sequence of quote items on quote

Let's say I want to create a quote with three items: item A, item B und item C. After quote creation I have a PDF-File with the sequence: B, C, A. What can I do to get a different sequence? Thank you.

2 REPLIES 2
Zuora Alumni

Re: Change sequence of quote items on quote

Hi,

 

You would have to overload the List component that is used to display the charges

 

here's the link to the KB Article on List Componenst

 

https://knowledgecenter.zuora.com/CA_Commerce/I_Development_Resources/C_Component_Library/B_Global_C...



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

Guru

Re: Change sequence of quote items on quote

@adam I am actually not sure that the List component would change the PDF output sicne the list component is a visual force element that controls the display within salesforce.

 

@christiantran the way we handle this is by using sorting within the PDF template. So our template has this structure for the ChargeSummaries table:

 

 

{ MERGEFIELD TableStart:ChargeSummaries }

 

{ MERGEFIELD "TableSort: ChargeSummary.ProductType DESC, ChargeSummary.QuoteRatePlan ASC, ChargeSummary.Type ASC, ChargeSummary.Name ASC" }

 

additional content here...

 

{ MERGEFIELD TableEnd:ChargeSummaries }

 

This performs a sort of the fields in order... So first it sorts by product type (i.e. Subscription vs Addon), then it sorts by Rate Plan and so on...

 

So we end up with a table with items grouped appropriately by type, then rate plan, then charge type, etc.

 

You can get fairly advanced with this by using Salesforce formulas to add new fields on the Quote Charge Summary object to allow sorting. For example we added a field called  Product Category Order which outputs a 1, 2, 3, 4 etc number and allows us to perform a sort based on our own business rules (i.e. we sort certain products higher in a quote than others, but that logic is defined in Salesforce rather than having to keep the quote template up to date with the rules.)