Best answer

My Zap does not repeat the loop while sending line items from QuickBooksOnline to Smartsheet


Userlevel 1
Badge

I am trying to zap QBO invoices into a Smartsheet and need to create multiple rows in my destination sheet, one for every line item in my QBO invoice (rather then one row with the data separated with commas).

I tried setting up a loop action AFTER I set up the smartsheet ‘add a row’ action but I cannot get it to repeat the loop. Not sure where I am going wrong. Here is a snapshot  of the loop set up...what am I missing? Is there another tool that would be more appropriate? 

 

 

icon

Best answer by MohSwellam 2 September 2022, 22:44

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.

16 replies

Userlevel 7
Badge +9

Hey there, @DBS Analytics! Thanks for reaching out and welcome to the Community! 🎉

Hmm, apologies if this sounds like a silly question but have you already turned the zap on and ran it live to see if it’s working how you anticipated? The reason I ask is while testing it won’t loop through the whole zap. 🙂

If you have and still not running as expected, can you share screenshots of the full zap setup, with any personal details obscured? That may help us troubleshoot with ya. 

Looking forward to digging into this with you. 🤗

Userlevel 1
Badge

I published it and ran it live but the loop does not appear to be working.

I can only send one line from my QBO invoice to the smartsheet row. I cannot get the loop to create one smartsheet row for every line item in my QBO invoice.

The trigger is set to QBO New Invoice (with line support)

I set the loop after my QBO Invoice Creation Trigger. Is that correct or does the loop needs to be AFTER the Samartsheet Add Row Action? 

 

I am not sure if these are the correct values to loop. I chose the data that I need repeated for every line.  

 

I am not sure if I should change the default loop iteration counter or leave it at the default of 1. Same questions with the max number of iterations.

 

Userlevel 1
Badge

Also - would it just overall be easier to set up the looping zap that takes multiple smartsheet rows and makes one QBO invoice with multiple line items? The business process can go either way really but I just need the loop to work on some level.

Userlevel 7
Badge +12

Hi @DBS Analytics

You’ve honed in on the issue - you should leave the ‘Maximum number of Loop iterations’ field blank, it will then automatically loop through each line item. 

 

To answer your second question, QuickBooks to Smartsheet is going to be the easier way of doing this. If you went Smartsheet to Quickbooks, you would have to a) be able to tell the Zap to gather up all relevant rows into one order (this might be possible but would be difficult) and b) would then need to add some formatting steps to convert the rows into line items. 

 

I hope that all makes sense, let us know if you need anymore help with this one :) 

Userlevel 1
Badge

Hi Danvers,

Thanks for the fast reply. As advised, I left the Max iteration field blank but the loop still does not work, its not zapping any data into my smartsheet row.

Perhaps I’m going wrong with the iteraion START field? Do I need to indicate a data field from my QBO invoice or just leave it at 1? 

Also - I am uncertain if my “Values to Loop” are correct in my LOOP ACTION.

Am I supposed to indicate the looping values from my QBO invoice? Or the looped values to be repeated in the destination sheet?

 

Thank you! 

 

Userlevel 7
Badge +8

Hi @DBS Analytics , 

 

just wanna make sure you are using the correct Trigger as there are 2 options for New Invoices, one does that support line items and one that doesnt. 
 

Edit: Seems you already answered that above. In this case can you show us the Test data?  

Userlevel 7
Badge +8

Am I supposed to indicate the looping values from my QBO invoice? Or the looped values to be repeated in the destination sheet?

 

And to answer you other question, you should use the values coming out of the Looping step. If you arent, than this is probably why your zap isnt looping :) 

 

 

Userlevel 1
Badge

Trying to add multiple rows from a QBO invoice to multiple rows in a smartsheet and I can’t get the loop to operate.

 

My Trigger QBO Invoice Creation: I made sure to select the “with line item support” for my trigger The test data shows that is sees 2 lines of data for the 2 items being sold in this invoice.

 

Action: Looping. I set the loop action AFTER my Trigger but BEFORE my final smartsheet “Add a row” action.

I set my Looping Values for the data I want looped into my destination sheet.

I set the “Loop Iterations counter” to the line on the QBO invoice and left the maximum iteration number blank.

 

Last, I set the final action to pull the needed QBO data into the appropriate columns in the smartsheet.

 

please help - thank you!!

Userlevel 7
Badge +8

Hi @DBS Analytics , 

 

You still couldn't get this to work? From what I see you have 3 problems: 

 

  1. The data you are passing in the loop is not for the line items, its for one of the items. You need to pass here the value from the trigger that is comma separated 
  2. Why are you adding the Loop Iteration? Keep it as 1
  3. Lastly, in the Smartsheet Step, you have to pass the values from the Loop not from the QBO. 

If this doesn't work, you can screenshot all the results from the Trigger and send them here (after removing any sensitive information of course) 

Userlevel 1
Badge

Is this what you meant in #1? 

# 2 - I left the iteration start at 1. Should I leave the max iterations blank? or at the default of 500? 

#Three - see screenshot below - I am not sure this is correct way to pass the data from the loop. thank you so much for your help, this is the first time, obviously ;), I’ve messed with a loop. 

 

Userlevel 1
Badge

Also - here is trigger test data (all data is staged/fictitious).  thank you

 

Userlevel 7
Badge +8

Hi @DBS Analytics , 

 

Its my pleasure :) 

 

  1. No this is not what I mean. What I mean is you are passing the wrong fields from the Trigger. IF those were line items they would have commas like in this screenshot below. Remove that data and look for the data that has Commas. Those are the Line Items. This is your real problem here. You had it right the first time, having a separate line for each item, the data inside each item was the wrong data. Again, all those values HAVE to be the line item values, not the Item values you currently have. A simple trick is to Search in the Trigger for those values you see now, you will find them twice, once for the Item and once for the Line Item. Example: look for the word “Glitter” in the Test Data, you SHOULD see it at least twice. 

     

  2. You can add 500 in the Maximum iteration (but without step 1 there is nothing to loop :D ) 
  3. Yes this is correct (given you go back to the way you had it setup)
Userlevel 7
Badge +8

To the clear, when I say “Search for it in the Test Data” I mean when you try to add it in the Step not in the actual results of the test like the screenshots. Because in the screenshots you have it shows as Line Items but when you try to map it in the Action you should see it as comma separated values :) 

Userlevel 1
Badge

Well a little progress but not quite correct -- This zap populated one row in smartsheet with the data separated by commas rather then 2 separate lines. 

I put the loop values back in as instructed but included the data separated by commas - is this what you meant? 

 

 

The loop iteration test data seems like it has both line items and the desired data - is that correct?

 

 

 

the final add row action I also included the data separated by commas but not sure if this is correct...

 

test data from action shows data separated by commas…..but I need 2 rows to be made. 

I don’t think I am programming the action properly...do I use the loop iteration data?

thank you

 

Userlevel 1
Badge

 

@MohSwellam - I got the row loop to work!! woo-whooo!

Part of my issue was giving smartsheets enough time to receive the zap, it takes a few minutes for the rows to populate and I wasn’t being patient enough before scratching my selections and redoing the zap (good lesson). 

Here is the screenshot of my final loop selections just in case anyone in the future is having a challenge with this particuliar issue. 

Thanks again for your help!

  1. Screenshot of QB data selections for Loop Values

 

  1. Data selections in the “add a row” Final Action 

 

Userlevel 7
Badge +8

Wohoo 🥳! 
 

Glad i can help @DBS Analytics 

 

if you can mark the reply that helped you as Answer that would he great :)