Tuesday, 12 December 2017

The Zapier Guide to Line Items

e pluribus unum. The timeworn phrase that graces most US banknotes—Latin for "Out of many, one"—was intended to represent the United States being one nation of many states, could easily have a double meaning. After all, so often when you open your wallet to pay a receipt or invoice, it's not just one item you're paying for. That wad of bills pays for a whole basket of goods—one receipt for many items.

That in a nutshell is line items. A somewhat cryptic term you might have seen in an invoicing or accounting app, line items are each individual, itemized expense on a receipt, order, invoice, or payment. Your one invoice covers a lot of smaller items.

While convenient for the customer paying at once for all those things, line items turn each individual invoice into a lot of extra work for you if you're managing these details. You don't only copy one $99 order into your accounting app—you have to copy the inventory for each item ordered, log each item's sale price, and list the details and the total in your accounting app. Scanning receipts for your personal finances? You'll need to copy the total amount spent along with details about each item you purchased. Even a new company in your CRM could have contact details for every person who works there. Here's how to automate all of that and more with Zapier's new support for automating line items with your favorite apps.

When One Invoice = Many Items

Xero invoice with line items
Selling more than one item? Your invoice or receipt has line items.

Computers are best at doing repetitive things, far faster than humans can (and without dying of boredom). And so, your handy eCommerce app is great at ringing up your customers' virtual cart. App automation tools like Zapier, then, are great at logging that sale to your accounting app, emailing your customer, and letting you know that you need to ship that new order. Each of those automations do one thing: They notice you have one order and do something with it.

Say you want to email the customer and thank them for their order. Connect Zapier to Gmail, select the customer's email address from your invoice or eCommerce app, then type out a message to them (perhaps including their name from the invoice as well).

Zapier Gmail notification
One email address, one To field. Easy.

However, line items—the array of individual items that each take up a single line in your invoices and receipts—need a bit more work. Say you're updating inventory after a purchase or want to list each individual item that you sell in a spreadsheet? Sometimes customers will purchase only one item; other times, they might order 100.

What you need to work with each item is a for loop in your automation—something that runs over and over again until it's copied every line item in your invoice or order.

And that's exactly how line items work in Zapier.

How to Automate Line Items in Zapier

Zapier Xero Line Items
Apps with line items show one set of data for each line.

When you connect one item to one field in Zapier—as in the Gmail example previously where we add the customer's email address to Gmail's To field—you're connecting that one item once—because it's only one piece of data.

Line items need a bit more work, because each line item can contain multiple kinds of information—and because there are usually more than one line item. For example, the first line item might represent one product and, with it, the product name, item ID, price, description, and more. The second item would represent another product's details. You can think of line items as rows in a spreadsheet, with each row having data in multiple columns. So instead of matching up each individual line item, we'll match up the line item data field from your first app to the correct field in the other app.

Don't worry if this sounds too technical or confusing. When setting up your Zap (what we can a workflow that connects two or more apps), everything will be working behind the scenes as you choose the data to link the apps together in the Zap editor. All you need are 2 apps that support line items—more on that below—and when you connect them in Zapier, you can copy each of your line items entries over individually.

For example, say we create a Zap that will run (or trigger) whenever there's a new Xero invoice as in the screenshot above. Whenever a new invoice is added to your account, Xero will send it to Zapier with details about each line item—the 1 and 2 above.

Google Sheets Line Items
Add an action app that supports line items, and each item will be saved individually.

Now, add an action step to your Zap that will tell Zapier where you want to copy the invoice information from Xero—perhaps the Google Sheets Create Spreadsheet Row(s) action that supports line items as in this screenshot above. You'll notice two different things: The part of the action app that supports line items is in a separate grey box, and the line item parts of your data like the product name and price are prefaced with Line Items. That's on purpose. Everything inside the somewhat darker outlined grey box will be run once for every line item you have. Have 1 item in your invoice? One thing's getting added. 3 items? This section is running 3 times before the Zap stops.

So, click the + icon beside each of the fields in the line item box and select the correct line item data from your trigger app to add it to that field. The data might show up a bit weird; in this screenshot, it shows all three products in one list.

line items in Google Sheets
Our line items happily on their own rows.

Don't worry. When the Zap runs, it will split each line item out and save them separately, giving us 3 rows in Google Sheets with our products from that one invoice.

Shopify Line Items
Zapier only saves the items outside the Line Item box once.

And if your action step has some fields outside the grey box, those items will only be run once. Say you're using our Shopify Create Order action. You'll want to add the customer once, but then will want to also add each of the products purchased. That's why Zapier shows the contact info first, and then has a separate box with the line item fields labeled as line items. The contact info gets added to the order, along with one product entry for each of your line items.

Zapier Integrations with Line Item Support

Ready to start doing more with your sales and invoice data? Over 20 apps support line items with Zapier today, with more being added regularly. Here are the apps you can start using line item automation with:

Or, just use one of these pre-made Zaps to start doing more with the line items in your orders and invoices:

Format Your Line Items with Zapier Formatter

Zapier Line Item Formatter
Tweak line items with Zapier Formatter, and like magic, each one gets transformed.

Zapier's built-in Formatter tool is a great way to do more with your data. It can split first and last names, extract phone numbers and links from text, format dates the way you want, and much more. Those and nearly all of Formatter's tools work with line items, too.

If your trigger app supports line items as do most of the apps in the list above, then Formatter can tweak each of your line items. Here's how it works:

  1. Make a Zap with a trigger that includes line items, such as an order or invoice
  2. Add a Formatter step, and select the action and transform you want to use
  3. You'll notice a grey Values box around the fields that support line items. Click the + icon on the right and select the line item data you want to format.
  4. Set all remaining fields, if needed, then test the Zap.

Once that's done, check your results. Instead of one formatted item, you'll have each of your line items formatted the way you want. For example, in the gif above, we formatted each invoice item's sale price into standard US Dollar formatting—and can now add that formatted price in our spreadsheet.

And yup, those formatted line items show up as a line item in your Zap's subsequent steps, so you can still save each formatted item as unique rows and items in your other apps.


Your automations don't have to just see your orders and invoices as monolithic widgets. Instead, with line items, they can pull apart each order, log every part, and keep you from missing any tiny thing that goes through your store.

They're one of the best ways to get your Zapier automations to be a bit smarter and take on all the work you throw at them.

Do More With Your eCommerce Store

Ultimate Guide to eCommerce Software

Copying line items from each order and invoice is only one small part of running your eCommerce store. For starts, there's the whole hassle of setting up your store and choosing the best software to handle your orders and payments. Dig deeper, and there are dozens of other tasks you'll need to tackle—many of which you can automate with Zapier.

For more great ideas about how to optimize your store, grab a free copy of Zapier's Ultimate Guide to eCommerce Software. It will walk you through everything from setting up your store and choosing apps apps to the automations you need to keep things running smoothly and with less effort.



source https://zapier.com/blog/formatter-line-item-automation/

No comments:

Post a Comment