Matches Pattern on Branches Filters after Router

Hi everyone, I would love to have some help there. So, I’m receiving some input in JSON containing prospect information. Here is an example:

[
    {
        "zip": "62590",
        "city": "Oignies"
        }
    }
]

Based on the zip code, I want to dipatch the prospect to my agencies. And each agency covers a limited and determined list of zip codes. Here is what my workflow looks like:

On each branch after the router, I set up a filter with the zip code. I had understood from other discussions, that I could use the following pattern (12345|67890|12346) etc. so the filter will check if the lead ZIP code matches any of the three zip codes. But, it doesn’t seem to work. I tried “Matches Pattern”, “Equals to”, “Contains”, I tried to add ^ and $ in my patterns, but nothing works.

I would much appretiate your help :slight_smile:

Cheers!

1 Like

Hello,

  1. Are you sure the JSON is valid? Your example definitely isn’t. But as your screenshots show correct mapping, I assume the error occurs only here.

  2. Using this method requires the filter to be configured with extra care - even a “new line” symbol after ) will crash the filter.

I recreated your workflow and it works as expected. So please check if your ZIP code sets do not contain any extra characters.

Have a nice day,
Michal

Hi @Quentin_h33 ,

Please cross-check whether the ZIP code coming from your webhook contains any extra characters other than digits, as defined in the filter condition.

I’ve tested this with an example case and shared it in the screenshots for your reference. Kindly verify on your end that it’s working as expected based on the setup I’ve shown.



Additionally, please let me know if you encounter any errors while applying the same conditions in the filter.

Best regards,
Msquare Automation
Platinum Partner of Make
@Msquare_Automation

If you need further assistance, we require more information that demonstrates the problem to help us reproduce the scenario and any issues and errors. To allow others to assist you, please provide the following:

2. Scenario Blueprint

Providing your scenario will allow others to quickly recreate and see how you have set up the mappings in each module, and also allows us take screenshots or provide module exports of any solutions we have for you in return. This would benefit you in implementing our suggestions as you can view screenshots of the changes or paste corrected modules back into your scenario.

Need help❓View instructions ◀

A. Export Blueprint

In the scenario editor, click the three dots at the top-right, then select “Export blueprint”.

  • You can upload files and images to this forum by clicking on the upload button:

    Uploading an attachment here will look like this:
    blueprint.json (12.3 KB)

B. Create Public Share Link

In the scenario editor, click on the Share button:

Read more about the scenario sharing feature in the Help Centre.

3. Properly-formatted Output Bundles from a Scenario Run

Please provide the input/output bundles of each of the relevant modules by running the scenario, or get the bundles from a previous run from the Scenario “History” tab.

Providing the bundles from a scenario run will allow others to replicate what is going on, especially if there are complex data structures (nested arrays and collections) and external services. This helps mapping the correct raw variable names from collections (instead of the label/display name).

Need help❓View instructions ◀

Click on the white speech bubbles on the top-right of each module and select “Download output (or input) bundles”.

A. Upload a Text File

Save each bundle contents in a plain text editor as a moduleNumber-output.txt file. Open the file to check if it has not added additional formatting or encoded the plain text.

  • You can upload files and images to this forum by clicking on the upload button:

    Uploading an attachment here will look like this:
    module1-input.txt (1.2 KB)
    module1-output.txt (3.4 KB)

B. Insert a Formatted Code Block

If you are unable to upload files on this forum, alternatively you can paste the bundles AND format them correctly.

:warning: Formatting IS Important! :warning:

Here are some ways to provide text content in a way that it won’t be modified by the forum.

  • Method 1: Type code fence manually
    Manually type three backticks ``` in a separate line before and after the content, like this,

    ```
    text goes here
    ```
    
  • Method 2: Highlight the pasted content, then click the preformatted text/code button

  • Method 3: Upload your file elsewhere and share the public link
    This method is only advised for large files exceeding the forum upload limit.

Sharing these details will make it easier for others to assist you, so that you can get better answers, faster.

@samliew

Hello @mszymkowiak @Msquare_Automation @samliew ,

Thanks a lot for your replies.

I indeed had a “new line” in the pattern, hence blocking the dispatch. Simple but cruel.

Thanks a lot, lesson learnt :folded_hands:

2 Likes

Thank you for letting us all know, Quentin! :slight_smile: