24 novembre 2014
Groupe SQL
Sujet: Integrate Legacy App with Dynamic CRM
Conférencier: Jean-René Roy
Dynamic CRM is more and more popular in enterprises. Some people say, ‘’It will be the next SharePoint cow for MS’’. But how do you integrate external legacy application in CRM and how to you transfer your legacy database in the CRM Database. This session introduce CRM concept and framework. Show how you can use SSIS to write and read data in CRM database and how you can integrate legacy application with a CRM solution.
2. Who is Jean-Rene Roy?
• Independent Consultant
• SQL Server MVP
• Software Architect and team lead for many enterprises
• Program Lead for OttawaSQL.Net and .NET Ottawa
Community
• Founder of SQLTeach and DevTeach
• SQL Server / CRM Dev / TFS Specialist
• System Architect for TBS, HoC, CCA
3. Agenda
• Introduction to Dynamics CRM
• Data Migration vs Data Integration
• Data Migration & Integration
Strategies
Examples and Challenges
• Pitfalls of developing with Dynamics CRM
4. What is Dynamics CRM?
• Dynamics CRM is a COTS product
• Flexible Client Relationship Management platform
Allows for complex configuration
Provides deep customization framework
• Customizations are limited by the CRM framework
Live by the Framework
Or
Die by the Framework
5. Introduction to the CRM Database
CRM vs T-SQL
• Entity = DB Table
• Entity Fields = Table Fields
• Relationship 1 - N, N- N, N-1 = SQL Server Index
• Bulk Edit = T-SQL Update statement
• Workflow ~ T-SQL Triggers
7. Introduction to the GUID Concept in CRM
• Let’s take a look at CRM Database
• What’s the type of the Primary key in Tables?
• What’s a Dynamic View?
• What is the Lookup Concept? (Advanced Find)
8. Data Migration & Data Integration
Data migration/integration
Very complex (diversity of data, integrity, downtime)
Forgotten about (overlooked, treated as less important)
User adoption is driven by the quality of your data!
9. Data Migration vs Data Integration
Data Migration
• “One and done” activity
• Initial data load
• Moving large volume of data
• Get it right
• Bring in only relevant data
• Cost to fix data issues is high
Data Integration
• On-going replication or
synchronization of data
• Different needs:
• Real Time
• Batch (scheduled based)
• On-demand (messaging/queue)
• Needs to be maintained as the
application evolves
10. Data Migration / Integration Strategies
• CRM Data Import Wizard
• ETL Tools
SSIS + 3rd Party CRM Connector
Scribe
Connectors for MS Dynamics
More…
• Custom Integration Development
Write your own using CRM web services SDK or service reference
• BizTalk / MSMQ (Message queue)
12. ETL Tools
Data Migration/Integration Strategies
• Leverage SQL Server Integration Services (SSIS)
Performance
Scalability
Extensibility
Scheduling capabilities
• Dynamics CRM Platform restrictions:
Allows to read data from database using System View
Create, Update, Delete operations NOT allowed at the database level
Create, Update, Delete must be done via CRM SDK or web service reference
• Solution
Use 3rd party vendor (SSIS Integration Toolkit with CRM Connectors)
Kingsway Software
13. ETL Tools
Data Migration/Integration Strategies
• Best practices (why doing it like this?)
Done at the beginning
Run every day and adjusted
Why syncing the GUID
DEMO
GUID-Sync ETL
14. Migration of large Data with SSIS Tool
You will need the Balance Data Distributor
15. Need a break?
Data Migration/Integration Strategies
Back in 15 minutes…
16. Data Migration/Integration Strategies
ETL Tools
• Continuous Data Integration
Introduce the Sync Data Concept
Sync Data in one direction vs two directions
Why do we do this?
17. Data Migration/Integration Strategies
ETL Tools : Batch Data Processing
• Talk about the User Story for Check Payment
• Show what can be a Batch Integration
• Why doing it in Batch?
• Show the SQL Server Agent Calling SSIS
DEMO
Batch Check SSIS Package
18. Custom Development
Data Migration/Integration Strategies
• Using .NET Code with XRM SDK or Service Reference
CRUD operations
Data Integration using multiple sources
You are the ultimate decider!
• Why custom development?
Real-time integration
Keep all components as part of a single “CRM Solution” (no additional
components to deploy)
Leverage internal resources strengths
Learning curve and cost of external integration tools
19. Custom Development
Data Migration/Integration Strategies
• Real-time Integration using Plugins
Custom Business Logic (code .NET/C# or VB)
Event handles for events fired by Dynamics CRM
Example of events: Create, Update, Delete, Set State etc.
DEMO
20. Custom Development
• Other Possibilities
Workflows
Data Migration/Integration Strategies
Asynchronous or Synchronous
Configurable (screen editor)
Functionality can be extended with Custom Code
No execution timeout
Dialogs
Interactive and synchronous process
Requires user input to start and run to completion
Functionality can be extended with Custom Code
21. Pitfalls of developing with Dynamics CRM
• Traditional Software Development :
25 Analyze 75% coding
25%
75%
75%
25%
• Development with CRM :
75% Analyze 25% coding
22. Pitfalls of developing with Dynamics CRM
• Using CRM for high volume data: plan carefully
• Using COST product to build custom process can take a long time.
Need an adapted development process
• Involve users early (UAT/Training)
• Define source control strategies early
• Re-design existing process for the framework can be challenging
Remodel your processes to best use the out of the box features
Salim
Talk about correspondence between CRM DB and T-SQL
Show CRM Entity View –> Demonstrate Bulk Edit
Show CRM Entity Form –> Show fields, Related Entities
View and CRM Entity record
Demo in CRM Entity, Field, Relationship, …
(Salim)
Talk about correspondence between CRM DB and T-SQL
Show CRM Entity View –> Demonstrate Buld Edit
Show CRM Entity Form –> Show fields, Related Entites
View and CRM Entity record
Demo in CRM Entity, Field, Relationship, …
JR
Show why not a High transaction volume system. Talk about the wood plant
Salim
Definition… What is data migration?
What are the challenges?
Salim
Salim
JR
0- Load form template.
JR
0- Load form template.
1- Delete the data
2- Show a package with the scrip that use XRM
3- Show the concept with of Kingsway
4- demonstrat Load of the Account and contact
(JR)
0- Load form template.
1- Delete the data
2- Show a package with the scrip that use XRM
3- Show the concept with of Kingsway
4- demonstrat Load of the Account and contact
(JR)
0- Load form template.
1- Delete the data
2- Show a package with the scrip that use XRM
3- Show the concept with of Kingsway
4- demonstrat Load of the Account and contact
Salim and JR
Let find images that show Sync Data in one and 2 directions
JR
Show the update Check Data
Salim
Talk about CRM SDK; what can be and what cannot be done
Explain why/how we can leverage the custom development tools to do integration
Salim
Demo here
Show plugin code
How it gets information about the current object in transaction
How it connects to other data sources
Show execution
Show account in both systems
Salim
Add screenshot for Workflow and Dialogs
Talk about Workflows and dialog
Build and Show in CRM if time
Salim
Talk about mistake of using CRM as a relation database
Create poor user experience, low adoption
Careful design; invest time !!