Salesforce Onboarding Email Flow for Closed Won Opportunities: CAS Come and See Video

Onboarding Email Flow for Closed Won Opportunities: CAS Come and See Video

Wouldn’t it be great if actions, like sending an email, could be triggered as soon as you marked a Salesforce opportunity Closed-Won? Join Dave from Cloud Adoption Solutions as he shows you exactly how to do that.

…and while you’re here: if you’re having Salesforce user adoption challenges, we have a brand new guide that takes you step by step through the principles of teaching adults technology, and drives you to develop a plan for implementation. It’s got room for you to make your own plan – check it out: https://cloudadoption.solutions/teach…

Contact us with your Salesforce challenges at info@cloudadoption.solutions – we love to help!

Cloud Adoption Solutions is a 100% woman-owned registered Salesforce partner, specializing in implementation, integration, and optimization for Technology, Healthcare/ Life Sciences, and Financial Services/ Professional Services organizations in the small and mid-commercial sectors.

 

VIDEO TRANSCRIPT:

David Smallhoover 0:10
Hello, everyone, this is David cloud adoption Solutions. Today, I’m going to show you a onboarding email flow to send to closed won opportunities, and that the email will be sent to the primary contact role. Today, we’re going to do a ScreenFlow. And it’s going to be triggered by a button that whenever the button is clicked, the flow will run, and then the button will disappear. So you don’t keep sending the same email over and over again. And let’s dive right into it. Before we jump into building, I want to show the actual functionality of what we’re going to be creating. And so for this opportunity, Ted’s big business, right now, there is no send an email, send the onboarding email option as a quick action. But if we go to closed won, that button will pop up. And so we just closed won this opportunity, let’s send an automatic onboarding email. All right, emails sent. Let’s check our inbox. And there it is. And then as we as it was sent, we refresh the page, and the email option is no longer available. And that’s because the onboard email sent field is now checked. True. And in that flow, you’ll see exactly what I’m talking about. So let’s get to it. And with this flow, the idea came from an actual previous YouTube video by prathima. It’s called Send email to opportunity contact role using an action. And so I use that as the foundation and then added in the the logic in regards to hiding the button and additional new customer fields. So if you will link that to the description, so you could see how they did their flow as well. Okay, we’re gonna start with the ScreenFlow. And to start, we need to make sure that we get all the information that we need in that record. So to start, we’re going to do get the opportunity record information. And then we’re going to get the opportunity contact roll information, which will hold our primary contact information. And then the get contact is the last get that we’re going to do so we can get information like email. So let’s start out with the get. And we’ll call this opportunity, record info will be doing opportunity. And then, for conditions that I’d be of opportunity equals, we’re going to be doing a new resource variable, record, Id make sure it’s typed exactly like that, and a text and available for input. So what this does, since it’s a ScreenFlow, whatever triggers that screen, which for here is going to be a button, this record ID variable is going to take in all that records information. We’ll hit done. And then we only want to store the first record. And with this, I want to choose fields and assign variables, like it’s a little bit cleaner this way, and then we’ll do in separate variables. And to start more to type. Opportunity is going to be a new resource, again, variable type of business. And so what this variable is going to store for us is what type of business This opportunity is. Usually, when you’re sending an onboarding email, you’re not going to want to send it to existing business. And so we’re only going to be sending this email to new customers. We’ll hit done. And then the next field is going to be our custom field onboard email sent. And so this field will come into play whenever we’re trying to hide that button. And so, we will get to this later on. But right now let’s just do a new resource variable on board, email status, text. All right. So that is done there. Next up is going to be the get opportunity. Get opportunity contact rule. Another get

Okay, and then for the object is going to be opportunity contact roll, not not opportunity opportunity contact roll conditions, again, we want to do the ID of opportunity, and the record ID variable, we’ll add another one. And then we want to check if the contact ID, or if the contact is the primary on this opportunity. So true. And since it’s only a little bit information for this object, we’re just going to automatically store all fields and the first record, we’re gonna do another get, we’re gonna get the contact information. Contest.

