Line items and tables
A lot of the documents you'll build with Portant have rows that need to repeat: a quote with a list of products, an invoice with billable hours, a proposal with package options, a QBR with one row per deal. Line items handle all of that.
This is the home for everything to do with repeating tables, sorting rows, and grouping records into a single document. Source-specific guides (HubSpot deal line items, Google Sheets data grouping, webhook payload arrays) all link back here so the behaviour stays in one place.
What "line items" means in Portant
A regular tag like {{Customer Name}} puts a single value into the document. A line item tag is the same idea, but it sits inside a table row. When Portant runs the workflow, it clones that row once for every line item in the source.
So a single template row like this:
| {{Item}} | {{Quantity}} | {{Unit Price}} | {{Line Total}} |
becomes something like this in the output:
| Widget A | 2 | $50.00 | $100.00 |
| Widget B | 1 | $250.00 | $250.00 |
| Widget C | 5 | $20.00 | $100.00 |
The row above and the row below the line item row stay where they are. So you can put a header row above (column names) and a totals row below with formulas like {{=SUM(Line Total)}}. Both stay in place while the middle row expands.
In this section
- Repeating tables explains how a single row of tags expands into many rows at merge time.
- Sort and order rows covers controlling the order rows appear in the output.
- Group rows into one document covers combining many source records into one output.
Where line items show up across Portant
Different sources use slightly different language for the same idea. The guides below are source-specific recipes that all build on top of the rules above:
- HubSpot. Add multiple line items into a single document for quotes, contracts, and invoices built from deal line items.
- Google Sheets. Group rows into one document when several rows in the sheet belong to the same record (for example, multiple invoice lines that share an invoice number).
- Webhooks. Group webhook events into one document when an array in the payload should produce a single doc.
- Use cases. Quotes, Proposals, and Invoices all rely on line items to list products, services, or charges.
Related
- Tags
- Tag formulas for totals like SUM, AVG, MIN, MAX
- Conditional logic for documents to hide sections of a document for specific records