Now that you've collected the Salesforce data that you need for the Sales Quote document using Query Builder, it's time to build Document Template. With Maven Documents that comes easy as well.
First, you need to create a Document Template record in Salesforce, which connects a Google Doc, Google Sheet, DOCX, or XLSX file, that you plan to use as a template, with the Salesforce data you pulled in the previous step. If you have successfully authorized the Google account with Maven Documents, you can create templates using Google Docs or Google Sheets, save them on Google Drive, and then use them for the document. You also have the option to authorize the Microsoft account and grant Microsoft Azure API access to the Maven Documents application, so you can directly upload online or offline Microsoft Word DOCX or Microsoft Excel XLSX files to Salesforce.
Document Template links Document Solution to a specific Google Docs, Google Sheets, DOCX, or XLSX file. That allows you to use queried fields from Query Builder in the connected file.
You can have multiple different Document Templates for one Document Solution, and select the needed Template each time you generate a document. In fact, in this tutorial, you are using the same Document Solution for Google Docs, Google Sheets, DOCX, and XLSX Templates. Awesome!
Here are the steps to create a Document Template record:
In the Maven Documents app, open the Document Templates tab and click New.
Name Document Template Sales Quote Template and in the Document Solution lookup field, select Sales Quote.
In the Template Type field, you can select the type of your document. It could be one of the following: a Google Doc, Google Sheet, DOCX, or XLSX file.
The Template Document Id field needs a more detailed explanation. The field holds the ID or URL of the file that you are going to connect to the Document Template:
https://docs.google.com/document/d/ID/edit
, but instead of ID, you’ll have your document ID there.There are two options available here:
- The URL of the file. The field is populated with the URL of the online DOCX or XLSX file after you upload it to the Document Template.
- The ID of the file. The field is populated with the ID of the locally stored DOCX or XLSX file, once you upload it to the Document Template with the desktop version of Word or Excel.
If you want to have a specific name for the generated document you could populate the Document Title field with this name. If you leave this field blank, the generated document will be named after the Document Template.
If you are uploading an online DOCX or XLSX file, the Document Title field is automatically populated with the name of the uploaded file.
Click Save.
And that's it! You have now created the Document Template record.
Note: It is important to remember, that the document title can also contain merge fields like {!Opportunity. Name}. So you can start customizing the document from the very beginning.
Once you have created a Document Template, you can either open it directly in the new browser tab by clicking Document Template in the Open Template field:
Or you can preview the template right there in Salesforce by clicking on the Template Preview tab.
The preview options mentioned above work only for Google Docs and Google Sheets template types.
Next, you are going to style the created document using Template Builder. Use the links below to read the instructions on building your document with Template Builder at hand: