SlideShare a Scribd company logo
1 of 19
MongoDB Schema Design Concepts
for a Social CRM System
Ashwin Mangale
CTO, Vector Brook
ashwin.mangale@vectorbrook.com
Presented at MongoDB Pune, Oct. 21, 2012
Talk Outline
● MongoDB Schema Basics Recap
● Topaz Social CRM Overview
● Data Model Overview
● Interactions
● Service Cases
● Forums
● Content Marketing Pages
● Conclusions
MongoDB Schema Basics Recap
● Document: JSON object (1 or more name:value
pairs)
● Name is a string, value can be of foll types
(dependent on driver/language): String,
Symbol, Integer, Float, Boolean, Date, Array,
ObjectId, Document
● A collection consists of one or more documents
● Loosely: Document ~ row and collection ~
table in a relational system
MongoDB Schema Basics (Contd.)
● Relational algebra defines concept of a join
● No concept of join with documents and collections
● Relations between collections come down to a decision between
link vs embed
● Embedding allows atomic updates of outer and embedded entity
● 1-many relations
● Array
● Embedded document
● Links between collections
● Many-many relations
● Links between collections
Topaz Social CRM Overview
● Open Source
● https://github.com/vectorbrook/TopazSocial
● GNU Affero General Public License (AGPL)
● Technology Stack
● Ruby/Rails 3.2
● MongoDB
● Twitter Bootstrap
● Philosophy
● Simplicity: Keep code simple and gem dependencies to
minimal
● Lightweight: Focus on common use cases
Topaz Social CRM Overview
(Contd.)
● CRM Evolution
● From systems of record to systems of engagement
● Earlier, focus of the CRM system was on storing data about
customers, service cases, leads, opportunities
● With the growth of social media, focus is shifting to capturing
information about customer engagement
● Concept of Interaction
● Captures each interaction with a prospect/customer
● Focus of the system is on the interactions
● Interactions happen within the context of well-known CRM entities
● Allows for a better understanding of customer needs, leading to a
overall better customer experience
Topaz Social Data Model Overview
Topaz Social Data Model Overview
(Contd.)
● Customer details: cust_accounts, cust_sites,
cust_contacts
● User details: users (with roles)
● Customer engagement details: interactions
● Service cases: service_cases, service_case_logs
● Forums: forum_categories, forums, forum_topics
● Content marketing: cm_page_categories, cm_pages
Interactions
● Interactions are central to the system
● Each interaction/engagement with the customer/prospect
is recorded within the appropriate context
● Interactions are stored in a separate collection, and are
linked from the contextual entity (eg. forum_topics and
service_cases)
● Decision to store interactions in their own collection,
versus embedding in the contextual entity: primarily to
allow for queries to be run directly on interactions, and not
have to always access through the contextual entity
Service Cases
● service_case is used to store information about
customer problems/questions etc.
● Interactions with the customer are linked to the
service_case entity
● service_case_log entity stores updates made by
employees as they work on the case and are not
visible to the customer
● The service_case_logs entity is embedded in the
service_cases entity, since the logs are always
accessed from the service_case, and never directly.
Service Case - JSON
● { "_id" : ObjectId("5082dc72def2c908fa000060"),
"name" : "Prod1 not working",
"assigned_to" : ObjectId("5082d88cdef2c908f6000001"),
"service_case_logs" :
[ { "_id" : ObjectId("5082dcc6def2c908fa00008c"),
"user_id" : ObjectId("5082d88cdef2c908f6000001"),
"log_text" : "Gave update to cust" } ],
"customer_account_id" : ObjectId("5082d94ddef2c908fa000008"),
"priority" : 1,
"created_by" : ObjectId("5082d88cdef2c908f6000001"),
"solution" : "",
"description" : "Prod1 not working",
"status" : "Open"
}
Service Case Interaction JSON
● { "_id" :
ObjectId("5082dcb8def2c908fa000081"),
"context_id" :
ObjectId("5082dc72def2c908fa000060"),
"context" : "ServiceCase",
"body" : "Cust wants status update",
"user_id" :
ObjectId("5082d88cdef2c908f6000001")
}
Forums
● forum_categories and forums are each stored
as separate collections, with appropriate links
● forum_topics are embedded within forums
● Interaction entity used to store the actual posts
in the forums by users
● Each interaction is within the context of a
forum_topic, and is linked to the topic
Forum JSON
● { "_id" : ObjectId("5082fd6ddef2c90fe9000008"),
"name" : "Product Issues",
"description" : "Product Issues",
"forum_category_id" : ObjectId("5082da0ddef2c908fa000027"),
“forum_topics”: [{ "_id" : ObjectId("5082fd8cdef2c90fe9000012"),
"title" : "Product display not clear",
"user_id": ObjectId("5082d88cdef2c908f6000001"),
},
{ "_id" : ObjectId("5082dd08def2c908fa0000a1"),
"title" : "Product does not work",
"user_id": ObjectId("5082d88cdef2c908f6000001"),
} ]
}
Forum Post (Interaction) JSON
● { "_id" : ObjectId("5082fdb3def2c90fe900001e"),
"parent_context_id" :
ObjectId("5082fd6ddef2c90fe9000008"),
"parent_context" : "Forum",
"context_id" : ObjectId("5082fd8cdef2c90fe9000012"),
"context" : "ForumTopic",
"user_id" : ObjectId("5082d88cdef2c908f6000001")
}
Content Marketing Pages
● To facilitate inbound marketing, the system allows creation of
content marketing pages
● The cm_pages are organized within cm_page_categories,
each of which are separate collections
● cm_page_categories can be nested (tree)
● Links between cm_pages and cm_page_categories can be
established
● Possible to change category names, and category hierarchy
efficiently, without impacting the cm_pages
● Interactions can be created in the context of a cm_page
Customer Details
● cust_accounts
● cust_sites
● cust_contacts
● Decision to embed cust_sites and
cust_contacts within the cust_account
document
Customer Account JSON
●
{ "_id" : ObjectId("5082d94ddef2c908fa000008"),
"name" : "Fantastico Corp",
"customer_sites" : [{"_id" : ObjectId("5082d94ddef2c908fa000009"),
"name" : "HQ",
"description" : "Worldwide HQ",
"address_line1" : "100 Broadway",
"state" : "New York"
"city" : "New York",
"country" : "United States",
"zipcode" : "10001",
[ { "customer_contacts" :
[ { "_id" : ObjectId("5082d94ddef2c908fa00000a"),
"email_addr" : "jim@fantastico.com",
},
{ "_id" : ObjectId("5082d963def2c908fa000012"),
"email_addr" : "phil@fantastico.com",
} ],
} ]
} ]
}
Summary
● We describe how a MongoDB based document
is used to design and implement a Social CRM
system
● Capturing customer interactions efficiently is
central to the design of Social CRM systems
● The interactions happen within the context of
other CRM entities such as service cases,
forums, and content marketing pages
● Access patterns are the key drivers to design
decisions of whether to embed or link

More Related Content

Similar to MongoDB Topazsocial CRM

Creating a Single View Part 1: Overview and Data Analysis
Creating a Single View Part 1: Overview and Data AnalysisCreating a Single View Part 1: Overview and Data Analysis
Creating a Single View Part 1: Overview and Data AnalysisMongoDB
 
Library management system project
Library management system projectLibrary management system project
Library management system projectAJAY KUMAR
 
Company Visitor Management System Report.docx
Company Visitor Management System Report.docxCompany Visitor Management System Report.docx
Company Visitor Management System Report.docxfantabulous2024
 
Superautomatic! Data Feeds, Bricks, and Blocks, with Server-side Transformat...
	Superautomatic! Data Feeds, Bricks, and Blocks, with Server-side Transformat...	Superautomatic! Data Feeds, Bricks, and Blocks, with Server-side Transformat...
Superautomatic! Data Feeds, Bricks, and Blocks, with Server-side Transformat...hannonhill
 
moma-django overview --> Django + MongoDB: building a custom ORM layer
moma-django overview --> Django + MongoDB: building a custom ORM layermoma-django overview --> Django + MongoDB: building a custom ORM layer
moma-django overview --> Django + MongoDB: building a custom ORM layerGadi Oren
 
MongoDB@sfr.fr
MongoDB@sfr.frMongoDB@sfr.fr
MongoDB@sfr.frbeboutou
 
Creating a Single View: Overview and Analysis
Creating a Single View: Overview and AnalysisCreating a Single View: Overview and Analysis
Creating a Single View: Overview and AnalysisMongoDB
 
TSPUG: Content Management in SharePoint 2010
TSPUG: Content Management in SharePoint 2010TSPUG: Content Management in SharePoint 2010
TSPUG: Content Management in SharePoint 2010Eli Robillard
 
one|content : joomla on steroids
one|content : joomla on steroidsone|content : joomla on steroids
one|content : joomla on steroidsPaul Delbar
 
