Outputting Your Data

info

The HubSpot (BETA) integration will be receiving continuing development. Please send us your feedback on the integration and what you would like to see added in the future at hubfeedback@windward.net.

Automating Data Output#

Now that your template is connected to your HubSpot data we can start formatting the template and specifying data to be output.

Formatting the Template#

Before we place any Tags (placeholders for data that will be inserted when the template is output) let's build up a basic structure for our quote:

  1. On the first line of your template, type the text "Quote Prepared for." This will be the title for our template, but we'll add the company name for the quote dynamically later: img
  2. Click the Enter key on your keyboard to go move your carrot (the little thing that shows where you are typing) to the next line.
  3. Go to the Insert tab in Word and click "Table" to insert a table. For your Table, chose to insert a 2X7 table by hovering over the box that is seven down from the top and two over. Click the box to insert the table: img
  4. In the first cell of the table, enter the text "Invoice Address." We'll use the cell bellow this title cell to list the billing address for the invoice.
  5. In the fourth cell of the table, enter the text "Shipping Address." We'll use the cell bellow this title cell to list the shipping address for the invoice.
  6. Save the template somewhere convenient on your computer and give it a name like "QuoteTemplateTutorial.docx"

You now have the basic structure for your quote: img If this quote doesn't exactly resemble your use case, that's OK! It's really easy to add dynamic data to the quote and change the formatting: keep following along with this tutorial to learn the basics of template building and it will be easy to customize the formatting and data for your needs later.

Accessing the Data Bin#

Now that you have the basic structure for your template it is time to start adding dynamic data:

  1. If the Data Bin is not already open for your template, you can open the Data Bin by going to the Windward ribbon and clicking Data Bin. You'll see it open on the right side of Word: img
info

Let's get to know the Data Bin real quick#

The "Root Node" in the Data Bin will be your Deal in HubSpot. When working in your template, whenever you preview a tag or test your output you will see data from the Deal ID you used to create your Data Connection. Whenever you output this template from HubSpot (which will be covered later in the tutorial) the output from that record will be merged into the output document.

img

Bellow the "Root Node" you'll notice the "properties" node. You can click on the node to expand it. This node contains all the properties for your Deal in HubSpot, standard and custom!

img

Moving further down in the Data Bin, if you expand the "associations" node, you'll see "companies," "line items," and "contacts." Each of these nodes will show the respective objects linked to this Deal.

img

If you expand one of these associated objects, you'll see a similar structure to the Root Node. Under the "results" node you'll see the "properties" where you can get any standard or custom properties for these connected objects.

img

If you look into the properties for associated "line items" you'll notice you can even get properties for the product associated with a "line item,"

img

tip

Not seeing an association?#

  • You'll only see the Companies association if there is a company associated with the Deal in HubSpot.
  • You'll only see the Contacts association if there is a contact associated with the Deal in HubSpot.
  • You'll only see the Line Items association if there is a line item associated with the Deal in HubSpot.

"The Deal" is the Deal in HubSpot with the unique ID you selected for your data connection. You can add an association to this Deal in HubSpot or change the unique ID to a Deal with associations and update your data connection to see these associations in the Data Tree.

Inserting Your Data#

Now inserting data into your template from the Data Bin is very easy. To start, let's add the name of the company for this deal to our quote's title:

  1. Expand the "associations" -> "companies" -> "results" -> "properties" node to see the different properties for the company associated with the deal. img
  2. Find the "name" property. You can do this either by scrolling through the list of properties (in alphabetical order) or you can use the search bar at the top of the Data Bin. img
  3. Drag the "name" node from the data bin and drop it at the end of the title text: img
  4. You'll see a placeholder appear in the template called "name." Fix any spacing around the placeholder so that the template looks correct: img
  5. When you generate output from the template, the name for the company will be inserted in place of this placeholder. You can try this in the Designer by clicking the Output button: img
  6. Looking at the resulting output, you'll see that the company name for the deal is dynamically replaced with the placeholder: img
  7. If you would like to test a different output format you can use the drop-down under the Output Button img

You've now learned the steps to insert dynamic data into your template: it's as easy as drag-and-drop! Now you just need more placeholders for dynamic data in your template. Let's start with the Invoice Address:

  1. Just like you did above, drag and drop the "associations" -> "companies" -> "results" -> "properties" -> "name" node into the second cell of the table to add the company name to the table: img
  2. Put a new line after the company name in the cell
  3. Drag and drop the "associations" -> "companies" -> "results" -> "properties" -> "address" node onto the new line. img
  4. Repeat this process with the city, state, postal code, and country and insert commas and spaces where appropriate to achieve proper formatting for the invoice address: img
  5. Click Output to test your changes: img
  6. For this template you'll use all the same values for the Invoice Address in the Shipping Address, but you'll learn to change these in the next step. Copy all the place holders from the Invoice Address and paste them under the Shipping Address: img
  7. Click Output to test your changes. Notice that you can copy and paste place holders without them loosing their association to data: img

Changing a Placeholder#

Sometimes you want to change the data associated with a place holder. Windward has plenty of tools that can do this, each with different strengths, but an easy way to change a place holder is using the Data Tree. For this tutorial template, you'll learn to change the "name" placeholder for the Invoice Address from the name of the company to the name of a contact associated with the Deal.

  1. To change the data for a placeholder, place your carrot directly on the placeholder. You'll notice some buttons in the Windward ribbon that were greyed out before can now be clicked: img
  2. In the ribbon, click on "Data Tree." You'll see a tree with all your data open, just like the tree in the Data Bin, and can expand the different nodes in the tree. img
  3. Navigate to and click the "Root Node" -> "associations" -> "contacts" -> "results" -> "properties" -> "firstname" node. This will update the placeholder to dynamically get the first name of a contact associated with the deal instead of the name of the company: img
  4. Even though the name of the place holder hasn't changed, when you generate output you'll see that the placeholder is now replaced with the name of a contact associated to your deal: img
  5. To change the nickname of the placeholder so it's more clear what is being output, place your carrot on the placeholder, and change the value in the "Nickname" field in the ribbon. Click the enter key to see the nickname updated in the template: img
  6. To get the last name of this contact, drag the "lastname" node from the contact properties in the Data Bin into the document: img

Your template should now show a contact name for the Invoice Address instead of the company name when output: img

Conclusion#

You've now learned how to insert data into your template! But in this tutorial, we only inserted individual pieces of data. What if I wanted to output multiple instances of data, like multiple line items for my deal that should output as multiple lines in a table? In the next tutorial you'll learn how you can create a table exactly like this that outputs multiple line items for your quote.