Filing your court documents is an important part of the legal process and can also be time consuming. However, many courts still accept filings via fax and that can be a great way to save time. Especially when you use a service like Formstack Documents to automatically generate the court documents and send them via fax service like Phaxio.
In this example, we’re going to show you how you can generate court documents with the click of a button from Salesforce and automatically fax them to the court using Phaxio. We’ll be using our friends over at Zapier to help send the fax with Phaxio.
To get started, we’re going to setup our document (template) in Documents. We’ll be using a Fillable PDF as our template. This PDF will have a field for each piece of information we’ll be pulling from Salesforce.
Here’s what our document looks like:
When your PDF is ready, let’s upload it to Documents. From the Documents page, click the New Document button then type in a name for the document. On the next step, choose I have a document I would like to use and then select the PDF file from your computer.
After you’ve uploaded your PDF, you’ll be taken to the Settings tab for your document. On this page you can update things like the type of file that is produced and the name of the merged file. For this example, we’re going to generate a PDF and we’re going to include the First and Last Name in the file name.
Once you’ve saved the settings, you’re going to be taken to the Deliver tab. This is where you can define how you want the merged document delivered. To send the document to Phaxio, we’re going to set up a new Webhook delivery.
But first, we need to setup a Zap in Zapier so that we can setup the webhook in Documents. From inside Zapier, click the New Zap button. For the Trigger, you’re going to select Formstack Documents and then pick New Merged Document as the trigger.
Zapier will have you authenticate your Documents account and then do a test merge. They’ll give you a URL to enter for your webhook. Take this URL and go back over to Documents and setup a New Webhook delivery. Enter the URL that Zapier gave you into the webhook setup.
After you save the webhook in Documents, you’ll need to do a quick test for Zapier (to make sure everything is working). Go ahead and click on the Merge tab in Documents and select the Manual Data Entry option. This will give you’re a Form URL that you can enter test data and it will merge a document and send it over to Zapier.
After you’ve submitted the test, go back over to Zapier and authenticate your Phaxio account. Then you’ll setup the fax settings by defining the fax number and then the file that you want to send over. Go ahead and complete that step by adding the Documents field (click the button on the right).
Once you’ve mapped the fields, follow the remaining steps and then activate the Zap. Now, you’re ready to setup that last piece of the puzzle and integrate with Salesforce.
If you have not done so already, please install the Documents managed package from the AppExchange and follow the setup instructions here.
Inside Salesforce, we are going to setup a New Mapping that will serve as the integration point between our Salesforce data and template. From the WebMerge Mappings tab, click the New WebMerge Mapping button. We’re going to select the Case object and then pick our template that we just setup in WebMerge.
On the next step, you’re going to scroll down to the Field Mapping section on the page. This is where you’re going to match up the Salesforce fields with the merge fields that are in your template. For each merge field (listed on the left), go ahead and pick the corresponding SF field from the dropdown on the right.
After you have all of the fields matched up, go ahead and click the Save and Activate button at the bottom of the page.
Now, it’s time to run a test! Go ahead and jump over to one of your cases and click the WebMerge button on the page. This will take your case information, and send it over to Documents, and populate our PDF and then send out the webhook which will deliver the document to Phaxio for faxing!
Here’s what our court document looked like after merging:
Congrats! You can now send faxes from Salesforce using Phaxio with the click of a button. Can you think of any other ways that you could use Formstack Documents to simplify your paperwork process?