I’ll write about the steps I take as I’m creating my own CRM for SaasRock’s core.
I’m going to use its Entity Builder, and add everything I need on the fly.
The only thing I know about CRM is its goal: managing relationships.
Let’s start by exploring popular CRM solutions to find out the core structure for an actual CRM.
According to Zapier, Pipedrive is one of the best CRM apps. So I went ahead and created an account.
And now let’s see how Freshsales lists deals:
Right from the start, I’m able to conclude that we need 2 models:
Deal statuses should be customizable since companies must have their own sales processes, so I’ll use the SaasRock’s Entity Builder to define their properties.
A Status would determine WHAT’s the next action and WHO is responsible for it, and WHEN it should be done.
What, Who and When sound like a Workflow more than a simple status field, so let’s keep that in mind.
We can use a table for Contacts:
This view looks too plain, it needs a way to filter specific things, such as “Lead” status, so I went ahead and created a Filter mechanism:
And Deals should not have a Table view:
But a Kanban view:
I documented this process with a few tweets:
I could keep the Deal.Status field as a simple text field, but making the status as a workflow status could give us a couple of benefits:
Since I’m building the CRM on top of my Remix SaaS boilerplate, SaasRock, I’ll use the Entity Builder to create Contacts and Deals. As of right now, Workflows have not been implemented:
So let’s build a Workflows engine from scratch as well, we need the following database models:
Starting from the UI, it would look something like this:
Since I want to build CRM entities on top of the Entity Builder, I’ll need to make some changes there first. Currently, there are 3 elements on the Edit Row View:
I need to add:
First things first: Let’s add Tags, Comments, and Tasks.
I grouped Events/Logs and Comments into an Activity section:
I made a demo about this functionality:
I created a Postmark template “comment-notification” so the Row creator can receive emails for every comment. We’ll leave email notification preferences for another time.
Now we want to Create and Update Entity Tags and set them to Rows. Here’s what an empty state would look like:
And here’s the Row Tags route/modal.
Now, I’ll build the RowTask model with user assignment in mind, but right now a simple implementation is fine:
Let’s use the WorkflowState and WorkflowStep models, I’ll leave WorkflowStepAssignee for another post.
When a Row is created, it should be set to the first Workflow State that we created, Draft is the default. When Rows are Drafts, we should have only one action (Submit):
So every row (that has Workflows enabled), will have this "Submit" action:
And when the Submit action is performed, the new state should be Pending, which has 3 possible actions:
And whenever a Row reaches its end, it should not have any more actions, but it should show the final State:
With every workflow action/step performed, there should be an audit trail:
I posted a 10-min video about these features:
SaasRocks’s main goal is to build SaaS applications faster than ever using its Entity Builder, so it would make sense that the CRM is built on top of it.
Watch the end result here:
I know that this is the world’s simplest CRM, but it’s a good start and the Entity Builder got stronger.
Let me know what should I add for the next iteration of the CRM!
If you'd like to see more of what I do, follow me :) or visit my personal blog.