Question on Integromat.. returning wrong information

So Julian Kirkness created a really good blog on how to use integromat to verify fields live on a form. (thanks for that!).

Here is the link

I took his principle and modified it slightly to verify 3 fields using a webhook. Everything seemed to be going well however I am having a really bizarre problem and I don’t know if it is my code or an issue with Integromat.

Here is the description of the problem.

Let’s assume I have 3 records in my db and one of the records has this information in it.
Area = Entrance
Service Requirement = Vacuum (Vac), Floor Moped (Mop), Sweeping (Sweep), Disinfected (Disfect)
Cleaning frequency = Weekly (52 Cleans)

The way my webhook works is that it sends the information from Knack to Integromat via a webhook and integromat finds any records that meet these 3 criteria. From what I can see, the way I set it up it should integromat should need to have these exact matches to the criteria that is passed to it from the webhook. If a match is found it returns fail if no match is found returns a pass.

When it returns a pass the code within knack allows the user to submit the form. If it returns fail the code tells the user that he must select a different combination and inactivates the submit button.

So in testing for the most part this it all works. However, there is a small glitch. My expectation is that when integromat does its search it will find exact matches to the data passed into it via the webhook. the matches must be identical. However, it seems that when I select a combination where information is only half right it also returns a fail when it is supposed to return a pass.
What I mean is, if you refrence the record i wrote above Integromat appears to find a match as long as one or more of the “servicesrequired” are in located.

For example.

The following webhooks
(WEBHOOKURL)?areatype=Entrance&cleanfrequency=Weekly (52 Cleans)&servicesrequired=Vacuum (Vac),Floor Moped (Mop),Sweeping (Sweep),

returns a fail. which is correct because the information matches the information in the record. So it should fail. However,

(WEBHOOKURL)?areatype=Entrance&cleanfrequency=Weekly (52 Cleans)&servicesrequired=Vacuum (Vac),Floor Moped (Mop),

Also returns a fail even though this combination does not match any record in the database.

Can someone with some experience with Integromat give me some guidance…

My newbie brain says that the commas within the Service Requirement may have some hidden menaning that is allowing integromat to look at each item individually but I am not sure. sure.

both return false but there is no record in the database with these specific

Hi @Mikeacce

To work this out I think I would need to see a screenshot of the relevant Integromat module setups - especially the Knack Search module and the data returned by the Webhook module for one of these calls.

My gut tells me it is likely to be an issue with the commas in the services required data - so could you also show the field type of the services required field?

Julian

Hi Julian,

thanks so much for the reply… Here are the items you requested. Let me know if you need more.

Knack seach module

the return module
image

Here is the table for Cleaning that Integromat is doing the lookup on.

Here is my console.log file which shows the data being sent to the webhook as well as the returned fail or pass. The yellow highlight is the string being sent to the webhook the blue line is the return string from the webhook.

Hi

Very odd!

What type of field is Services Required? Could you show it definition

Julian

here is the image of the Services Required. it is a multiple choice (Checkbox). There are no validational rules or conditional rules.

thanks again for the help.

This is quite surprising - and I’m not certain where to start trying to fit it. Something I often do is to put in the exact same search criteria in the builder and see if the results are the same and adjust it to get it just right.

The surprising thing for me is that you are getting ‘false positives’ - i.e. records returned when they shouldn’t be!

One thing I would probably try would be to for the search with just the areatype and cleanfrequency and then compare the values of the services required from the Webhooks and the returned records (if any) and base the match on the combination - I feel this must have something to do with filtering on the multiple choice field (Haven’t done that before).

Ok… I can try that… What will I get back from Integromat as I assume I will no longer be using pass or fail. Will it be an object with the row information or just the number of items found?

thanks
Mike