Document templates can be used over and over again, optimizing your team’s daily operations. Now, it’s easier than ever to create templates in S-Docs using the Template Editor.
Learn how to create a new template using the S-Docs Template Editor and add dynamic fields to your template.
If you are not on the S-Docs homepage, follow the instructions in Navigating through S-Docs for HubSpot.
You may have several default templates ready for use out of the box from
S-Docs. In this example, we will create a new Quote template.
In this example, we are creating a new template from scratch. S-Docs also has a PDF upload feature. If you want to learn how to use that, read this article: Creating a template using the PDF upload feature.
This editor is very similar to other text editors in use. For more information on how to use the text editor, click here.
To enter dynamic variables, you must select a data source to use any dynamic field in your template. Once you have a data source selected, you can drag-and-drop your fields into the Template Editor.
There are two methods to select a data source:
1. Click the Variables icon in the left sidebar.
2. Click Select one.
3. Choose a data source from Company or Deal. In this example, we will choose Company.
4. Click Add data source.
5. A list of variables will automatically populate.
You now have access to the Runtime variable fields and the HubSpot.Company fields for the template. Add the fields you need to the Template Editor by dragging and dropping them into place.
Note:
There are five classes of variables:
These icons are visible next to the variable and indicate its “class.”
1. To add a data source using the “@ symbol”, you must be in a new template. From the S-Docs home page, click Templates, then Start a Template.
2. Click anywhere inside of the Template Editor and type the “@ symbol.”
3. Click Select Data source from the Variables list. The Variables menu will open in the left sidebar.
5. Click Add data source. In this example, choose Deal. The list of variables below will automatically populate:
You now have access to the Runtime fields, HubSpot.Deal, HubSpot.Contact, and the HubSpot.Company fields for the template. Click into each dropdown and add the fields you need to the Template Editor using the drag-and-drop function.
When you're ready, preview your template anytime by following these instructions: Using preview mode.
You can only use one data source at a time. You can change from one data source to another by using the filter icon located at the top of the Variables menu.
This filter is only visible once you have selected a data source for the Template Editor.
1. Click the filter icon. Choose the new data source and click Apply.
2. You will be asked to confirm the data source. Click Change the data source if you are certain.
Make sure you select the correct data source.
When you change the data source, merged variables or fields from the other data source already in your template will change color and become invalid. A tooltip will appear to confirm that the variable is no longer valid.
Now, we will insert the fields from the Variables icon into the Template Editor.
First, place the fields inside the template to enter dynamic information into the Template Editor. There are two ways to do this:
The Tiles icon will open a dropdown list of blocks.
Drag and drop the blocks you wish to insert into the template from the tiles icon menu.
The variables and fields will be entered next to these texts in the next section.
1. From the left-hand side menu, click the Variables icon.
2. Choose Company or Deal and click Add data source. For this example, we will choose Company.
3. Choose Runtime or HubSpot.Company in the dropdown menu and select a variable to enter in the template. In this example, click Runtime. You have access to the following variables in Runtime:
4. Select a variable and drag and drop it into the Template Editor. For example, choose Date and drag and drop it next to the text box “Date:” in the Template Editor. You will see a faint blue line appear to align the variable.
If you choose the incorrect variable, click it. Then click the vertical grip dots icon in the context menu on the left-hand side. Delete the variable using the Delete function. Click Delete. Then confirm by clicking Click to Delete.
Click the variable that you want to change in the Template Editor. The following menu opens on the right-hand side:
Modify the variable using this menu.
You can also enter a variable or a field by typing the “@ symbol” keyboard shortcut in the template editor if you prefer.
1. Name your template. Manually type in the words “Quote” replacing Untitled Document in the field located in the upper left-hand corner of the interface.
2. Add a Heading block to the template, and type “Quote for:”
Then click + in the context menu and add a Text box. Type “Date:” and “Name:”
3. Add the variable for the Company’s name.
In the Search bar, type “Name.”
Scroll down to find the Company name variable.
4. Drag the variable into the template.
If you prefer to use the “@ symbol,” a context menu will open with the available variables:
Type in the field you are searching for next to the “@ symbol.” Scroll down to the variable you are searching for.
For example, type “@name.” Scroll to find Company.Company name. Select Company.Company name.
This variable will be entered into the template where you typed the “@ symbol.”
Repeat the process until you have a template you’re ready to use. And there you go — you’ve created your first template! Next, learn how to use Preview Mode to see what your template will look like with real customer data.