When to Use Admin, Triggers, or LWC in Salesforce
Avinash Varikuti
Founder At Jobwise Mentor | Learn Salesforce With Realtime Projects | Crack Your Salesforce Job In Next 60 Days
A customer walks into a store, and the staff instantly knows their preferences, past purchases, and even their favorite products. That’s the kind of experience Salesforce can create.
But to make it happen, we need to decide—should we use Admin tools or dive into development?
In this post, I’ll share a real-life example of how a Knowledge Base Portal in Salesforce used Salesforce to build a Customer Relationship. We’ll see how Admins, Developers, and LWC Developers worked together to make it possible.
By the end, you’ll have a clear idea of how to use Salesforce for your own needs.
Subscribed
Understanding the Tools
Let’s break down some of the key tools Salesforce offers, and how each one can help you achieve your goals.
Admin Features
Admin tools like Flows, Process Builder, and Validation Rules are your go-to for automating processes without writing any code.
These tools are great if you want to set up quick solutions, like automatically assigning leads, sending email alerts, or making sure data is entered correctly.
They’re super user-friendly, so even if you’re not a developer, you can still make a big impact with just a few clicks.
Triggers
Triggers are bits of code that automatically run when something happens in Salesforce—like when a record is created or updated. They’re essential when you need more complex logic that the Admin tools can’t handle.
For example, you can use triggers to update related records, enforce custom rules, or connect Salesforce with other systems.
LWC (Lightning Web Components)
LWC allows developers to build modern, fast, and dynamic interfaces that can really take your user experience to the next level.
They’re reusable, lightweight, and built using web standards, so they’re future-proof. Whether you’re creating a real-time dashboard or an interactive form, LWCs give you full control over the design and performance.
Each of these tools plays a unique role, and together, they help you build scalable, efficient solutions.
Building a Knowledge Base Portal in Salesforce: From Scratch to Completion
Creating a self-service portal for your customers to search knowledge articles, submit cases, and interact with agents is a great way to enhance customer experience and reduce support costs.
In this article, we’ll walk through how to build this Knowledge Base Portal using Salesforce Admin tools, Flows, Apex, Triggers, and Lightning Web Components (LWC), from scratch to finish.
Requirements:
Initial Activities to Set Up the Knowledge Base Portal
When you're ready to build a Knowledge Base Portal in Salesforce, there are a few foundational steps to take before you start implementing features like case submission, assignment, and email notifications.
Let’s break down the initial activities I would recommend to set things up the right way.
1. Define the Requirements Clearly
The first thing we need to do is gather all the requirements. Without a solid understanding of what we want to achieve, we can’t move forward effectively.
In this case, think about the key features your portal should have:
By laying out these questions and discussing them with stakeholders, you ensure everyone is aligned on expectations.
2. Enable Salesforce Knowledge
Next, you’ll need to enable Salesforce Knowledge. This is where all your articles will be stored and linked to cases. To do this:
It’s essential to understand how your articles will be categorized and who will have access to them. These articles will become the backbone of your self-service capabilities later on.
3. Create Case Record Types
For effective case management, especially if you handle multiple types of customer issues (technical, billing, etc.), creating different Case Record Types is important. These record types allow you to customize how each type of case is tracked and managed.
This will help you keep your cases organized and streamline the process for your support team.
4. Set Up Case Fields and Page Layouts
With the record types in place, it's time to focus on the details. You need to configure the Case Object to capture the right information.
The goal here is to make sure the case submission form is simple yet captures all the relevant data needed to provide excellent support.
5. Configure Case Assignment Rules
Once cases start rolling in, you’ll need to assign them to the right agent. This is where Case Assignment Rules come into play. You can define rules based on factors like:
Head over to Setup, find Case Assignment Rules, and start creating rules to automate this process. Testing these rules is crucial to ensure cases go to the right person every time.
6. Create Email Templates
Email notifications are essential for keeping everyone in the loop. As part of the initial setup, create Email Templates for notifications like:
领英推荐
Using Process Builder or Workflow Rules, you can automate these notifications, so customers and agents never miss an update.
7. Set Up Case Status Tracking
One of the most important things for customers is knowing the status of their cases. Configure the Case Status field to include status options like:
You can even use Record Types to manage different workflows for different types of cases. Make sure the status field is included in the case page layout so it’s easily accessible to both agents and customers.
8. Prepare Knowledge Articles
Now comes the fun part: building the knowledge base. Start creating knowledge articles that are relevant to common issues customers face. Organize them into categories based on case types (e.g., technical issues, billing, product inquiries).
Having a robust knowledge base is essential for reducing case volume and enabling customers to solve their problems independently.
Admin Limitations for Knowledge Base Portal in Retail Business
When setting up a Knowledge Base Portal for a retail business using Salesforce Admin tools, here are the key limitations you’ll encounter:
Development Approach for Knowledge Base Portal
Now that we’ve covered the basics, let’s take a deeper dive into how we can use Apex, Triggers, and LWC for two critical scenarios in a Knowledge Base Portal for a retail business: Dynamic Knowledge Article Suggestions and Complex Case Routing.
1. Dynamic Knowledge Article Suggestions with Apex
When customers open a case, they may be looking for immediate solutions. Offering relevant knowledge articles can greatly enhance their experience and reduce case resolution time.
While Admin tools like Flows can associate static articles with cases, they cannot personalize or dynamically suggest articles based on real-time case details or customer history. This is where Apex comes into play.
What We Need:
How We’ll Do It:
We will create an Apex Class to handle the logic of querying knowledge articles. Here's a step-by-step breakdown of what happens:
Benefits:
2. Complex Case Routing with Apex Triggers
In a retail environment, cases can vary widely in complexity. Routing a case based on the customer’s account type, product category, or even urgency can improve case resolution efficiency.
Admin tools, such as Case Assignment Rules, are useful for basic routing but fall short when complex logic is involved, such as handling multiple conditions.
What We Need:
How We’ll Do It:
Create an Apex Trigger on Case Object: The trigger will fire when a new case is created or updated. The logic inside the trigger will evaluate different conditions to determine where the case should be routed.
Example Workflow:
Benefits:
In Salesforce, both Admin tools and Development (Apex, Triggers, and LWC) have their places, depending on the complexity of the task at hand.
Thanks for reading JobWiseMentor! This post is public so feel free to share it.
Final Thoughts:
That’s it for today! ??
Thank you for reading the full post. Since you read this till the end, it’s safe to assume you found value in the content.
Send it to your friends here to sign up, or share it on Linkedin!
Thanks for spending part of your day with Avinash Varikuti