Filter for duplicates not working - duplicate bundles being created

I am trying to create invoices and new customers from an integration with Wave and a Tally form.

I have a router set up to either:
1. Create a new customer if the company entered doesn’t exist (in Wave) or
2. Create an invoice if the company entered in the form is existing customer (Wave).

Here is my setup:

Here were my existing “customers” before I ran the scenario:

I entered a form with an existing company name, so it should have created a single invoice for that customer.

Instead, it created multiple invoices and created multiple customers.

Upon inspecting the filter, it looks like I’m possibly creating duplicate bundles because it shows many of the same customer being checked in the filter, when it should only check it once, and then move on. You can see in the gif that there are multiple “New Company2” being filtered for.
CleanShot 2023-05-15 at 10.54.38

So my question is: I’m wondering where I’m going wrong with this - how can I correctly filter for existing customers and how I can avoid creating those duplicate bundles?

Here is a screen recording if it helps: here

Thanks!

Hi @magicmiles,

The problem is with the second module i.e List Field Definitions, it is resulting in multiple outputs, thus the subsequent module after the second module are triggered multiple times.

What is the purpose of the second module? You can use the Array aggregator after the second module which will prevent subsequent modules to be triggered multiple times. And, you might need to use get or map function to get the output of List Field Definitions if they are used in Wave.

1 Like

Hi @Runcorn thanks for your help! I think I misunderstood the purpose of the List Field Definitions. I removed it from the scenario and got much better results!

I do still have a lingering issue however - hope you can help.

The filter I have before the “Create a Customer” Wave module is intended to check the existing customers in Wave against the company name entered in the form, and if there isn’t one that exists, then to create a customer in Wave.

It seems to be creating a customer for every instance it doesn’t match against an individual customer name in Wave. So if I have 4 customers that don’t match the entry, it is making 4 new customers with the form submission entry. Instead, I need it to just make 1…


Any clue where I am going wrong here? Is this where I need to use an Array aggregator?

Same issue as the previous one, Can you share me what the mapping looks like in List Customers?

Is it possible to use filter such as name, email or such in List Customer Module? You will need to use array aggregator or limit the number of results that you get from the List Customers as it is at the moment returning 4 results, thus the create Invoice Module is being triggered multiple times.

1 Like

I was able to accomplish it with the Array Aggregator and using the ‘Name’ from List Customer Module after the Array Aggregator! Everything seems to be working :+1: Didn’t have a great understanding of what it did even after I looked through the Make help docs, but one YouTube video helped me grasp it better and how I should use it in this scenario.

Thanks for your help and recommendations.

3 Likes