Canadian Experts Discuss Modern Data Stacks and Cloud Computing for 5 Years o...
Canadian Experts Discuss Modern Data Stacks and Cloud Computing for 5 Years o...Canadian Experts Discuss Modern Data Stacks and Cloud Computing for 5 Years o...
Canadian Experts Discuss Modern Data Stacks and Cloud Computing for 5 Years o...Daniel Zivkovic
 
Rapid web application development using django - Part (1)
Rapid web application development using django - Part (1)Rapid web application development using django - Part (1)
Rapid web application development using django - Part (1)Nishant Soni
 
The Art and Science of Requirements Gathering
The Art and Science of Requirements GatheringThe Art and Science of Requirements Gathering
The Art and Science of Requirements GatheringVanessa Turke
 
Enhancing Relevancy & User Experience with #SharePoint Search sps-philly 2015
Enhancing Relevancy & User Experience with #SharePoint Search   sps-philly 2015Enhancing Relevancy & User Experience with #SharePoint Search   sps-philly 2015
Enhancing Relevancy & User Experience with #SharePoint Search sps-philly 2015Gina Montgomery, V-TSP
 
CenitHub: Introduction
CenitHub: Introduction CenitHub: Introduction
CenitHub: Introduction Miguel Sancho
 
What is struts_en
What is struts_enWhat is struts_en
What is struts_entechbed
 
Harmony new release 3.0: Relationship Kernel, Google, Webydo, Web forms, Mult...
Harmony new release 3.0: Relationship Kernel, Google, Webydo, Web forms, Mult...Harmony new release 3.0: Relationship Kernel, Google, Webydo, Web forms, Mult...
Harmony new release 3.0: Relationship Kernel, Google, Webydo, Web forms, Mult...112Motion
 
From class to architecture
From class to architectureFrom class to architecture
From class to architectureMarcin Hawraniak
 
Build Business Web Applications with PHPOpenbiz Framework and Cubi Platform
Build Business Web Applications with PHPOpenbiz Framework and Cubi PlatformBuild Business Web Applications with PHPOpenbiz Framework and Cubi Platform
Build Business Web Applications with PHPOpenbiz Framework and Cubi PlatformAgus Suhartono
 
Applications of SOA and Web Services in Grid Computing
Applications of SOA and Web Services in Grid ComputingApplications of SOA and Web Services in Grid Computing
Applications of SOA and Web Services in Grid Computingyht4ever
 

Similar to MongoDB Topazsocial CRM (20)

Creating a Single View Part 1: Overview and Data Analysis
Creating a Single View Part 1: Overview and Data AnalysisCreating a Single View Part 1: Overview and Data Analysis
Creating a Single View Part 1: Overview and Data Analysis
 
Library management system project
Library management system projectLibrary management system project
Library management system project
 
Company Visitor Management System Report.docx
Company Visitor Management System Report.docxCompany Visitor Management System Report.docx
Company Visitor Management System Report.docx
 
Superautomatic! Data Feeds, Bricks, and Blocks, with Server-side Transformat...
	Superautomatic! Data Feeds, Bricks, and Blocks, with Server-side Transformat...	Superautomatic! Data Feeds, Bricks, and Blocks, with Server-side Transformat...
Superautomatic! Data Feeds, Bricks, and Blocks, with Server-side Transformat...
 
moma-django overview --> Django + MongoDB: building a custom ORM layer
moma-django overview --> Django + MongoDB: building a custom ORM layermoma-django overview --> Django + MongoDB: building a custom ORM layer
moma-django overview --> Django + MongoDB: building a custom ORM layer
 
MongoDB@sfr.fr
MongoDB@sfr.frMongoDB@sfr.fr
MongoDB@sfr.fr
 
Creating a Single View: Overview and Analysis
Creating a Single View: Overview and AnalysisCreating a Single View: Overview and Analysis
Creating a Single View: Overview and Analysis
 
TSPUG: Content Management in SharePoint 2010
TSPUG: Content Management in SharePoint 2010TSPUG: Content Management in SharePoint 2010
TSPUG: Content Management in SharePoint 2010
 
Dom
DomDom
Dom
 
one|content : joomla on steroids
one|content : joomla on steroidsone|content : joomla on steroids
one|content : joomla on steroids
 
