I have a module “Get a Contact” (Sendinblue). If the contact isn’t found, I “Create a Contact”. If the contact is found, I “Update a Contact”.
Screenshot below, I thought this was a simple way to do that, but it understandably sends me warning emails “Contact does not exist” whenever the contact isn’t found.
You can add an error handler to the get contact module and choose the create new contact module when there is an error ie not found. And just place the update contact after the get contact module so it runs when the contact is found
Ah sorry. I didn’t realise it was an error handler route. Check if there is a continue even if no contact found option under advanced settings on the get module. I don’t have send in blue, but worth checking if it’s there
If you add ignore as the error handler on the get module. Remove the other modules
Then set up your filters after the get module. That way it will ignore the error and continue. You can then filter based on whether the contact was found or not
Thanks @Bjorn.drivn, but I don’t have the option to add a router or any module to an ignore:
Thanks @Andrew_Mein, I had that yesterday, but it seems when it hits the ignore, it doesn’t continue with the other path. It just marks it as a success and stops the scenario. Here’s a screenshot:
I could be wrong, and I only have a few 10s of hours ofMake under my belt, but I think you might be thinking about this wrong?
I have some relatively complicated scenarios, with multiple if/else routes. When I started I stumbled across the documentation for if/else rules, and it it directs you to use filters and fall back positions etc. utilising routers.
From memory it’s something like this:
Get contact
Router
Path 1 - filter (continue if ‘exists’) → update contact module
Path 2 - filter option 1 (continue if ‘does not exist’) / filter option 2 (tick checkbox for ‘fallback’) → create contact module
Because you’re following a path only if the filter criteria are met then there are no errors. If it finds a contact then it goes one way, if not then it goes the other. Both are successful and complete actions as the logic had been satisfied.
Use the Explain Scenario button to see which order your paths are in (I think they use order of creation) to help with picking which filter and when.
I hope I’m right, and not getting the wrong end of the stick myself, and if so then I hope this is useful!
That’s a great comment, and yes you are partly true.
The logic with if/else statements and taking routes completely depends on your scenario. Having an if/else rule by using routes like you propose is most of the time the best way forward. However, you can only use this if the modules you are using allows this.
In this case @philthrive is using a “Get contact” module which usually is a GET call on a specific ID. In this case it’s trying to get a contact by ID from Salesforce. What you see with these “Get by ID” modules is that they don’t continue if nothing is found, and simply error out and stop the cycle. Because it errors out, you can catch this and basically do something to “Fix” this.
If Phil was using a “Search by ID” or “Search by name” module or something, the routes option you state here would (most likely) work since these modules usually continue the cycle even if nothing was found.
Hope this explains it and might help you out in the future as well