Top Banner
Sponsored & Brought to you by Integrating with Dynamics CRM Michael Stephenson Azure Integration MVP https://twitter.com/michael_stephen https://www.linkedin.com/in/michaelstephensonuk1
43

Integration with Dynamics CRM

Jan 07, 2017

Download

Technology

BizTalk360
Welcome message from author
This document is posted to help you gain knowledge. Please leave a comment to let me know what you think about it! Share it to your friends and learn new things together.
Transcript
Page 1: Integration with Dynamics CRM

Sponsored & Brought to you by

Integrating with Dynamics CRMMichael StephensonAzure Integration MVP

https://twitter.com/michael_stephen

https://www.linkedin.com/in/michaelstephensonuk1

Page 2: Integration with Dynamics CRM

2

Michael Stephenson• Coaching & Consultancy

• Azure Trainer• Cloud Architect• Integration Architect

• Loads of real world Azure projects

• #IntegrationMonday

• Blog - http://microsoftintegration.guru/blog/

• Twitter - @michael_stephen

Page 3: Integration with Dynamics CRM

Agenda• CRM Integration Basics• BizTalk • WCF/REST/API Facade• Bulk Downloads

• Service Bus• Azure Functions• Logic Apps• Flow

Page 4: Integration with Dynamics CRM

CRM Integration Basics

Page 5: Integration with Dynamics CRM

5

CRM Extensibility

Page 6: Integration with Dynamics CRM

6

What about?• On Premise vs Cloud• Azure Active Directory vs Active Directory Federation Services

Connecting to CRMCRM SDK- Connection string- Url

Web API- ADAL + Auth Header- Url

Page 7: Integration with Dynamics CRM

7

• SOAP - Organization Service• Early Bound• Late Bound• Its Easy!

CRM SDK

Page 8: Integration with Dynamics CRM

8

• Bearer Token required• Odata endpoint• Great if you like to write lots of javascript code ;-)

CRM Web API

Page 9: Integration with Dynamics CRM

9

• Query Language for CRM• Lets you do cross entity joins • SQL (ish) syntax

Fetch XML & Query Expression

Page 10: Integration with Dynamics CRM

BizTalk WCF or WebAPI

Page 11: Integration with Dynamics CRM

11

Compare?

WCF• Generate WCF Schemas• Security

• Windows – OOB• Azure AD – Custom Behavior

• Message Types• Not strongly typed

• Excellent Articles• http://tinyurl.com/h4axh74• http://tinyurl.com/jq2k74d

Web API• Expected to be future proof• Complex url manipulation• Documentation not mature• Samples overly complex• Difficult to get up and running• JSON support• No swagger• Azure AD custom behavior required -

http://tinyurl.com/zf7spge

Page 12: Integration with Dynamics CRM

12

The key challengeThese are mapping simple data!!!

Reference – Janardhan Bikkahttp://social.technet.microsoft.com/wiki/contents/articles/32258.biztalk-server-2013-r2-integration-with-ms-dynamics-crm-2015.aspx

Page 13: Integration with Dynamics CRM

BizTalk + API FacadeWith WCF or REST

Page 14: Integration with Dynamics CRM

14

OverviewWhat is it Benefits- Light weight service between BizTalk and

CRM- Can host in IIS or Azure- Encapsulates the complexity around CRM- Supports

- RPC- Push data

- Simplify implementation- Lower maintenance- No nasty messages- No nasty maps

Page 15: Integration with Dynamics CRM

Download Data for Legacy SystemsWith BizTalk Server

Page 16: Integration with Dynamics CRM

16

OverviewHow do I extract data to produce batch files for legacy systems with Data from CRM

Technical Challenges• CRM Paging – > 5000

records• Transforming data• Work around untyped data

Page 17: Integration with Dynamics CRM

17

Real-world Example- Streamed download of 20,000+ records- Transform to complex fixed length file- Complex mappings- Daily downloads of data for legacy systems

Page 18: Integration with Dynamics CRM

18

Demo

Page 19: Integration with Dynamics CRM

Event PublishingWith Azure Service Bus

Page 20: Integration with Dynamics CRM

20

Overview Triggers:- Entity Update- Entity Create- Entity Delete- + moreChannels:- SB Messaging- Event Hub- REST- Relay (one way/2 way)

Message:- Execution Context (.net

binary)- XML- JSON

Security- ACS- SAS

Page 21: Integration with Dynamics CRM

21

Demo

Page 22: Integration with Dynamics CRM

22

Real-world Problem

- Digital Portal – 50,000 users- CRM – 2,000 back office users

CRM will be scaled to support 2000 users, what happens when 50,000 portal users start requesting Knowledgebase Articles?

Page 23: Integration with Dynamics CRM

23

Real-world Solution- Digital Portal – 50,000 users- CRM – 2,000 back office users

Portal performance increased by querying data from Azure rather than direct on CRM

Portal can also used advanced search features in Azure Search

Page 24: Integration with Dynamics CRM

Background TasksWith Azure Functions

Page 25: Integration with Dynamics CRM

25

Overview Azure Functions are great for background tasks

- Reference CRM SDK from NuGet via project.json

- Use normal .net coding

- Scheduled/Triggered/Ondemand

- SaaS Tables (coming soon)

Use Case:Refresh the share price for each company every hour

Page 26: Integration with Dynamics CRM

26

Demo

Page 27: Integration with Dynamics CRM

Upload Reference DataWith Logic Apps

Page 28: Integration with Dynamics CRM

28

Architecture

Can we upload reference data to CRM?

Schedule refresh nightly?

Page 29: Integration with Dynamics CRM

29

Demo

Page 30: Integration with Dynamics CRM

30

• Easy to get up and running for basic scenario• More complex (real world) has functionality gaps still• Limit of 5000 rows can block you• No upsert operation Logic app gets complicated

Thoughts

Page 31: Integration with Dynamics CRM

Data Change ProcessingWith Logic Apps

Page 32: Integration with Dynamics CRM

32

Example- Can I sent changes to other applications easily?

Page 33: Integration with Dynamics CRM

33

Demo

Page 34: Integration with Dynamics CRM

34

Example- Can I sent changes to other applications easily?

Page 35: Integration with Dynamics CRM

Citizen IntegratorWith Microsoft Flow

Page 36: Integration with Dynamics CRM

36

ExampleEmpower Business user to automate their day

The business user wants alerts based on Share Price

Page 37: Integration with Dynamics CRM

37

Demo

Page 38: Integration with Dynamics CRM

38

• Citizen Integrator will probably need IT help with CRM API’s• OData queries etc

• Lots of opportunities• Would like to restrict their access in Flow• How do I stop business user loading rows to entity?

Thoughts

Page 39: Integration with Dynamics CRM

Other Options

Page 40: Integration with Dynamics CRM

40

• CRM Workflow Web Hooks• Host listener on Azure App Service• Can I use Logic Apps?

• SSIS • Kingsway 3rd Party Provider

• Data Factory• OData connectivity – might be possible

Other CRM Integration Options

Page 41: Integration with Dynamics CRM

41

Other Stuff

Page 42: Integration with Dynamics CRM

42

• Option Sets

• Lookups & Related Entities• Eg: Turning a system event into a business document

• Paging Queries• Paging token + Page size + Page key

• Status Code & State Code

• Cross System Correlation

What else do I need to think about?

Page 43: Integration with Dynamics CRM

Thank You

Twitter: #integrationmonday Website: http://www.integrationusergroup.com/