Canadian Experts Discuss Modern Data Stacks and Cloud Computing for 5 Years o...
Canadian Experts Discuss Modern Data Stacks and Cloud Computing for 5 Years o...Canadian Experts Discuss Modern Data Stacks and Cloud Computing for 5 Years o...
Canadian Experts Discuss Modern Data Stacks and Cloud Computing for 5 Years o...
 
Rapid web application development using django - Part (1)
Rapid web application development using django - Part (1)Rapid web application development using django - Part (1)
Rapid web application development using django - Part (1)
 
The Art and Science of Requirements Gathering
The Art and Science of Requirements GatheringThe Art and Science of Requirements Gathering
The Art and Science of Requirements Gathering
 
Enhancing Relevancy & User Experience with #SharePoint Search sps-philly 2015
Enhancing Relevancy & User Experience with #SharePoint Search   sps-philly 2015Enhancing Relevancy & User Experience with #SharePoint Search   sps-philly 2015
Enhancing Relevancy & User Experience with #SharePoint Search sps-philly 2015
 
CenitHub: Introduction
CenitHub: Introduction CenitHub: Introduction
CenitHub: Introduction
 
What is struts_en
What is struts_enWhat is struts_en
What is struts_en
 
Harmony new release 3.0: Relationship Kernel, Google, Webydo, Web forms, Mult...
Harmony new release 3.0: Relationship Kernel, Google, Webydo, Web forms, Mult...Harmony new release 3.0: Relationship Kernel, Google, Webydo, Web forms, Mult...
Harmony new release 3.0: Relationship Kernel, Google, Webydo, Web forms, Mult...
 
From class to architecture
From class to architectureFrom class to architecture
From class to architecture
 
Build Business Web Applications with PHPOpenbiz Framework and Cubi Platform
Build Business Web Applications with PHPOpenbiz Framework and Cubi PlatformBuild Business Web Applications with PHPOpenbiz Framework and Cubi Platform
Build Business Web Applications with PHPOpenbiz Framework and Cubi Platform
 
Applications of SOA and Web Services in Grid Computing
Applications of SOA and Web Services in Grid ComputingApplications of SOA and Web Services in Grid Computing
Applications of SOA and Web Services in Grid Computing
 

Recently uploaded

FWD Group - Insurer Innovation Award 2024
FWD Group - Insurer Innovation Award 2024FWD Group - Insurer Innovation Award 2024
FWD Group - Insurer Innovation Award 2024The Digital Insurer
 
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...apidays
 
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Drew Madelung
 
Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024The Digital Insurer
 
Manulife - Insurer Transformation Award 2024
Manulife - Insurer Transformation Award 2024Manulife - Insurer Transformation Award 2024
Manulife - Insurer Transformation Award 2024The Digital Insurer
 
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...Jeffrey Haguewood
 
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWEREMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWERMadyBayot
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerThousandEyes
 
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, AdobeApidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobeapidays
 
ICT role in 21st century education and its challenges
ICT role in 21st century education and its challengesICT role in 21st century education and its challenges
ICT role in 21st century education and its challengesrafiqahmad00786416
 
"I see eyes in my soup": How Delivery Hero implemented the safety system for ...
"I see eyes in my soup": How Delivery Hero implemented the safety system for ..."I see eyes in my soup": How Delivery Hero implemented the safety system for ...
"I see eyes in my soup": How Delivery Hero implemented the safety system for ...Zilliz
 
Real Time Object Detection Using Open CV
Real Time Object Detection Using Open CVReal Time Object Detection Using Open CV
Real Time Object Detection Using Open CVKhem
 
Apidays Singapore 2024 - Scalable LLM APIs for AI and Generative AI Applicati...
Apidays Singapore 2024 - Scalable LLM APIs for AI and Generative AI Applicati...Apidays Singapore 2024 - Scalable LLM APIs for AI and Generative AI Applicati...
Apidays Singapore 2024 - Scalable LLM APIs for AI and Generative AI Applicati...apidays
 
Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...apidays
 
Ransomware_Q4_2023. The report. [EN].pdf
Ransomware_Q4_2023. The report. [EN].pdfRansomware_Q4_2023. The report. [EN].pdf
Ransomware_Q4_2023. The report. [EN].pdfOverkill Security
 
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FMESafe Software
 
Artificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : UncertaintyArtificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : UncertaintyKhushali Kathiriya
 
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot TakeoffStrategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoffsammart93
 
AWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of TerraformAWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of TerraformAndrey Devyatkin
 
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law DevelopmentsTrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law DevelopmentsTrustArc
 

Recently uploaded (20)

