I've Been Waiting For This For YEARS | Conditional Logic Forms

Richard Kohberger walks through ServiceTitan's new conditional logic for forms, which hides or shows fields based on rules. He builds a Vehicle Inspection form from scratch, setting up If→Then rules to simplify long forms and showing how to reorder rules when they conflict.
What's going on, everybody? It's Richard Kohberger here, the blue collar nerd. And in this video I'm going to be showing you how to use a super useful new feature that has just come to forms, which is conditional logic. I'm super excited about this because I've been asking for this feature for a long time, since before I even worked at Service Titan. In fact, here's a clip of me asking for it in my Christmas wish list video back from the olden times of 2019. If, then statements are a must. I need to be able to say that if answer to this is yes, then populate these questions. For example, if is there a furnace Equals yes, then populate all these furnace related questions. Otherwise don't bother my technician with them. Just clutters up the form, makes it more clunky, makes it harder to understand for both the technician and the client. And now that feature is here. Let me show you how it works. So before I show you how to actually build a form using conditional logic, let me just show you a form that I've already built with conditional logic, just so you can wrap your head around what it does. So right here I have an H vac Scope of Work form, and if I go into the edit view, we can see what it looks like. And as you can see, it's a pretty long form. There's a whole lot of questions here, and chances are not all of these questions are going to be relevant in any given situation. For example, right here I'm asking for the attic opening dimensions. Well, that doesn't matter if we're not putting a unit up in the attic. So why would I ask that? And that is where conditional logic comes in. So let's preview this form. And now we're looking at it the way that a technician would see it with the conditional logic. So let's scroll to the bottom and you can see already there's a whole lot less questions on this form. But the questions are going to change depending on how we answer the questions that are here. So first of all, it's asking me how many systems are we working on? If I just put in one, nothing changes. But if I put in a value greater than 1, I get this message reminding me that I need to fill out a separate form for each system that we will be installing. Which system is it? Let's say that this is an upstairs system that we will be replacing. And then ask me is to say full system condenser and coil condenser only. Let's Say that this is going to be a full system. And you see, I get all of these different questions now that weren't there before. So like you can see right here, it's asking me, what type of indoor unit will we be installing? Well, we're not going to be installing any indoor unit. If, for example, this is a situation where we are only putting in an outdoor condenser. So let's change the answer to that. And, and you see, that question about the indoor unit just disappears because it's not relevant. Okay, let's say it's a full system again. And now it's asking me where we're going to be installing the indoor unit. Let's say we're putting it in an attic. And now the form wants to know what the dimensions of the attic are so that we can make sure that we're going to fit the equipment up there. Then it's asking me, what type of indoor unit are we installing. If I say it's an 80% furnace, I get asked if the flue pipe is the appropriate size and if it's up to code. But if I say it's a 90 plus percent furnace, aka a condensing furnace, then I get asked if there's a PVC flue, because those types of furnaces require PVC flue, not metal. By the way, I'm going to be putting both this scope of work H vac form as well as the form that I'm about to build right in front of you up in Titan Exchange so that you can pull it into your own account if you would like to use it. But you're getting the idea here, right? You see the value in this. Let's say it's asking me, are we adding any ductwork? If I say yes, it's going to ask how many supplies, how many returns. Let's say I'm going to put in three for new supplies. Okay, well, what sizes? Where are we putting those? We're able to gather all of the relevant information for the actual situation while not cluttering up the form with a bunch of questions that aren't relevant to the situation. So that's what it does. Now let me show you how to build a form with conditional logic. So for this example, we're going to be building out a vehicle inspection form. Now, for the sake of time, I've already got all of the form questions put in here, and the only thing left to do is to add in the conditional logic. We've got this form assigned to technician, because this is Not a job form. This is a non job form. And you see we've got all these questions here and it's a pretty long form. You'll also notice that pretty much every question that I have here has a follow up question that would only be relevant if the answer to the other question was that it failed the inspection. So for example, the oil level I'm asking pass or fail. And then this follow up question was the oil issue resolved on site? So we're going to want to hide this question unless the answer to this question is fail. So when you're first building out a form that you intend to add conditional logic to, that's how you want to do it. You want to put in questions for every single situation that you're anticipating. Then we're going to come up to the top here and we're going to click this new magical button, add conditional logic, and that takes us to this screen here. Okay? Now the first question we have to answer is which questions are we going to initially display? So by default, everything is selected. So by default, when you click into the form, every single question that you added to the form is going to be showing. So the first thing we need to do is uncheck all of the questions that we don't want to show by default. And if you've got things grouped out into sections, then you can do that by entire sections or individual things within those sections. So I want to show all of these general info questions by default. You see that I have this question here where the fluid levels checked during this inspection. I have that question in there because, you know, checking the fluid levels is a little bit more involved. Maybe that's done more on a quarterly or monthly basis. But you want to fill this form out every single week. And so then I've got this whole section of fluids related questions. And if the answer to that question is no, we didn't check the fluids, then I want to not show this. So by default I want fluids to be hidden and I only want to show it if they answer yes to this question. Okay, so the question about windshield wipers here, I do want that to show by default, but were the windshield wipers replaced on site? I'm not going to show that by default. I'm only going to show that if the windshield wipers fail the inspection, is this making sense? So I'm just going to do that all the way down. Question about tires. Yes. Where's the tire issue resolved? No question asking about the vehicle's lights. Yes. Question asking which specific Lights failed the inspection? No, I'm only going to show that if lights did fail the inspection. So I'm just going to do that all the way down, hiding the stuff that's not relevant. By default, stand in the place where you live. Okay, so there we go. I've got 16 questions selected, going to show on this form by default. Now let's go ahead and hit preview and make sure we didn't miss anything. So the vehicle number, the vehicle's current driver, fluid levels, windshield wipers, fields. For additional notes, couple of sign offs. Okay, that's looking good. So now we're ready to add our first rule. So I'm going to click add rule and then I get this here and we have some if then logic here. So if any or all of these conditions up here are met, then do these actions. So we'll start with if the field were the fluid levels checked during this inspection? Condition is equal to yes. Then we are going to show the fluid section here, but not everything in the fluid section because some of these questions are only going to be relevant if something fails the inspection. So was the oil issue resolved? Was the transmission fluid issue resolved? We're going to uncheck all of those. Okay, so now we've got our rule. So if we the fluid levels checked during the inspection is equal to yes, then show these seven questions related to the fluid levels. Now we don't need to do it for this particular question, but we could add additional conditions up here and then we can choose if we want our action or multiple actions down here to happen if all of these conditions are met. So it has to be both this and that. Or we can set it to do our actions if any of the above conditions are met. So it doesn't have to be all of them. If any single one is following the condition, then we're going to go ahead and do the action. And because we only have one condition on this question, it doesn't matter. They'll both do the exact same thing. But I'm going to leave it set to all. Okay, so we've got our first rule set up. Let's preview it and test it. Just make sure it works. So there's the question. Were the fluid levels checked? Let's say yes and boom, we see that. We now get this fluid section asking about all of the fluid level levels. Okay, but now let's say that this oil level failed. I want additional information now. But the additional questions aren't showing up, so let's fix that. So we're going to add a new rule, we're going to find that question. So if oil level condition is equal to fail, then I want to show this question, was the oil issue resolved on site? And I've got a question like that for all of the different levels. So I need to make a rule for all of those different level questions. So the transmission fluid level, if that is equal to fail, then I want to show the question, was the transmission fluid issue resolved on site? Et cetera, et cetera. You get the idea. I'm just going to speed through this part. Stand in the place where you live now. Okay, I'm going to pause right here just to demonstrate that I can choose to show or hide multiple things based on the answer to a question. So right here I have a question about the washer fluid level. If that's equal to failure, then I have two questions that I want to populate in that case. First of all, was the washer fluid restored on site? But second, I want to know is there any reason to suspect that the washer fluid is leaking? So I can check both of those off. And now if the washer fluid level answer is fail, both of those questions are going to show up. Okay, let me pause again here. We've got a little bit of a different situation. So for the question on this form about the vehicle's lights, I chose to make that a checkbox question. So I've just listed out a whole bunch of different lights on the vehicle, and I'm asking the person filling out this form to check only those that fail. So you can see here, here's all of the options that they have available to them to check off. So they can say all lights pass or they can check off whatever lights failed, including an other. And what I want to happen is if any of the lights fail the inspection, then I want to ask was the light replaced or repaired on site? And if they check off other, then I want to populate this text field that asks them which light is the one that failed the inspection. That's just kind of covering my butt in case I forgot about a light that could possibly go out. Okay, so first of all, was the light repaired or replaced on site? I have two options to make that happen. I could say if the answer to the question is equal to the regular headlights are broken, or if it's equal to the brights are broken, or if it's equal to that would take forever. So we're definitely not going to do it that way, where instead we're going to choose the condition Is not equal to. And then I only have to pick one thing. If the answer isn't that all lights pass, then I want to ask this other question. Was the light that was broken replaced or repaired on site or not? Okay, now when we are using the is not equal to condition, then there is something that can trip you up. And I'm actually filming this clip out of order because it actually tripped me up. So on this rule that we just made, it states that if the answer to this question about the lights is anything other than all lights pass, then we are going to show this question was the light repaired or replaced on site? So was the light repaired or replaced on site? You'll see that here at the very top of the of my rules here, where I choose what questions display initially. Was the light repaired or replaced on site? Is not checked off. So when I first look at this form, I shouldn't see that question. But I'm going to hit preview now to look at my form and test it. And here's my question about the lights and was the light repaired or replaced on site? Is showing up. So what's going on? Aha. Well, the problem is our rule states that if the answer to this question is anything other than all lights pass, then this is supposed to show up. And blank is technically something other than all lights pass. So you'll see if I check off all lights pass, that question goes away. But that's not what I want. What I want is for it to never show up in the first place unless somebody selects one or more of these other things. So we can solve that problem by simply adding one additional condition to our rule. So back on our rule here, we're going to hit add condition and we want to say if the lights question is filled and also we want to make sure that we have all selected. So now it's only going to show that additional question if the answer to the lights question is something other than all lights pass and the lights question is actually filled in. So let's hit preview again and make sure that's working as expected. And here I can see my lights question, But I'm not seeing that additional question about was it repaired or replaced. If I hit all lights passed, I continue to not see that additional question. But if I choose that something was broken, then I do get the additional question about was it repaired or replaced. So that is now working as expected. Okay, then we need to add another rule to reckon with that other field that I'm offering them. So if the question about the lights is equal to other. Then I want to show this text field, which light failed the inspection? And there we go. That covers my butt so I don't have to think of every single possible light that a vehicle has. Now, something important I want to note here. You'll notice that I have pretty much every question on this form marked as required, including the questions that may or may not even come up. So like was the light replaced or repaired on site? I've got that marked required, but the form might not even ask that. So how does that work? A question is only going to be actually required on a form if it's both marked required and shown. So you don't have to worry about some invisible required question preventing somebody from filling their form out. Okay, now finally I've got this just piece of text. It's not even a question, it's just a header. It's just text that says action required. And the purpose of this is just to make this form really easily digestible for whoever is now looking at the form. So a manager like fills it out and then all that the person looking at it probably wants to know in the moment is, hey, do we need to do anything or not? So I'm gonna set this up so that if the answer is yeah, we need to do something, we need to schedule this vehicle to go to a mechanic, or we need to schedule the technician time to go to an auto parts store or, or something like that, then I just want this action required header to show up so that the person digesting the form can just very quickly say action required, yes or no. And when action is required, I'm also going to populate this field notes to dispatcher so that the manager can tell the dispatcher, hey, this is what we need to do. We need to get this scheduled for a maintenance or we need to get this scheduled to go to a mechanic. We need to whatever it is that we need to do. So now I'm going to pick all of the questions that are like, was this thing resolved? And if the answer is no, the issue was not resolved, then we're going to show that action required piece of text as well as the field for the manager to leave the dispatcher some notes about what needs to happen. So that can all be done within one rule. I just need to add multiple conditions here. So was this issue resolved is equal to no? If was this other issue resolved is equal to no. We're just going to go down the full list. Anything that needs action is going to make this show up. Okay, so there's all that. Now, in this situation, I definitely want to choose when any of the conditions are met because I definitely don't want this action required text to only show up if every single one of these is. No, there's some sort of problem. So, no, if there's a problem with any of these, then we're going to do this action. We're going to show the action required text. Now, that rule has a whole ton of conditions, so if I've missed something, it's definitely going to be within that. So we're definitely going to want to do some testing just to make sure that we didn't miss anything. So back at the top of the page here, we've got our handy preview button where we can go and do some testing here. So let's say we checked the fluids and the oil level was a fail. Great. That asked me was the issue resolved on site? Let's say no. And then at the bottom of the form, we should see our action required. And yes, we do. And we would just want to run that test for everything that we're expecting to have that result. Everything that we're expecting to show the action required. Is that a little tedious? Yes, it is. But once it's done, it's done. And you'll have this form forever. It's worth it just to make sure that everything's working exactly as you expect and there's not gonna be any problems out in the face. But for your sake, I'm not going to make you sit here and watch me do all of that testing. But once we are done, everything's tested and we're happy with it, we would hit save and publish. Or if we weren't quite ready for this form to be live, then we could save it as a draft. Okay, now let me show you one more thing, just to help you out with some troubleshooting that you might have to do if you're making a more complex form. So to demonstrate this, I've put a quick little form together. It is the Tom Howard Smells form and it has only two questions. Does Tom Howard smell? And Did Tom Howard have beans today? So we're going to add some logic to this form. So by default, we're going to show the text Tom Howard smells as well as our two questions. But now I'm going to add two rules. The first rule is going to be that if the answer to the question, does Tom Howard smell? Is equal to no, then I'm going to hide the text that says Tom Howard smells. Okay? Now, I'm going to make a second rule that says if the answer to the question is, did Tom Howard have beans today? Is equal to yes, then we're going to show the text Tom Howard smells. Now, what we've done here is created a possibility for the rules to be contradicting each other, because I can say, does Tom Howard smell? Is equal to no. Which means that we should be hiding Tom Howard smells. But then I could answer this question. Did Tom Howard have beans today? Yes. And that means that we're supposed to be showing Tom Howard smells. So does it show it or does it not? Well, rules have hierarchy, so you'll notice that we can actually drag rules around. I can drag rule two up here and make it rule one. So a rule further down on the list takes precedent over rules higher up on the list. So right now, I've got it set. Does Tom Howard smell is equal to no. Then we're going to hide Tom Howard smells. That's rule one rule. Now, rule two is lower on the list, and therefore it's going to take precedent. So did Tom Howard have beans today is equal to yes. Then we are going to show Tom Howard smells, even if this rule is trying to hide Tom Howard smells. So let's just test that out. We're going to hit preview. Does Tom Howard smell? I'm going to say no. That hides the text. But rule number two now dictates that if Tom Howard did have beans today, then Tom Howard smells. So if I choose yes, that's going to show the text, because rule two is taking precedent. Now, let me close out of that and swap these rules around. So I'm just going to drag rule one down here. Boom. Now, that's rule two, and this is rule one. And again, the lower rule takes precedent. So rule two is going to take precedent. So now, if I say that Tom Howard doesn't smell, it's not going to matter if I said he had beans today or not. He. He's still not gonna smell. Let's preview that and check that out. Does Tom Howard smell? No, but he did have beans today, and it still doesn't show the text. Just something to keep in mind if you're making a more complex form where multiple rules can affect a single thing and something's behaving not how you expect. It's probably this. It's probably the hierarchy of rules. Anyways, that's all I got for today. Again, all of the forms with conditional logic that you saw today, excluding this one, excluding the Tom Howard smells one. Those are all going to be available for you in Titan Exchange, as well as some additional conditional logic forms that myself and the team have built out for you that I didn't show off today. To find them, go to your settings and search for Titan Exchange, and you can either search the entire library. All of the conditional logic forms that I'm putting in there should say Conditional logic in the title, or you can look in the specific networks. The forms that I showed today should be in the ServiceTitan Best Practices Network. And if you're a company that does commercial, there's also a separate network for Service Titan commercial best practices. Be sure to hit like if you like this video and found it valuable, be sure to subscribe to Service Titan's YouTube channel. If you haven't done that already, hit that bell icon so that YouTube notifies you. Anytime we upload a new video and leave me a comment down below. Let me know what you think about conditional logic forms and let me know what you think I should make a video on next. Please remember that your engagement through likes, comments and subscriber numbers are the ways in which my success is measured. Appreciate it. Peace. Sam.
More from Bill

Capturing the 80%: How SmartAC’s Gen-2 Targets Non-Membership Homeowners | Podcast Ep. 296

Build better customer data with every booking in ServiceTitan | TAD Tune-Up Series

The Biggest Change for Roofers Coming From Other Roofing Software to #ServiceTitan?







