Line Items#

Zapier can support line items for specific apps but does not do so by default, so you'll want to check to see if the trigger or action you're using has line item support. Most often line item support relates to invoicing and financial apps, but some other apps do have array support as well.

Line Items Basics#

This section is a bit of background and technical explanation - feel free to skip to the next section if you want to jump right into line items in Zapier!

In an invoice, a line item is a way to itemize distinct charges made or items purchased within a single order. Usually in your app line items will look like this:

When Zapier receives line items, the raw data will look something like this:

You don't need to be able to understand this text to understand Line Items! The big takeaway you'll want to understand here is that each field in the “Lines” section exists once per line item. For example, in the code above you'll see that there are two instances each of the “LineID”, “Description”, “Qty”, etc values because there are two line items total. If there were three line items, there would be a third set of data with the “LineID”, “Description”, “Qty”, “UnitPrice”, and “Name” fields specified. This data is in a special format called an array, and Zapier can only send and receive line items in apps that have been specially configured to handle such arrays.

Using Line Items in Zapier#

In Zapier, line item support is available at the trigger and action level, not at the app level. For example, for Quickbooks, Zapier offers two “New Invoice” triggers –– one with line item support and one without. Support for line items is denoted in the trigger or action’s description:

When testing your trigger, line items can be difficult to spot in a trigger’s sample data, but you’ll usually see them indented under a heading like “line” or “line items:

In an action, fields that can be mapped as line items will be indented under a heading, like so:

The most common way to use line items is to take the line item provided by the trigger and map it to the action field:

In this example, you can see that the “Line Items Description” field contains the description for all three line items provided by our trigger. Although these items look like a standard comma-separated list in the Zap editor, they’re actually formatted in a very specific way so that Zapier can pass them to the action as line items, so not just any comma-separated list will work here. (If you have a comma-separated list that you’d like to send as a line item field, you can do so by using a Formatter by Zapier workaround

You can map the line item fields to ensure that one line is created in the invoice per line incoming from your trigger. If you have a field that should be set to the same value for every line created, you can type in that data statically or enter a non-line item field. For example, if I wanted every line in my Quickbooks invoice to have the same service date, I could map a date provided by the trigger to that line (even though it’s not a line item field):

Using Dropdown Fields With Line Items#

Occasionally when setting up line items in your action, you’ll see a dropdown under the line items heading like this:

Dropdowns in line item fields work exactly the same as other dynamic dropdown fields but can be very tricky if you need to map them dynamically (e.g. set a different product/service for each line of the invoice). If the dropdown field is not required, one option is to leave those fields blank and only use the free input fields. Sometimes, though. your workflow may require those fields to be set, in which case you can use a workaround. Because dynamic dropdown fields require an ID, not a name, you’ll need to use a Formatter by Zapier lookup table step to map the product name from your trigger to an ID field your action can use. (You can see full instructions on setting up a lookup table here.) The lookup table can take a line items input:

And output your IDs in a line items format:

So you can map the output of that Formatter step directly into your action as a custom value for the dropdown field you’re working with:

To see more ways to use Line-items with Formatter, go here