integration with dynamics crm

43
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

Upload: biztalk360

Post on 07-Jan-2017

339 views

Category:

Technology


2 download

TRANSCRIPT

Sponsored & Brought to you by

Integrating with Dynamics CRMMichael StephensonAzure Integration MVP

https://twitter.com/michael_stephen

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

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

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

• Service Bus• Azure Functions• Logic Apps• Flow

CRM Integration Basics

5

CRM Extensibility

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

7

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

CRM SDK

8

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

CRM Web API

9

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

Fetch XML & Query Expression

BizTalk WCF or WebAPI

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

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

BizTalk + API FacadeWith WCF or REST

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

Download Data for Legacy SystemsWith BizTalk Server

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

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

18

Demo

Event PublishingWith Azure Service Bus

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

21

Demo

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?

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

Background TasksWith Azure Functions

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

26

Demo

Upload Reference DataWith Logic Apps

28

Architecture

Can we upload reference data to CRM?

Schedule refresh nightly?

29

Demo

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

Data Change ProcessingWith Logic Apps

32

Example- Can I sent changes to other applications easily?

33

Demo

34

Example- Can I sent changes to other applications easily?

Citizen IntegratorWith Microsoft Flow

36

ExampleEmpower Business user to automate their day

The business user wants alerts based on Share Price

37

Demo

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

Other Options

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

41

Other Stuff

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?

Thank You

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