Unravelling the mysteries of ContentDocument in Salesforce

We dive into visualizing Salesforce objects and relationships in 3D using our free app Unravel

Elliott
Appitek
4 min readJul 9, 2020

--

Over the last few weeks we’ve been going through all of our different solutions and showing a step-by-step real life use-case for them so that you can better understand how you could use them to make your Salesforce life easier!

This week we’re looking at Unravel, an interactive 3D Data Modeler For Salesforce, and we’ll be specifically looking at the somewhat mysterious ContentDocument object — better known as your Files!

View object relationships in a whole new dimension — literally!

Getting Started

First off, to start looking at our Salesforce objects, we’ll need to install Unravel - don’t worry though, it’s completely free to use! You can install it for free from the Salesforce AppExchange.

Once installed you will need to give yourself the “Unravel Admin” permission set. Once you have these permissions you’ll be able to see the “Unravel” app, which contains the “Unraveller” tab!

The Unravel app is where you can start exploring your data models

Creating Configurations

Unravel uses a ‘configuration’ to render a data model. All a configuration does is tell Unravel which objects you want to view and which object is the ‘target’ object, from which the whole data model will be built around.

Let’s go to the “Unraveller” tab and click “Create New Configuration” and enter the following details:

Configuration Name: Content Model
Selected Objects: ContentBody, ContentDocument, ContentDocumentLink, ContentFolder, ContentFolderItem, ContentVersion
Select Target: ContentDocument

Then click “Start Unravelling” to see your first 3D data model!

Your first 3D data model!

Interacting with Unravel

Now we have our data model, we can interact with it to help visualize how everything links together. You can use the left mouse to rotate the model, right mouse to pan, and the mouse wheel scroll to zoom in and out.

You can then highlight any object or any ‘link’ to view the details of that object or link. For example if you hover the link between Content Document and Content Document Link we can see that the field linking them is called “ContentDocumentId” and it’s a field from the Content Document Link to the Content Document.

Highlight any object or relationship to learn more

Changing the focus

As we mentioned earlier, the ‘target’ object is used by Unravel to generate the data model around — it’s your focus for the data model.

But don’t worry, you can change this at any time! Simply click on an object from the list on the left-hand side and Unravel will update the data-model to make that object the new focus.

Let’s click on “Content Folder” and see how it changes!

Changing the focus of Unravel is quick and instantaneous

As we can clearly see now, there doesn’t seem to be a link between the Content Folder and the actual Content Document! We should add in a few more objects to find the link — we’ll need to update our configuration!

Updating Configurations

From the bottom left corner we can click ‘Update Configuration’ to change the objects we want to see in this data model.

Let’s add “ContentFolderLink” and “ContentFolderMember”, reset the target to “Content Folder” and then click “Update Configuration” when you’re happy.

Updating configurations instantly

Now we can see that “Content Folder Member” acts as the link between a Content Document and a Content Folder!

Although the whole Salesforce Content system contains a large amount of objects, with Unravel we can break this down and focus on specific objects to make it easier to understand how everything fits together!

Try it for free!

Follow along with this guide and you’ll see how easy it is to be able to visualize and interact with your Salesforce data models in 3D.

Unravel is completely free to install and can be used in Salesforce Classic or Salesforce Lightning with no limits.

Let us know how you get on in the comments below! If you want to learn more about Unravel you can try the following resources:

Documentation:
https://appitek.com/documentation/unravel.html#Introduction

“Introduction to Unravel” Blog
https://appitek.com/blog/unravel-interactive-3d-data-modeler-for-salesforce

At Appitek, our aim is to help make your job easier, by creating simple but effective Salesforce applications that make you more efficient at what you do.

Appitek is a registered Salesforce ISV partner.
Salesforce and Salesforce Lightning are registered trademarks of Salesforce.com

--

--

Elliott
Appitek

Multidisciplinary full stack developer, with a history in product & digital design. CTO at Appitek Ltd.