Best answer

Line Items to Text Message?

  • 1 April 2021
  • 4 replies
  • 507 views

Userlevel 1

I’ve been reading about line items and looking for solutions, but I’ve come up empty.

 

I’m trying to create a Zap that sends a notification to Google Chat whenever we receive a new order in BigCommerce.  The New Order trigger supports line items for all the items on the order, and I want to print them in the chat message so I can see quantity, name and price for each item they ordered.  I just can’t seem to find how I can parse those lines and format them into a block of text.  It seems like it should be do-able.

 

Unfortunately Google Chat doesn’t have any cool formatting options for tables that I’m aware of, so I think it just needs to be appended in a string.  But instead of it being appended by data type. (quantities, names, prices), I want to append them by line item

 

Not this:

1,2,1

Product X, Product Y, Product Z

$1.00, $4.00, $3.00

 

I want this,

 

1, Product X, $1.00

2, Product Y, $4.00

3, Product Z, $3.00

icon

Best answer by gspence 2 April 2021, 00:18

View original

This post has been closed for comments. Please create a new post if you need help or have a question about this topic.

4 replies

Userlevel 7
Badge +14

Hi @gspence 

Try using Digest by Zapier: https://zapier.com/apps/digest/help

Userlevel 1

Ok, I got it all figured out.  This always happens after I finally post for help. :grin:

 

Formatter → Utilities → Line-Item to Text

 

Use the Input field to format the text the way you want it.  Here’s what mine looks like.  I surrounded the Quantity in parenthesis, put two spaces before the SKU, and then a space, dash, space after the SKU and before the product name.

({{117691319__products[]quantity}})  {{117691319__products[]sku}} - {{117691319__products[]name}}

For the delimiter, I used [:newline:] so each product gets its own line.

The final output in “text” looks like this.

 

(1) ABC123 - Product X

(1) ABC124 - Product Y

(2) ABC125 - Product Z

 

Userlevel 1

Hi @gspence 

Try using Digest by Zapier: https://zapier.com/apps/digest/help

Thanks for the reply!

Since digest works with multiple events, and i’m just dealing with one event, would the Line-Item to text solution I posted above not be a bit simpler?  

 

Userlevel 7
Badge +14

@gspence 

Good job!

Often there are multiple ways to achieve the same results.

If you’re interested play around with Digest to see if it’s an app you can add to your skill set which may come in handy in the future.

The Looping app is also helpful when dealing with Line Items (aka Arrays): https://zapier.com/apps/looping/integrations