🎉  Build a workflow powerhouse. Learn more about our new Airtable integration.   🎉

August 19, 2015

Populate Incident Reports from Salesforce

Collecting reports from your team can be a stressful task all by itself, but with the switch to saving everything digital, you’re probably manually entering those reports into a management system like Salesforce.  That’s a painful process.

With the rise of mobile devices, you can make it easy for your team to fill out those reports right from their mobile tablets, and then it can automatically be saved in Salesforce.  There’s no need for your team to fill out those paper reports anymore.

Still want to be able to have those pretty/organized reports that you can send to other departments?  No problem!  With WebMerge, you can take all of that information that’s being entered into Salesforce, automatically populate the reports, and immediately deliver them to the correct person.

In this example, we’re going to show you how to automatically populate an Incident Report when a new incident is entered into Salesforce.  We’re going to automatically save these reports into Google Drive as well so we can easily keep track of the generated reports.

To get started, we’re going to setup our template for the Incident Report.  We’ve got a PDF that has fillable fields already in there, so we’re just going to use that file.  If you have a PDF that doesn’t have fillable fields, read this article for help on setting up your PDF.

Here’s what our Incident Report template looks like:

Now it’s time to upload our template to WebMerge.  From the Documents page in WebMerge, click the New Document button.  Give the document a name (like “Incident Report”) and then pick Fillable PDF on the next step.  You’ll see an option to upload your file – go ahead and pick the file from your computer.

Once you’ve got the file picked, click Next Step and you’ll be taken to the Settings tab for your document.  We aren’t going to change many settings on this page, but we are going to add a merge field to our Output Name.  This is the name of the file that is generated during a merge.  We’re going to add the name of the person into the file name so we can easily search for it in Google Drive.

After you’ve updated the settings, it’s time to setup the Google Drive delivery.  Go ahead and jump over to the Deliver tab and click the New Delivery button.  Pick Google Drive from the list and then you’ll be asked to login to your Google Drive account.

Once you’ve logged into your Google Drive account, you’re going to need to setup where you want the documents to be saved.  We’re going to save the documents in the “Incident Reports” folder that we created in Google Drive.

But we also want to save these Incident Reports by date, so we are going to save the files in subfolders based on the date of the incident.  Under the More Options section (click the button) you can check the box to “Use Merge fields as a subfolder name”.  Then select the “date” field from the dropdown.  This will automatically create a subfolder based on the value of the “date” field.

Sweet, you’re done with the setup in WebMerge!  Now it’s time to hook this document up to Salesforce so that it is automatically generated when we add a new incident.

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

Inside Salesforce, we need to setup a new Mapping for our document.  This Mapping tells Salesforce how to send data over to your WebMerge document so that the information is populated in the correct spot on the PDF.  From the WebMerge Mappings tab, click the New WebMerge Mapping button.

When setting up a new Mapping, you need to give it a name so that you know what document you’ll be generating, then you’re going to pick the main object that you’ll be pulling information from.  In our case, we’ll be using a custom object called Incident.  The last step is to pick the WebMerge document that you just setup.

Click Save and Next then you’ll be taken to a page that has a few of the same settings at the top, but we’re interested in the Field Mapping section.  This Field Mapping is where you’re going to tell Salesforce how to send the information to your document.  On the left you’re going to see a list of the merge fields you have in your document and on the right you need to pick the corresponding Salesforce field.

After you’ve finished the field mapping, our last step is going to be indicating that we want to automatically generate this report when an incident is created.  Towards the bottom of the page you’ll see a checkbox to “Automatically generate this document given the following rules”.  Click that box and then pick the “Created” option from the dropdown.  You can ignore the criteria since we always want to generate the report.

**Note: if you are using a custom object, you need to follow the setup instructions here so that the triggers will work.

Once you’ve got that mapping all finished, go and and Save & Activate.  Now we’re ready to run a test!  Go to your Incidents and add a new record.  This should trigger a new report to be merged (sometimes Salesforce gets a little delayed, so it could take a few minutes) and the file should be in Google Drive.  Go take a look!

Here’s what our merged Incident Report looked like:

Congrats, you’re all done!  Now you can automatically generate reports from Salesforce without any extra effort.  Can you think of any other ways that you could use WebMerge to make your life easier in Salesforce?

8 min read

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


Create Reports from Salesforce Now

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