FWD Group - Insurer Innovation Award 2024
FWD Group - Insurer Innovation Award 2024FWD Group - Insurer Innovation Award 2024
FWD Group - Insurer Innovation Award 2024
 
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
 
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
 
Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024
 
Manulife - Insurer Transformation Award 2024
Manulife - Insurer Transformation Award 2024Manulife - Insurer Transformation Award 2024
Manulife - Insurer Transformation Award 2024
 
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
 
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWEREMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected Worker
 
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, AdobeApidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
 
ICT role in 21st century education and its challenges
ICT role in 21st century education and its challengesICT role in 21st century education and its challenges
ICT role in 21st century education and its challenges
 
"I see eyes in my soup": How Delivery Hero implemented the safety system for ...
"I see eyes in my soup": How Delivery Hero implemented the safety system for ..."I see eyes in my soup": How Delivery Hero implemented the safety system for ...
"I see eyes in my soup": How Delivery Hero implemented the safety system for ...
 
Real Time Object Detection Using Open CV
Real Time Object Detection Using Open CVReal Time Object Detection Using Open CV
Real Time Object Detection Using Open CV
 
Apidays Singapore 2024 - Scalable LLM APIs for AI and Generative AI Applicati...
Apidays Singapore 2024 - Scalable LLM APIs for AI and Generative AI Applicati...Apidays Singapore 2024 - Scalable LLM APIs for AI and Generative AI Applicati...
Apidays Singapore 2024 - Scalable LLM APIs for AI and Generative AI Applicati...
 
Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...
 
Ransomware_Q4_2023. The report. [EN].pdf
Ransomware_Q4_2023. The report. [EN].pdfRansomware_Q4_2023. The report. [EN].pdf
Ransomware_Q4_2023. The report. [EN].pdf
 
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
 
Artificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : UncertaintyArtificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : Uncertainty
 
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot TakeoffStrategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
 
AWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of TerraformAWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of Terraform
 
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law DevelopmentsTrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
 