Okay, and then as for conditions, contact ID, and we want to use what we already stored in the single variable, the opportunity contact roll, and this is going to be the contact ID of that contact rule. So the contact ID of that contact rule is going to bring in all that information for us. Since this is a little more information in regards to what we’re going to be storing, I like to single it out a little bit, we’ll do choose fields and assign variables. And we will do in separate variables. And we all we really want from this contact is the new resource, all we want is the email that we’re going to be sending that or onboarding email to. So primary contact, Email. Text, again, done, and done. And that’s it for our guests. Next up is a couple of decisions. So now that we got all of our information that we need, we need to start branching off and making decisions on when we want this flow to trigger. And so to do that, we’re going to be doing a decision, we’re going to call this is new customer with primary contact. So we’re, we want this flow to be triggered, whenever our opportunity is a brand new customer, and there’s a primary contact on that opportunity. If not, then an air ScreenFlow will pop up. So our first outcome will be no, all conditions are met. From here, we’re going to do the opportunity contact role that stores our is primary. And then if it is no true. And then our next condition will be the type of business we went back to. So we don’t want it to equal new customer. And I’m getting that information from me opportunity picklist we can go to that. So we’re on the opportunity objects, we’re going to check out the type. And these values here. So that’s why I’m singling out new customer, we want the flow to run only when there’s a new customer. So that’s why it’s does not equal your customer. Okay, now that we got our first decision done, let’s handle the know first, if there isn’t a primary contact, we’re going to want to send a error message. So we’ll let’s just do a screen. We’ll call it error screen. We’ll configure the header real quick. Remove the header. Let’s hide previous and hide pause. And we’re just going to add a simple display text or message. Let’s see what we want to say here. So I think it’s just this email being sent. Make sure there is a primary contact and it is a new customer. It’s good enough, make it a little bigger. Okay. And so the no field is now taking care of let’s go to Yes. And then as far as yes, we actually have to make another decision. This decision has to do with the onboard email sent custom field that we are talking about. So let’s check what the status is. Of onboard emails. All right. It’s true to believe, true. All right, and then we’ll go to our variable onboarding email status equals true. And then our default recall, outcome is false. Alright, so what this is going to check for us is, if it’s true, we don’t want it to send an email. If it’s false, unchecked, that means we do want to send the email. All right, so true, we’re just going to end the flow. And then for false unchecked, that means that email hasn’t been set yet, we are going to do an update. So the reason why we want to do an update is that as soon as it is sent, we need to make sure that that checkbox has been marked true. So it doesn’t, it doesn’t send again, so update onboard email sends fields. That’s five conditions on the opportunity. For opportunity ID equals record ID, again, because of the button in the ScreenFlow, and we want to update the checkbox to true. Done, all right, and then we want to do an action. We’re going to send an email.

Alright, let’s label it send an email to your primary contact. Body, we need to do a new resource. text template will be good for this. Let’s call it email body. What we want to put in the email body. Okay, so hey, and then we can do insert opportunity from contact role. And maybe first name, we have to get the contact ID first. First name, so that’s going to pull the opportunity to contact roll, the contact of that, and its first name, congrats, your decision to partner with us. And we can do anything else. In regards to inserting resources, best regards. Whoever triggered the flow, we can do user first name. And about the user email.

There it is. All right, done. And then subject, welcome aboard. Okay, as far as the email recipient, we want to grab it in the comma separated. So and that’s going to be in our primary contact email resource that we pulled from the contact record, Rich Text formatted, you want to make sure that this is checked true. Because if not, you’ll get a bunch of HTML in your onboarding email. And that looks good for now. Okay, and I know what you’re thinking. So we want to make sure that it’s closed one, and none of these conditions check for that. And so the, how we’re going to check for that is we’re going to filter the button on the page view. So let’s go to the lightning App Builder. Alright, so before we do conditioning on the button, we have to make the button. So on the object manager, I went to opportunity, and buttons and we’ll do new action. For action type, we’re going to do flow, and then opportunity onboarding email. If you don’t see your flow on this dropdown, it’s probably because you didn’t activate the flow. So go back to your flow, and activate it and then refresh this page and it will show up. Let’s call it send onboarding, email, and safe. All right. And so from here, we’re going to go to the opportunity record page in the lightning app builder. So in the record page, we want to click on top bar and So, if you don’t see all these options, you probably just have to enable dynamic actions. We’re gonna scroll down, click Add Action. Let’s look up our action there it is send onboarding email and where we want to add the filter. So our filters are, we want the stage to trigger move this up to the stage to be closed one. And then also, we want to make sure we want to make sure that the onboard email sent is false.

All right, and we’ll click done. So let’s move up. Yeah, all the conditions are true

we’ll click Done. And then we want to move up the send onboarding email so you can see it put it on the very end and then we’ll click Save. Alright, so we’re back at the opportunity for Ted’s big business. This is the last of it the final show and so let’s see if the button shows up here when we go to closed one and there it goes, pops up. We go back disappears

then you can click on Send Email

and that’s it. Thank you very much for taking the time. And if you have any questions, please feel free to reach out!

Don’t miss this event!

The ONLY Conference for Sales, Marketing, RevOps, and Commercial Executives in the Life Sciences Industry.

Follow Us

Related Posts

CAS Communique Newsletter: December 2024

CAS Communique Newsletter: December 2024

When life gets busy it can be challenging to stay in the know, so we’re here to do it for you! Stay up to date on the latest and greatest Salesforce additions right here. See you next month!