0:02 Hi everybody, welcome back. My name is Angelik Laboy Torres. I'm a Developer Advocate here 0:07 at Retool. And today, we're going to be talking about a very powerful integration that many 0:12 of you might use in your everyday life: Salesforce. So if you're in sales operations, 0:17 revenue ops, or simply manage a sales team, know how important it is to have real-time 0:22 visibility into your pipeline. So for that reason, we're going to be showing you how 0:26 to connect Salesforce to Retool, and then also how to build a lead triage bot with Workflows. 0:33 So let's get started. 0:37 So first thing is first, we want to log in into our Retool space. 0:40 And for that reason, I'm going to start out over here and click on "Resources" in order 0:44 to go where all of our integrations live. Right. 0:48 From there, I'm going to click on "Create new... Resources." 0:51 And then you can see all the different types of connections. This is wherever 0:54 your data is existing, and then you want to pull it into Retool. I'm gonna 0:59 write now "Salesforce," and then from here we're gonna start just filling in 1:05 the information. The name, whatever you want. I'm gonna put "Salesforce 1:09 Production." The description is actually a great space to let your team know what 1:14 this resource is gonna be about. So I'm gonna put "For my team." Under 1:19 "Credentials," you can see the API version. We have 42.0 set as the default. To be 1:24 honest, it works for most use cases, so that's fine. Unless you have one specific, select that one. 1:29 Then you have the ability to check or uncheck the sandbox organization. Ours is going to be that, 1:33 so I'm going to click it. And then for more security, you can require each user to log in 1:39 with their own credentials to use this resource. So let's connect with OAuth. 1:47 I'm gonna click here. 1:47 It's going to redirect me to Salesforce. I'm going to authenticate. I'm going to allow it also. 1:52 It tells you what you're going to give permission to, and then it has connected. I had 1:57 already logged in into my Salesforce, otherwise it will go through that process and do that. 2:02 Okay, awesome. Then in the "Advanced options," you have the capability of using a custom connected app, 2:09 or if you want to customize the OAuth URLs, as well as overriding the default, which is 2:14 for us in the West Coast. I'm going to use this one—this is going to be blurred for you guys— 2:20 and then I'm going to click over here and save it. Awesome. 2:24 Another thing here that you can see is the different environments 2:27 in which this is being configured to. And then I can view the console to see the connection. 2:35 All good. Reconnect if I need to. 2:38 Amazing. Perfect. 2:39 And then over here, you can see actually which apps are using it, which workflows, which queries, 2:44 which is amazing because you only need to set up this resource once. 2:51 So let's go ahead and build our workflow. Okay, we'll click on "Workflows" in the navigation bar. 2:55 And then from there, you can see all of your organization's workflows. 2:58 However, if this is your first time interacting with Workflows, make sure to check out the 3:02 "Getting Started" video because we give you more of a walkthrough and even run a simple workflow. 3:07 So I'll link it over here for you to check out. If not, then follow along. 3:11 We're going to do "Create new... Workflow." And I'm going to delete this block of code. 3:15 It's not important for now. Delete it over here. Okay. 3:20 So what are we gonna be building? Well, in this case, this workflow will run on a scheduled interval. 3:25 You can do it over here, the "Edit trigger." You can do webhooks or even connect it to an app 3:31 and then from there have the users just manually set the workflow running. 3:36 But for me, I'll do "Scheduled." I will set up how the scheduling will work later. 3:40 This is to enable it for now, right? And the important thing here is that it would check 3:44 for Salesforce leads that need high attention. This would be anything that is categorized as "New," 3:48 and "New" would be determined by: hasn't been opened in the last 48 hours, right? 3:56 And it has high potential value, let's say $20,000 that are there in the table. 4:01 What we're gonna do is that once it finds that lead, it's actually gonna go into Slack 4:06 and message the sales team in order to make sure that no high-potential customer 4:12 or opportunity falls within the cracks. So let's build that. Okay. 4:17 "Start Trigger." I'm going to pull it out, a "Resource query." From there, I'm going to do the "Salesforce Production," 4:25 and the SOQL is fine with me. There's CRUD actions, bulk load, and everything. 4:28 And I actually have written out the filters that I'm going to be calling out, or the identifiers. 4:35 ID, Name, Status, OwnerID, Phone, Email, Potential Value—which is really important— 4:40 is pulling it from the Lead table that we have where Status is either "New" or "Open." 4:45 Okay, so I'm gonna name this "newLeads." See? Perfect. 4:53 And I'm gonna pull out a Filter. Actually, before that, let me run this, make sure that it works. 4:58 Okay, we have two. Perfect. I see all the numbers. Amazing. 5:04 So now we're gonna do a filter. We're gonna filter out by the potential value. 5:09 So how are we gonna do that? We're gonna do `value.Potential_Value__c` 5:14 greater than 20,000 dollars. "highValue," I'm gonna name this. So, boom. 5:28 Hobart. Hobart Bosco. And then we're gonna filter another one. We're gonna do "in the last 48 hours," right? 5:36 I've written this one out. Here you go. Boom. Let's run this out. Hobart is still on the list. 5:47 Okay. 48 hours. Let's do that. "hours." Good. Perfect. 6:02 It's gonna be "Parallel," and we're gonna do a "Loop runner." 6:06 And for that, I need to do a Slack connection. So how do we do that? Okay, "Add a new Slack connection," 6:17 "Connect the account," and I'm gonna call this "Slack Retool." And I'm gonna do "Connect with OAuth." 6:24 Over here. Authenticate. Allow. Perfect. Amazing. So what I needed to do was, after 6:35 I created it, I searched it back again and then `slack_retool` is the name that I went with. 6:39 What are we gonna do? We're gonna do a post. So `post.chat.postMessage`. 6:45 And how are we gonna do that? Well, I have created a channel. This channel is actually—I'm gonna 6:51 name it as a function—and I'm going to do `#lead-angelik-sales`. Perfect. 6:56 And I'm going to do a block. And this is just to have a pretty message show up when we're on Slack. 7:02 So what do we have here? We have the title, the "High-value lead." We also have pulling the name, 7:06 putting the status, putting the potential, the last modified date, the email, the phone, 7:13 and then a couple of actions just to put a button there. Okay. 7:17 I'm actually just gonna run the sequence. Okay, I'm gonna click "Run." 7:27 Seems all good. Let me go into my Slack and see if I got the notification. 7:31 Ah, there you have it. Let me make this a little bit bigger. 7:36 Here we have the information. I tested it out just before. But here you have it. 7:40 And thank you so much for watching. That was it for this video. 7:43 We learned how to connect Salesforce into Retool—a one-two-three connection—where now you can use it with your apps, 7:49 your workflows, and your agents. 7:51 Also anybody in your Retool space can actually have access to this resource 7:55 as well, which is honestly really great. 7:57 If you want a little bit more control, then I would say go to 8:01 role-based permissions in order to manage who has access to certain apps, workflows, agents, resources, etc. 8:08 Now, if you want to try this out, go ahead and go to retool.com and get started for free. 8:14 So I'll see you next time and yeah.