Happy Business Starts Here

Zuora Quote PDFs and Salesforce Files

Currently, when generating a Quote PDF, it saves the file in Salesforce as an Attachment and displays the file in the Notes & Attachments related list on the Opportunity.  However, Salesforce has now deprecated the use of Attachments in Lightning Experience.  They recommend using the newer object, Salesforce Files.

 

Can Zuora provide an option for Quote PDFs to be saved as Files on the Opportunity?

 

See link for more details from Salesforce:  https://help.salesforce.com/articleView?id=Attachments-are-not-returned-in-Lightning-Experience-sear...

10 Comments
Advanced Tutor

I am having the same issue. I am trying to use an eSignature software and its not recognizing the files. Is there an update or comment to this? 

Student

Any update on this? We are trying to move to lightning, but this is holding us up since we need to migrate all notes and attachments to files.

 

We need this.

Valued Scholar

This is much needed in order for us to move to Lightning. We are also implementing integrated e-sign now

Master

This is going to become more critical going forward. 

It also enables further functionality - as once these are files (ContentVersions and ContentDocuments) in salesforce, they can be linked to multiple entities (using ContentDocumentLinks) and public URLs generated that can be sent to customers to view the PDFs 

As it happens I'm going to have to likely implement this anyway so I can do the above, and then remove the original attachment.

Guru

A couple tips that may help here in the interim:

a) When we moved to Lightning and started using Files, we used this tool: https://github.com/douglascayers/sfdc-convert-attachments-to-chatter-files to do the migration of existing attachments. This tool does two awesome things 1. it moves all the existing attachments to files and 2. It sets up a trigger so any new attachments automatically get converted to files.

 

b) We eventually decided that we wanted the Quote PDFs to be saved to the Quote and not the opportunity, so we wrote an Apex class to call the generate API directly and then stored that as a file on the Quote object. This works great now because in addition to being easier to find the PDFs for a quote, by using our own Flow we can provide the user with a direct link to view the PDF after its generated rather than them needing to navigate over manually. It would be great to see a similar method added to the native quotes package as this would make it really easy for people to build more tailored workflows, until then I am happy to share my method to anyone interested.

Master

Many thanks @feisley !

 

We also have a trigger that makes sure the attachment ends up on both the opportunity AND the quote - but we just copy the existing one (which duplicates the body.)  I'll DM you about the details if that's ok?

Master

So after the above discussion we (well actually I!) decided for many reasons that we'd call the APIs directly as well to make PDFs as files and and attach them to the quotes

 

If anyone else wants to see the code I've coppied the relevant bits out to https://github.com/musmuris/Zuora-Quote-PDF-Generation 

Zuora Staff

Thank you all you for posts.  Our product team has this on the radar. Updates to come as it gets closer to being released.

Support SME

Hi @Nigel Thank you SO MUCH for sharing the detail.

Guru

@Nigel thanks for sharing your code for this. Looking at it was very similiar to our approach.

 

We are already on lightning so we should chat more on the changes required for lightning compatibility.