You can pull data from Netsuite into your Octiv documents to create an auto-generated table.

Note: This is an example of a basic pricing table that will work if you’re using the standard fields in Netsuite. You can customize some parts of the code (shown below) to your own Netsuite instance in order to populate the table with the correct information.

Building your table

Follow these steps to create an auto-generated table:

  1. In an Octiv document, create a table in the Octiv editor that has three rows and as many columns as you need.
  2. Add the class custom_pricing (below in red).
  3. Add the data-source attribute (below in yellow).
    • QuoteLineItems for quotes
    • OpportunityLineItems for opportunities
  4. Define the table structure by declaring the first row a header row, the middle row the body, and the bottom row the footer (below in green)
  5. Fill in the table
    • Type your column headers into the first row (below in light blue).
    • In the middle (body) row, place the fields you want in square brackets (below in yellow). To find the correct way to reference the fields, go back to the Incoming Data configuration, copy the field names exactly as they show in the saved list. Only the fields in square brackets will be replaced.
    • If you want a totals row, use the footer section (below in hot pink).
    • Styling is markup based; inside the cell tag use class=”money”,”html”, “integer” or “float” (below in orange).
  6. Optional: Sort the order of the line items in the table (below in pink).
    • data-sort=”field_name desc” (sorting is ascending by default)
  7. Filter the line items that will populate the table based on the value of one field from Netsuite. Filters are entirely case sensitive and have a variety of operators (=, !=, >, >=, <, <=, LIKE, NLIKE, IS BLANK, IS NOT BLANK). (below in darker blue).
    • data-filter="Name LIKE 'hello world'" like must be uppercase and comparison is also case sensitive
    • data-filter="Pricebook.product2.family = 'bronze'"
    • If you would like separate tables for each value of the filtering field, you can copy the table multiple times and simply set each filter to a unique value.

Rendered Table

NameItem PriceQuantityTotal Price
[name][item_price][quantity][sum]
Total Price:[SUM(sum)]

HTML

<table style=”width: 100%;” data-source=”OpportunityLineItems”data-filter=”PricebookEntry.Product2.Family = ‘Subscription'” data-sort=”PricebookEntry.Product2.Name”>
<thead>
<tr>
<th>Name</th>
<th>Item Price</th>
<th>Quantity</th>
<th>Total Price</th>
</tr>
</thead>
<tbody>
<tr>
<td>[name]</td>
<td class=”money” style=”text-align: center;”>[itemprice]</td>
<td class=”integer” style=”text-align: center;”>[quantity]</td><td class=”money” style=”text-align: center;”>[totalprice]</td>
</tr>
</tbody>
<tfoot>
<tr>
<td colspan=”3″ rowspan=”1″ style=”text-align: right;”>Total Price:</td>
<td class=”money” style=”text-align: right;”>[SUM(priceperunit)]</td>
</tr>
</tfoot>
</table>

Finally, test your auto-generated table using your data from Netsuite. When you create a new document, choose the template where you added the pricing table. You should be able to click Preview and see your populated table.


Did this article help?

Please provide us your feedback below.

* How helpful was this article?

If you have any additional questions and would like to be contacted by a member of our support team, please provide your email.