Skip to main content
Best answer

Duplicate Orders in Xero

  • February 1, 2021
  • 5 replies
  • 183 views

Hi Everyone,

I just had a fix regarding the item line on Xero but the problem I am having now is that,
The number of order gets duplicated on depending on the number of items inside the invoice.

Here’s an example.


On this invoice, there are 3 items inside the invoice form the Contact Form 7 that I submitted.
Zapier is also sending 3 invoices as well since there are 3 items.
How do I enable Zapier to only create an invoice once for this?

 

Here’s my Zap Flow


Thank you!

Best answer by GetUWiredBest answer by GetUWired

@chanhalzkie 
I would replace the looping action with Formatter by Zapier > Text > Transform > Replace to replace any input that is blank. I.e replace two commas in a row ,, in your list with just one comma ,

 

That would accomplish what it looks like you are trying to do and remove any blank line items and return a list with only filled data.
 

 

View original
Did this topic help you find an answer to your question?
This post has been closed for comments. Please create a new post if you need help or have a question about this topic.

5 replies

nicksimard
Forum|alt.badge.img+11
  • Zapier Staff
  • 2115 replies
  • February 2, 2021

Hi @chanhalzkie!

I see the icon for Looping by Zapier, which is our new app that does exactly what it sounds like. It will take one of several types of inout (including line items) then loop through each one to perform all of the subsequent actions.

Seems like that’s probably the case in your Zap. The Xero step is being repeated for as many times as there are line items in Step 3.

Instead, you would want to map the line items themselves into the portion of the Create Sales Invoice step so you’re only creating one invoice, but with multiple line items. You can read more about that here.


  • Author
  • Beginner
  • 3 replies
  • February 2, 2021
nicksimard wrote:

Hi @chanhalzkie!

I see the icon for Looping by Zapier, which is our new app that does exactly what it sounds like. It will take one of several types of inout (including line items) then loop through each one to perform all of the subsequent actions.

Seems like that’s probably the case in your Zap. The Xero step is being repeated for as many times as there are line items in Step 3.

Instead, you would want to map the line items themselves into the portion of the Create Sales Invoice step so you’re only creating one invoice, but with multiple line items. You can read more about that here.


Hi @nicksimard nicksimard,

Thanks for your response.
Unfortunately, if I remove the Looping by Zapier, it’ll create an invoice that shows up like this.


I’m using the Looping to remove any empty line item.
Here’s my previous topic regarding that matter:
 

https://community.zapier.com/general-questions-3/getting-rid-of-no-data-item-line-from-xero-7788


Any other ideas to get rid of no data/item line without using Looping?
Thanks​


GetUWired
Forum|alt.badge.img+12
  • Zapier Expert
  • 1030 replies
  • Answer
  • February 2, 2021

@chanhalzkie 
I would replace the looping action with Formatter by Zapier > Text > Transform > Replace to replace any input that is blank. I.e replace two commas in a row ,, in your list with just one comma ,

 

That would accomplish what it looks like you are trying to do and remove any blank line items and return a list with only filled data.
 

 


  • Author
  • Beginner
  • 3 replies
  • February 10, 2021
GetUWired wrote:

@chanhalzkie 
I would replace the looping action with Formatter by Zapier > Text > Transform > Replace to replace any input that is blank. I.e replace two commas in a row ,, in your list with just one comma ,

 

That would accomplish what it looks like you are trying to do and remove any blank line items and return a list with only filled data.
 

 


I was away for a week so I wasn’t able to check my Zapier Topics.
Having to return to this answer has fixed my problem.
Even though I’m late, I would like to thank you so much!
Cheers!​​​​​​​


GetUWired
Forum|alt.badge.img+12
  • Zapier Expert
  • 1030 replies
  • February 10, 2021

@chanhalzkie 

Always happy to help!