🎉  WebMerge has been acquired by Formstack! Learn More   🎉

Close
July 08, 2013

Create PDF Contracts and Agreements from Salesforce

Being used by a (quickly) growing number of businesses, Salesforce is becoming an integral part in managing your sales and marketing teams/processes.  From handling leads, to creating opportunities, to getting a contract out the door, they’ve got you covered for managing that information internally, but most often you need to communicate with your customer externally. 

WebMerge can help you take that information and generate customized PDFs or Word documents that you can send to your customers or other internal departments.

Update: We have officially launched a Salesforce App built right into your workflow. Click here for more information and to install.
 

In this example, we’ll be generating a simple contract/agreement using a Contract object in Salesforce.

The first step will be to setup the WebMerge document (the agreement) – and we’re going to use the online editor.  Go ahead and create a New Document, then choose the “Build Your Own” option.  In the editor, add your field placeholders where you want the information from Salesforce to go.  Think of this as a template. 
 


After you have setup your document (added the field placeholders), let’s go to the Merge tab.  On the Merge page, you’ll see the Merge URL.  Copy that URL, we’ll need it here in a second.

Now, let’s jump into Salesforce and setup the button that is going to send the information from your Contract object to WebMerge.  To do this, you’ll want to go to the Apps and Administrator Setup page (usually under the dropdown when you click your name in the right corner) and click the Customize > Contracts > Buttons and Links.
 


Next, let’s create a new Button that we’ll place on the “detail page” of each contract.  To do this, click the New Button or Link button.  On this step you’ll setup the button and map the information that you want to go over to WebMerge.  Go ahead and fill out the information on the form (button label, name, etc) – you’ll want to choose Detail Page Button for the Display type and to open in a new window.  The content source is a URL.

This is the most technical piece – setting up the URL to send the information to WebMerge.  Remember when I said to copy that Merge URL from the document you setup?  Here is where we need it.  Go ahead and paste that URL into the big box.  There is a little more information we need to add to the URL before we start adding the fields.  You’ll want to add “&_use_get=1” to the URL so that WebMerge looks for the variables in the URL.  And if you want the PDF to open up right away (so you can save to computer), then you’ll want to add “&download=1” to the URL as well.

Here is an example: https://www.webmerge.me/merge/12345/abcdef?_use_get=1&download=1
 


Now, let’s add our fields to the URL.  This is very similar to adding the _use_get=1 that you added above, except you are going to use the name that you used in your document (ie. Name or Email) and then after the = sign you will put the field (using the Insert Merge Field dropdown above the box).

Here is an example: https://www.webmerge.me/merge/12345/abcdef?_use_get=1&download=1&organization={!Contract.Account}&client={!Contract.CustomerSigned}&title={!Contract.CustomerSignedTitle}

Once you get all of your fields in the URL, it should look something like:
 


Go ahead and save the button and we’ll move onto adding the button to your Detail Page layout for your Contracts.  To do this, click the Page Layout link on the left under Customize > Contracts, then if needed, click the edit link.  The next page should be the layout builder and you’ll want to click the buttons section in the top bar, then drag the button you created down into the Custom Buttons section on the page.  Click Save and you’re all set!
 


Now, go take a look at one of your contracts (create a new one if you don’t have any) and click the WebMerge button.  You should see a new popup window open and then your document should popup as well.  You’re done!
 


Please let us know if you have any questions.

6 min read

Ready to give WebMerge a try?
Start your Free Trial now!

×

Create Documents From Salesforce Now

By signing up here, you agree to our Terms of Use