As a visual thinker, I find it much easier to grasp concepts when they’re laid out in front of me rather than plain reading or trying to imagine how one element connects to another in my head. Being able to view something mapped out makes everything a lot more intuitive (and user-friendly!). I usually do all this visualizing on a sheet of paper and treat it like a whiteboard, drawing lines to illustrate how everything relates to one another and being able to view the concept as a whole afterward.
Imagine being able to map out your Salesforce data model as effortlessly as drawing on a whiteboard – from visualizing relationships, making changes to fields, and even creating new objects. Whether you’re an admin or developer, the Schema Builder helps by transforming your org’s complex data structure into a manageable visual experience! Here’s how you can use it to make data modeling a breeze…
1. Visualize Your Data Model With the Salesforce Schema Builder
The Schema Builder is a comprehensive view of your data model. It shows objects and their fields as well as their relationships all in one place. With this kind of visualization, you see how different objects are interconnected, making it easier to decide whether you actually need that new custom object in mind or if you have an existing one that you can tweak to meet your requirements. It gives admins the whole picture of their org’s data structure.
Having an image to visualize your org’s data model makes troubleshooting issues or dealing with pain points easy as well, as it becomes a breeze to spot missing relationships, identify unused objects, and ensure that your data model still aligns with your business processes.
Here’s how to use it…
From the Setup menu, type “Schema Builder” on a quick search. It should be the only result after the search, so click on it to open.
In the screenshot above, the canvas is empty because there are no objects selected yet. To display objects, scroll through the panel on the left and select the ones you want to view. You can directly type the name of the object you need on the quick find bar, or filter the list a bit more into standard, custom, or system objects. Ticking an object on the list lets it appear on your canvas.
In the following GIF, you’ll see I’ve filtered the list to standard objects and selected “Account” and “Contact”. Once the objects are on your canvas, you can move them around by simple click-and-drag. The “+” and “-” signs on the right side of the canvas can be used to zoom in and out, and the smaller rectangle on the lower right is a holistic view of the canvas. Clicking on parts of it will move your view of the canvas to the specific part that you clicked.
2. Create and Modify Objects and Fields
One of the most powerful (and also my favorite) features of Schema Builder is the ability to create and modify objects and fields directly! Even with just this feature, you can quickly make changes to your data model without needing to navigate through multiple pages in Setup > Object Manager.
Imagine being able to do everything straight from Schema Builder: building or adjusting objects and their fields in real-time, right within easy reach from the visual interface. What’s great about this is seeing the immediate impact of the changes on your data model. This can give you a clearer understanding of how those changes affect related objects.
Here’s how to use it to create and modify objects…
In Schema Builder, click the “Elements” tab from the left-side panel and drag “Object” from the panel to the canvas.
The “Create New Object” window should appear. Fill in all the required fields as you please, then hit “Save”. This adds your new object to the canvas. In this case, I named our new object “Warranty”.
Let’s say I want to add a custom checkbox field to our new object, Warranty. From the same Elements tab on the left panel, drag “Checkbox” onto the Warranty object on your canvas. Fill out the fields and hit “Save”.
You should now see your new field on the Warranty object. Notice that when you right-click the field, it gives more options: to view the field in a new window (which opens a new tab that views the field under Setup > Object Manager), edit field properties (this brings up the same window as when you first created the field from Schema Builder), manage field permissions (brings up field-level security settings for every profile), or delete the field.
3. Manage Relationships Between Objects
Schema Builder not only makes it easy to create and manage objects – you can also manage relationships between these objects. It’s such a breeze to see your org’s lookup and master-detail relationships all in one diagram.
Here’s everything you need to know about using this feature…
Creating a relationship uses the same steps as creating a field. From the Elements tab, drag “Lookup” onto the Warranty object on your canvas. Fill out the fields, including the related object (in this case, it’s Account), and hit “Save”.
Now, let’s try creating a master-detail relationship. The steps should be the same as above, but this time drag “Master-Detail” from the left panel and fill out the fields before saving.
We should now see both the lookup to account and master-detail relationship with contact on the Schema Builder. Here’s where it gets interesting…
Understanding Relationship Lines
In Schema Builder, relationships between objects are represented by connecting lines with unique symbols or styles. Remember to keep these in mind when viewing or identifying relationships.
- Crow’s Feet/Three-Pronged End
- This appears on the child side of a relationship, or in this case, the Warranty object. The crow’s feet indicate a one-to-many relationship, like how one record in the parent object (account or contact in our example) can relate to multiple records in the child object (Warranty).
- Line Styles/Colors
- Notice how the lookup relationship is represented by a bold blue line while the master-detail relationship is represented by a bold red line.
- Bonus: Required Fields
- When viewing an object in the Schema Builder, the red vertical line beside the field’s name indicates that it is a required field.
By looking at the crow’s feet and the line color in Schema Builder, you can easily distinguish the types of relationships and the role of each object in the relationship. This visual representation helps you instantly grasp how data is interconnected in your Salesforce org and what kinds of relationships exist between the objects in focus.
4. Document Your Data Model
As time passes, an org’s data model can get more and more complicated. A well-documented data model is crucial for maintaining a clear understanding of every object and relationship in your Salesforce org, especially as it grows in complexity. You can use Schema Builder as a living document by capturing the current state of your data model, which can be shared with various important people in your business such as stakeholders or team members.
I wish Schema Builder had a built-in feature that allows users to download or export the current view, but currently, it doesn’t and does not seem to be on the roadmap for now. However, the canvas has enough zoom controls, drag-and-drop features, and filters for the user to be able to display what’s needed. Once you’re satisfied with the current view, take a handy screenshot that you can use in reports, project handovers, or internal presentations. You can even use these on documents that are set to be printed out.
5. Troubleshoot Data Model Issues with Schema Builder
Schema Builder can also be a valuable tool for troubleshooting data model issues. If you’re encountering problems with record access, reporting, or automation, Schema Builder can help you quickly identify relationships that have not been configured correctly (could be a master-detail when it’s supposed to just be a lookup!) or missing fields that might be causing the issue.
There aren’t specific steps on how to use Schema Builder for troubleshooting as it varies from org to org and depends on the situation. However, it’s good practice to start with a clean canvas by deselecting all objects, and then tracing the flow of data by selecting only the objects involved in the issue. From here, you can pinpoint the root cause by examining the relationships and fields involved. For example, tracing the flow of data could lead you to view the field-level security settings for a field which wasn’t visible to a specific user.
Best Practices and Considerations When Using Schema Builder
For bigger and more complex orgs that have more objects, loading can take a significantly longer time. Consider using filters and selecting View Options > Hide Relationships to resolve this. This removes the relationship lines, so you’ll only have a view of the selected objects. You can then reselect it and redisplay the relationships when needed and only when you already have the objects to focus on.
When creating a custom field from the Schema Builder, ensure that they have unique names or labels to avoid merge field issues. And as mentioned previously, Schema Builder does not give you the ability to export the schema at this time. You also won’t be able to save the level of zoom you were on once you close Schema Builder.
Clicking “Auto-Layout” will change how your objects are arranged on the canvas, which is pretty nice when you’re lost in a web of objects and need a quick rearrangement! However, this cannot be undone – you would have to manually rearrange the objects again in case you clicked this unintentionally.
Summary
The Schema Builder is a comprehensive visualization tool, and that alone makes it a big help to admins who need a visual representation of their org’s data model. But when you think about it, this tool can be maximized as it’s actually a dynamic user-friendly environment for managing your data model. When you know all its capabilities, you can create a more efficient, well-documented, and error-free Salesforce environment.
So, whether you’re building your org from scratch or optimizing an existing complicated data model, these five ways will help you get the most out of Schema Builder.