Producing PDFs from Salesforce.com

Producing a PDF from Salesforce.com is a need for nearly every client I ever work with. There are countless ways in which being able to produce a PDF will save your users boatloads of time and standardize the client-facing documents your company produces.

Since salesforce does such a good job of organizing your data, say, into Accounts, Contacts, Opportunities, Products, and your custom objects - wouldn't it be valuable to be able to take the data found across all of those records and "merge" it into a PDF? Possibly save that PDF back to the originating record, and then send it to a client?

Typical Uses

While the uses of a PDF are nearly limitless, here are ones that we've done fairly recently:

- Quotes - data from opportunity and quote records sent to your client for their approval
- Purchase Orders - sent to vendors to order product
- Contracts - produced with digital signature anchor tags and sent to client for signature
- Client Invoices - data from salesforce records used to bill the client
- Packing Sheets - an itemized list of items in a shipment
- Payment requests - a statement of open balance
- Print Output - whenever users need to print output from a record, it's convenient to send it first to a PDF.

These PDFs can be generated in almost any way desired. We can generate them from buttons. We can have code that creates them automatically. Sometimes we create custom hyperlink formula fields and put them right on the layout next to other relevant fields (like a "Send Quote" link right under the amount field). Regardless of your need, there is a way to get the document produced.

Visualforce to the Rescue

While there are a few different ways to generate PDFs from salesforce, we typically just write them in visualforce. They simply take the example provided by the client and write code to produce output that looks exactly like it. Our team can typically turn out a standard PDF in about 12 hours of development. Third party apps can help produce PDFs as well, but you'll need some significant time to learn the interface of the application to get it to produce the output you need. Many of our clients have found it more convenient to simply say: "Here is my example document - just make it for me!"

Additional Important Functions for your PDF

Once the document is produced, you'll have to decide what you want to do with it. Normally that will be some combination of the following:
- Open the PDF to the desktop
- Send the PDF attached to an Email
- Store the PDF as Attachment to a record in salesforce
- Send the PDF to a client for a Digital Signature

These are all things that we incorporate in some form or fashion on nearly every PDF development project. The nice thing about custom development - we can include exactly the functions you need. For example, if you need to prepare a Contract PDF, save a copy to the originating Contract record, attach it to an email, call the appropriate Email Template, and send it - this exact process can be executed in one click. A recent project we did creates multiple contracts and prepares them for digital signatures, all in one click, saving the client's reps literally hours during the contracting process.

Sites Page Delivery!

One of the neatest things we've begun doing for people recently is eliminating the need to actually send the PDF as an attachment to an email at all. Now with Salesforce Sites, we can deliver the content straight to the browser. A "Site" is a web page hosted by salesforce. On that page we can display content straight out of your salesforce database in any format we desire.

So lets say you have an opportunity and you want to "deliver" it to your client as a quote. You could make a PDF, like we talk about above, and email it. But you could also just send an email with a link in it, that when clicked opens the quote in a browser window. Rather than open an attachment on an email, they just see the quote in their browser. Here is an example from a recent project where a sites page was used to deliver various quotes.



So hopefully you got a few ideas about  how you can get the PDF you need generated conveniently, straight from salesforce.com. If you want some help getting the PDF you need developed. Feel free to reach out to us at www.snapptraffic.com.