🎉  WebMerge has been acquired by Formstack! Learn More   🎉

Close
July 27, 2017

Instantly Print Order Forms from Salesforce

Keeping track of all your deals and opportunities in Salesforce is a great way to keep your sales team organized and focused on closing deals.  Add WebMerge to your sales process and you can automate all your paperwork and instantly populate documents with data from Salesforce.

In this example, we’re going to show you how to automatically generate order forms when we update an Opportunity to Closed Won.  We’ll then use Google Cloud Print to automatically print the order form in our warehouse for our team to process.  How’s that for easy?

To get started, we’re going to setup the template for our order form using a Word document.  Inside the Word document, we’re going it include our standard information like our logo, address, etc and then for the spots that we want to insert our customer/opportunity information, we’re going to use merge fields that looks like {$OpportunityName}, {$AccountName}, {$StreetAddress}, etc.

These merge fields are just like any other text in your document and you can name them anything you’d like.

Here’s what our Order Form template looks like:
 


We’re also going to add our opportunity line items to our order form, so we need to add a table for those line items.  Inside the table, we’re going to use a special “tablerow” tag that tells the system to loop through each line item and print it in the table.  For more information, click here.

Here’s what our table looks like:
 


Once you have finished your template, we need to upload it to WebMerge.  From the Documents page in WebMerge, click the New Document button and enter a name.  On the next step, pick Office Document as the document type and then pick the file from your computer.
 


After you have uploaded your template, you’ll be taken to the Settings tab where you can modify various options like the type of file that is generated and the name of the file.  For this example, we’re going to generate a PDF and include the Opportunity ID in the name of the file.
 


Next, we’re going to setup the delivery of our document so that it goes straight to our printer via Google Cloud Print.  Under the Deliver tab, click the New Delivery button then select Google Cloud Print from the list.  After you authenticate your Google account, you’ll be asked to select the printer that you want to send the merged documents to.  Go ahead and select your printer, then save.
 


After you have saved your Google Cloud Print delivery, we are done with the setup process inside WebMerge and we’re ready to setup the integration with Salesforce.

If you haven’t done so already, please install the WebMerge managed package from the AppExchange and follow the Setup Instructions.

Inside Salesforce, we’re going to setup a new WebMerge Mapping that connects with our Order Form.  Go to the WebMerge Mappings page and click the New WebMerge Mapping button.

On this page, enter a name for the mapping, select Opportunity as your primary Salesforce object, then pick the WebMerge document that you just setup.
 


Next, we’ll be taken to a page where we can match up our merge fields with the Salesforce fields (under the Field Mapping section).  On the left are your merge fields then on the right is a list of the available Salesforce fields. 

This tells the system how to send your Salesforce data over to WebMerge so that it’s populated in the correct spot on your template.
 


One last thing that we need to setup on our mapping is the automation so that when we update our Opportunity to “Closed Won” that will trigger the merge to occur.  At the bottom of the page, check the box for “Automatically generate the documents given the following rule”.

Then, for the field, we’re going to choose Stage and then Closed Won as the value.
 


Once you have updated all the settings for your Mapping, go ahead and Save and Activate the mapping.  We’re ready for a test!  Open up one of your Opportunities then update the Stage to Closed Won and this will trigger your order form to be generated and sent to the printer!

Here’s what our Order Form looked like ready for print:
 


Congrats, you’re all finished!  You can now automatically populate and print all types of documents from Salesforce.  Can you think of any other ways you can use WebMerge to simplify your paperwork process?
 

7 min read

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

×

Print Order Forms from Salesforce Now

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