MongoDB Topazsocial CRM

  • 1. MongoDB Schema Design Concepts for a Social CRM System Ashwin Mangale CTO, Vector Brook ashwin.mangale@vectorbrook.com Presented at MongoDB Pune, Oct. 21, 2012
  • 2. Talk Outline ● MongoDB Schema Basics Recap ● Topaz Social CRM Overview ● Data Model Overview ● Interactions ● Service Cases ● Forums ● Content Marketing Pages ● Conclusions
  • 3. MongoDB Schema Basics Recap ● Document: JSON object (1 or more name:value pairs) ● Name is a string, value can be of foll types (dependent on driver/language): String, Symbol, Integer, Float, Boolean, Date, Array, ObjectId, Document ● A collection consists of one or more documents ● Loosely: Document ~ row and collection ~ table in a relational system
  • 4. MongoDB Schema Basics (Contd.) ● Relational algebra defines concept of a join ● No concept of join with documents and collections ● Relations between collections come down to a decision between link vs embed ● Embedding allows atomic updates of outer and embedded entity ● 1-many relations ● Array ● Embedded document ● Links between collections ● Many-many relations ● Links between collections
  • 5. Topaz Social CRM Overview ● Open Source ● https://github.com/vectorbrook/TopazSocial ● GNU Affero General Public License (AGPL) ● Technology Stack ● Ruby/Rails 3.2 ● MongoDB ● Twitter Bootstrap ● Philosophy ● Simplicity: Keep code simple and gem dependencies to minimal ● Lightweight: Focus on common use cases
  • 6. Topaz Social CRM Overview (Contd.) ● CRM Evolution ● From systems of record to systems of engagement ● Earlier, focus of the CRM system was on storing data about customers, service cases, leads, opportunities ● With the growth of social media, focus is shifting to capturing information about customer engagement ● Concept of Interaction ● Captures each interaction with a prospect/customer ● Focus of the system is on the interactions ● Interactions happen within the context of well-known CRM entities ● Allows for a better understanding of customer needs, leading to a overall better customer experience
  • 7. Topaz Social Data Model Overview
  • 8. Topaz Social Data Model Overview (Contd.) ● Customer details: cust_accounts, cust_sites, cust_contacts ● User details: users (with roles) ● Customer engagement details: interactions ● Service cases: service_cases, service_case_logs ● Forums: forum_categories, forums, forum_topics ● Content marketing: cm_page_categories, cm_pages
  • 9. Interactions ● Interactions are central to the system ● Each interaction/engagement with the customer/prospect is recorded within the appropriate context ● Interactions are stored in a separate collection, and are linked from the contextual entity (eg. forum_topics and service_cases) ● Decision to store interactions in their own collection, versus embedding in the contextual entity: primarily to allow for queries to be run directly on interactions, and not have to always access through the contextual entity
  • 10. Service Cases ● service_case is used to store information about customer problems/questions etc. ● Interactions with the customer are linked to the service_case entity ● service_case_log entity stores updates made by employees as they work on the case and are not visible to the customer ● The service_case_logs entity is embedded in the service_cases entity, since the logs are always accessed from the service_case, and never directly.
  • 11. Service Case - JSON ● { "_id" : ObjectId("5082dc72def2c908fa000060"), "name" : "Prod1 not working", "assigned_to" : ObjectId("5082d88cdef2c908f6000001"), "service_case_logs" : [ { "_id" : ObjectId("5082dcc6def2c908fa00008c"), "user_id" : ObjectId("5082d88cdef2c908f6000001"), "log_text" : "Gave update to cust" } ], "customer_account_id" : ObjectId("5082d94ddef2c908fa000008"), "priority" : 1, "created_by" : ObjectId("5082d88cdef2c908f6000001"), "solution" : "", "description" : "Prod1 not working", "status" : "Open" }
  • 12. Service Case Interaction JSON ● { "_id" : ObjectId("5082dcb8def2c908fa000081"), "context_id" : ObjectId("5082dc72def2c908fa000060"), "context" : "ServiceCase", "body" : "Cust wants status update", "user_id" : ObjectId("5082d88cdef2c908f6000001") }
  • 13. Forums ● forum_categories and forums are each stored as separate collections, with appropriate links ● forum_topics are embedded within forums ● Interaction entity used to store the actual posts in the forums by users ● Each interaction is within the context of a forum_topic, and is linked to the topic
  • 14. Forum JSON ● { "_id" : ObjectId("5082fd6ddef2c90fe9000008"), "name" : "Product Issues", "description" : "Product Issues", "forum_category_id" : ObjectId("5082da0ddef2c908fa000027"), “forum_topics”: [{ "_id" : ObjectId("5082fd8cdef2c90fe9000012"), "title" : "Product display not clear", "user_id": ObjectId("5082d88cdef2c908f6000001"), }, { "_id" : ObjectId("5082dd08def2c908fa0000a1"), "title" : "Product does not work", "user_id": ObjectId("5082d88cdef2c908f6000001"), } ] }
  • 15. Forum Post (Interaction) JSON ● { "_id" : ObjectId("5082fdb3def2c90fe900001e"), "parent_context_id" : ObjectId("5082fd6ddef2c90fe9000008"), "parent_context" : "Forum", "context_id" : ObjectId("5082fd8cdef2c90fe9000012"), "context" : "ForumTopic", "user_id" : ObjectId("5082d88cdef2c908f6000001") }
  • 16. Content Marketing Pages ● To facilitate inbound marketing, the system allows creation of content marketing pages ● The cm_pages are organized within cm_page_categories, each of which are separate collections ● cm_page_categories can be nested (tree) ● Links between cm_pages and cm_page_categories can be established ● Possible to change category names, and category hierarchy efficiently, without impacting the cm_pages ● Interactions can be created in the context of a cm_page
  • 17. Customer Details ● cust_accounts ● cust_sites ● cust_contacts ● Decision to embed cust_sites and cust_contacts within the cust_account document
  • 18. Customer Account JSON ● { "_id" : ObjectId("5082d94ddef2c908fa000008"), "name" : "Fantastico Corp", "customer_sites" : [{"_id" : ObjectId("5082d94ddef2c908fa000009"), "name" : "HQ", "description" : "Worldwide HQ", "address_line1" : "100 Broadway", "state" : "New York" "city" : "New York", "country" : "United States", "zipcode" : "10001", [ { "customer_contacts" : [ { "_id" : ObjectId("5082d94ddef2c908fa00000a"), "email_addr" : "jim@fantastico.com", }, { "_id" : ObjectId("5082d963def2c908fa000012"), "email_addr" : "phil@fantastico.com", } ], } ] } ] }
  • 19. Summary ● We describe how a MongoDB based document is used to design and implement a Social CRM system ● Capturing customer interactions efficiently is central to the design of Social CRM systems ● The interactions happen within the context of other CRM entities such as service cases, forums, and content marketing pages ● Access patterns are the key drivers to design decisions of whether to embed or link