Question

How to perform "if else display none" with line items


I have built an ecommerce restaurant ordering and delivery bot in Manychat and am having difficulty populating an “order summary” showing the items they’ve selected. I also have a zap set up to notify the restaurant once an order has been placed - trigger is Manychat tagged user and it sends them an email through Gmail and creates a new opportunity in HighLevel.

 

I can’t figure out how to remove the items they haven’t selected from the list. 

For example, if you gave them 10 different topping choices for a pizza and they only selected two, I’d like for there to be a list of only those 2. I found a workaround through Botmakers that sets the item name as a custom value and if it’s 0 or false (boolean), it will be a blank line. This solution is not good for large menus though or large lists of items. I also tried various text formatter steps through Zapier but none achieved the desired results. (Attached screenshots of what I’ve tried in Manychat that did not work)

 

I reached out to Zapier support who said that with a piece of custom code, I should be able to zap out all the data to a Google Sheet (all of the items along with the corresponding quantities, whether it’s 0 or not), then sort through that list to filter out the rows or lines that contain 0 quantity to produce a list of items within a cell that contains only what has been selected. I could then try to zap the contents of that cell back into Manychat as a custom field. If that’s not possible, I could at the very least use the contents of that cell to zap into an email and the opportunity in HL though.

 

So now I’m reaching out to all of you in hopes that someone has been through this situation before and knows how to solve it. Please let me know, much appreciated!


This topic has been closed for comments

2 replies

Userlevel 7
Badge +10

Hey Alice,

That’s quite a workflow challenge you've got there! I can see that you went back and forth with our Premier Support team but the conclusion was that code would have to be used. I’ve got some ideas but I’m going to read through your conversation with Support first, then test my theories. I’ll get back to you once I’ve had a chance to wrap my brain around this one :)

Userlevel 7
Badge +10

Hi @powersurgemarketing!

Soooo sorry I never came back to this one with an answer for you! I had just started on the Community team that very week and was a little scatter-brained. My apologies. If you’re still looking for a way to do this (and for anyone else who finds this) I’ve created an article that addresses something similar. Hopefully it can help you out! If anything is unclear or if it doesn’t really help you get what you need, please let me know :)