At PandaDoc, we know how important documents are. Whether they be quotes or proposals, our clients want to put their best representation forward to their customers and prospects. One of the concerns we hear often is, “Our PandaDoc users are prone to mistakes”. Like everyone in this world, we all make mistakes.
However, in 2020, we can design ways to limit the number of mistakes made on documents sent out by giving more power to the computer and adding more guard rails for our users.
One of the ways we see customers operating most efficiently is using our API to generate their own forms to control more of the document automation process.
Take, for example, a company that needs to send out hundreds of quotes per month. Each time they create a document, there is a chance that there could be a spelling error, an incorrect price, or, in the worst case, a wrong name!
We want to share a simple process to use our API so that you can get the most out of our product while also ensuring a consistent experience for you and your customers.
- A Custom Web Application or CRM that allows you to build a form
- PandaDoc API
- PandaDoc Template(s)
How it can Work
Using a custom script, you can request a listing of all of your templates so that you have a holistic view of all the potential formats your staff can create documents. From here, you can either move forward with all the templates or just specific ones that you’d like your team to only use.
Once you have a listing of your templates, we can create a <select> tag that will be the beginning of your staff’s form. The dropdown will contain all the template names they are allowed to pick. Once they have selected a template, that will trigger an action to request our template details. Within the details, you will find all the tokens, fields, roles, and pricing tables included in the template.
Once we have the selected template, let’s create a form. How you create the form is dependent on your programming language, but let’s take JQuery as an example. We create an empty <div> with an id of “current-form”. Each time a user selects a template, we empty the div’s contents, and create a new form, and fetch the data needed for that form.
Now that we have all our data, we can begin creating HTML <input> elements to append to our new form and segment them by type (recipient, field, token, etc.).
Say we have a template with just fields and recipients. We want to pre-fill fields for our prospect by having the salesperson (or making an API request to your CRM!) input the values into the form. That would look something like this:
The employee now has a beautiful form, fills out all the required information, and presses “Create Quote”. From here, your program will receive all the form data needed to use our Create Document from Template endpoint to create a document.
Using the documentation, you can sanitize the form data into a request that our API can consume. Once you have formatted the request, you’ve made your first form-driven API document!
Using a programming language, you can make a form for every template in your PandaDoc account. This saves time by plucking out all the items that need to be adjusted / pre-filled and provide more efficiency to the quotation/proposal process.
Room for Growth
This is just the starting point. In the next series, we will go into how you would do something like this with NO human interaction in the generation process.
Employees may forget a token or a field or put the wrong price in the pricing table. Having your own form allows you to require all fields, as well as put restrictions on what employees can and can’t do in the creation process.
Please sign in to leave a comment.