Flow Designer Subflow: “If Contact Exists” Condition Always Evaluates False After Contact Creation
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
yesterday
Hi Community,
I’m working on a Flow Designer subflow that handles Contact and Case creation when a new email is received via the email channel in ServiceNow CSM.
Here’s the logic:
Below condition is evaluated as false, even new contact record is created.
Goal:
I want the flow to:
- Create a Contact if it doesn’t exist.
- If it exists (or after creation), proceed with Case creation using the correct Contact.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
yesterday
Hi @swethavelu ,
That's correct, because you're referring to step number 8 in step number 11 to check if the contact exists or not, so it says 0. (its a initial check)
Option 1) You check the contact table with the incoming email again in step number 11 and, based on the count, create the case.
Option 2) Move your "create case" block inside the first if after contact record creation, so that if the contact doesn't exist, it will first create the contact and then create the case.
Hope this helps!
Thank you,
Hemanth
Certified Technical Architect (CTA), ServiceNow MVP 2024, 2025
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
yesterday
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
yesterday
In the 'If loop' itself where you are checking that the Contact not exists, you can create a contact and create a case immediately.
Or else you can use the lookup records again before step11 and check if the contact exist or not. Usually, it will return as true since it's already created in the step above (provided if there are no errors).
Mark my response as helpful and accept the solution if it helps.
Regards,
Nayan
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
yesterday
you already have IF for Not Exists, then simply use ELSE for that
Why again to use IF logic?
The reason why it might be failing is you are checking Count = 1 inside IF, there could be multiple contacts with same Email.
💡 If my response helped, please mark it as correct ✅ and close the thread 🔒— this helps future readers find the solution faster! 🙏
Ankur
✨ Certified Technical Architect || ✨ 9x ServiceNow MVP || ✨ ServiceNow Community Leader