Help designing a "Workflow" database similar to Hubspot or Marketo...
This is my first time on this website and it looks very resourceful!
I am looking to create a database design for "Workflows" similar to what marketing automation companies such as Hubspot and Marketo have.
Here is what a Hubspot workflow interface looks like:
For my design I don't need a "Begin this workflow when" action.
The workflows all act pretty much the same, the user starts at step 1 where an action is complete (send an email, update a value etc..) and then the user continues down the flow until the last step. Each step in the workflow may require an action to be completed before the step will trigger, or a delay of x amount of time.
The tables I have in mind right now for the design are:
Workflows - Holds information about each workflow, a name for the workflow, id and date created Workflow Members - Ties a user to a workflow, user_id, workflow_id, date enrolled Steps - Holds information about each step in the workflow, id, type, data (json), workflow_id (FK) Completed Steps - Holds information about who completed what steps, id, step_id, user_id, date completed
Any thoughts on how to improve this, or a better way to approach it is appreciated!