Sure, you find many diagrams on the entity model of force.com with a quick Google! But not so for SFCC. That is why I started to create my own, and share them with you!
This is the second one on the list: Product and Catalog!
Why did I make these ERDs?
When I started working with Salesforce B2C Commerce Cloud, it took work to wrap my head around the object model. Sure, you generally know what objects exist – but how do you translate that when writing code?
By making this Catalog ERD publicly available, I hope to help junior and senior developers by making a ‘cheat sheet’ of the landscape readily available. And honestly, it was good practice to build it.
One caveat, though: these diagrams can get out of date – and I will do my best to spend some time on these every once and a while to keep them up-to-date. But you do not need to rely on me for that! If you didn’t notice the link below the image, click on it now!
Some additional explanation
It is no secret that Salesforce B2C Commerce Cloud offers a very flexible product model, supporting things like:
- Standard products
- Base products
- Variation Groups
- Product Sets
- Product Bundles
- Product Links
- Product Options
- Recommendations (Explicit / Manual, this is not related to Einstein)
But having all these options available to configure … means that there are also a lot of APIs available for developers.
I tried my best to visualise all of these options on the Product and Catalog ERD, and you probably noticed I had to create a “big” Product block to make it happen 😅.
Luckily for us developers (and architects), Salesforce has provided some “helper model classes” to make life much easier. They tie all the complicated knots so we can focus on other things.
I have taken the liberty to include the provided “helper” functions in the model that help you during development, and I made it clear which ones they were by making them broken lines in the diagram.
These functions quickly fetch another entity further away in the tree. An excellent example of this is the “primaryCategory.” If you look at the ERD, you would typically have to fetch the Category Assignments and traverse them to look for the primary one.
Thankfully, we do not have to do this!
Some "functions" missing
I have tried to include as many functions as possible within this diagram. But with the complexity of the product model, it takes work to balance layout and readability.
I have decided only to include the most “important” ones (but not to worry, 95% of what exists is in this diagram).
Pricebook and Inventory are also included?
Yes, the model of these entities is quite simple. Compared to the product entity, these are peanuts! So I decided to include them in the product and catalog ERD.
You will find references to them in other ERDs on the blog.
More to follow?
There are still quite a few entities within Salesforce B2C Commerce Cloud, each in charge of an essential role within the entire flow.
Next up is content, so keep an eye out for this blog!
Don’t you love being human? We get to make mistakes and call it part of the experience. Please don’t be shy if you spot something that needs fixing in this Product and Catalog ERD. Let me know!