Happy Business Starts Here

Re: Best way to test quote templates in SFDC

Highlighted
Advanced Tutor
Advanced Tutor

Best way to test quote templates in SFDC

We're making some changes to our quote templates so I'm uploading to Zuora and getting the ID and then creating the template in SFDC, all that works fine.

 

What I want to do is to go to a given quote and test a specific template, similar to how SFDC allows you to test an email template against a given record.

 

I feel like this is an easy request but I can't find documentation that explains how to do this.

Tags (3)
1 ACCEPTED SOLUTION

Accepted Solutions
Highlighted
Guru

Re: Best way to test quote templates in SFDC

@km Ok this is a bit technical but here goes:

 

We generate the URL manually that Zuora for Salesforce would normally use to render the PDF. The URL structure is:

 

https://zforsf.zuora.com/apps/servlet/GenerateQuote?format=pdf&quoteId={SALESFORCE_SAMPLE_QUOTE}&tem...

 

Note the version numbers may advance as Quotes gets upgraded. You will need a few bits of information to make this work:

 

1. A sample Quote in Salesforce (this will be used to populate your merge fields). In our production org we have a Sample company that has a few quotes of various types on it we use for testing

2. The template ID from Zuora. You will upload your new draft template to Zuora and then get the ID from the UI.

3. Salesforce API User which is setup during your implementation.

4. Salesforce Soap API. This is quirky to get at but its the SOAP endpoint. See below for how to get this easier...

5. Salesforce Session. This is by far the trickiest to get normally as Salesforce keeps locking it down more, but see below for more on that...

 

 

So how to get all this info? The way I originally did so was I actually used Salesforce to generate a PDF of a quote using a current template. When it opens the popup to generate it, I quickly captured the URL in that popup which had most of the above fields populated for me. I then simply replace the template ID (and also make sure the attachtoopportunity is set to false) and then i could open that URL in a new window and poof, i can preview templates. This makes the process really quick for uploading a new template and refreshing your browser window with the new ID.

 

We developed a small bit of code to generate the URL for us when testing. If i get some time in the next week or so I'd like to share that so others can benefit from it. In the meantime hopw the above helps. If you need any clarifications, let me know.

View solution in original post

7 REPLIES 7
Highlighted
Advanced Tutor
Advanced Tutor

Re: Best way to test quote templates in SFDC

is there really no way to test a specific quote template?

Highlighted
Zuora Support

Re: Best way to test quote templates in SFDC

Hi @km,

 

You can go to your test quote and set Quote Template field to your new template. You can then generate a quote PDF which should be produced based on the template.



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

Highlighted
Advanced Tutor
Advanced Tutor

Re: Best way to test quote templates in SFDC

@vu_phan when you say You can then generate a quote PDF which should be produced based on the template.

 

How is that done exactly? If I want to generate a quote with a given template and then generate a quote with separate template, how is that done?

Highlighted
Guru

Re: Best way to test quote templates in SFDC

@km Ok this is a bit technical but here goes:

 

We generate the URL manually that Zuora for Salesforce would normally use to render the PDF. The URL structure is:

 

https://zforsf.zuora.com/apps/servlet/GenerateQuote?format=pdf&quoteId={SALESFORCE_SAMPLE_QUOTE}&tem...

 

Note the version numbers may advance as Quotes gets upgraded. You will need a few bits of information to make this work:

 

1. A sample Quote in Salesforce (this will be used to populate your merge fields). In our production org we have a Sample company that has a few quotes of various types on it we use for testing

2. The template ID from Zuora. You will upload your new draft template to Zuora and then get the ID from the UI.

3. Salesforce API User which is setup during your implementation.

4. Salesforce Soap API. This is quirky to get at but its the SOAP endpoint. See below for how to get this easier...

5. Salesforce Session. This is by far the trickiest to get normally as Salesforce keeps locking it down more, but see below for more on that...

 

 

So how to get all this info? The way I originally did so was I actually used Salesforce to generate a PDF of a quote using a current template. When it opens the popup to generate it, I quickly captured the URL in that popup which had most of the above fields populated for me. I then simply replace the template ID (and also make sure the attachtoopportunity is set to false) and then i could open that URL in a new window and poof, i can preview templates. This makes the process really quick for uploading a new template and refreshing your browser window with the new ID.

 

We developed a small bit of code to generate the URL for us when testing. If i get some time in the next week or so I'd like to share that so others can benefit from it. In the meantime hopw the above helps. If you need any clarifications, let me know.

View solution in original post

Highlighted
Zuora Support

Re: Best way to test quote templates in SFDC

@km As mentioned in my previous post, you can assign the template that you want to test to the quote's Quote Template field and then generate a quote PDF. 

 

Another option is to not set any quote template as the default template and leave the quote's Quote Template field blank. When you click on the quote's Generate PDF button, it will list all available quote templates and you can select the one you want to test.

 



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: Best way to test quote templates in SFDC

@vu_phan The one thing to watch here is if the customer has their org config set to attach PDF to quote, then by using the builtin button they could end up with loads of PDFs, plus you have to keep jumping from the quote side to the opportunity.


If you have the ability to disable the attach to opportunity feature then this would work smoothly. On our side we have two buttons, the native Generate PDF, and an admin only "Preview PDF Template" where the template ID can be substituted without changing a bunch of config on the Salesforce side.

Highlighted
Advanced Tutor
Advanced Tutor

Re: Best way to test quote templates in SFDC

this is exactly what I was looking for! Thank you for the help