The Microsoft Dynamics 365 connector provides unified connectivity to Dynamics CRM 8.2 On-Premises and On-Demand versions.

Additional Info

Requires Mule Enterprise License

Yes  

Requires Entitlement

No  

Mule Version

3.7.0 or higher

Configs


OAuth 2.0 Username-Password

<dynamics365:config-oauth-user-pass>

Connection Management

Attributes

Name Java Type Description Default Value Required

name

String

The name of this configuration. With this name can be later referenced.

x 

clientId

String

x 

username

String

Username used to initialize the session

x 

password

String

Password used to authenticate the user

x 

resource

String

The App ID URI of the web API (secured resource).

x 

clientSecret

String

The Application Secret that you created in the app registration portal for your app. It should not be used in a native app, because client_secrets cannot be reliably stored on devices. It is required for web apps and web APIs, which have the ability to store the client_secret securely on the server side.

 

tokenRequestEndpoint

String

x 

maxHttpConnections

Integer

The maximum number of allowed HTTP connections. In addition with the pooling profile tab, one can control the overall maximum HTTP connections as following: overallConnectionNumber = maxHttpConnections x maxActive

100

 

readTimeout

Integer

Specifies the amount of time, in milliseconds, that the consumer will wait for a response before it times out. Default value is 0, which means infinite.

0

 

connectionTimeout

Integer

Specifies the amount of time, in milliseconds, that the consumer will attempt to establish a connection before it times out. Default value is 0, which means infinite.

0

 

proxyHost

String

Hostname of the proxy. If this property is not set then no proxy will be used, otherwise a proxy will be used, but a proxy host must be specified.

 

proxyPort

String

Port of the proxy. If host is set then this property must be set and cannot be a negative number.

 

proxyUsername

String

Username used to authenticate against the proxy. If this property is not set then no authentication is going to be used against the proxy, otherwise this value must be specified.

 

proxyPassword

String

Password used to authenticate against the proxy.

 

version

String

The version number of the API to connect to.

9.0

 


OAuth 2.0 Connection

<dynamics365:config-with-oauth>

OAuth2 Using OAuth2 as authentication method will add the authorize and unauthorize operations. You must authorize before using any operation with OAuth2.

Attributes

Name Java Type Description Default Value Required

name

String

The name of this configuration. With this name can be later referenced.

x 

clientId

String

Your application's client identifier (consumer key in Remote Access Detail).

x 

clientSecret

String

Your application's client secret (consumer secret in Remote Access Detail).

x 

readTimeout

Integer

Specifies the amount of time, in milliseconds, that the consumer will wait for a response before it times out. Default value is 0, which means infinite.

0

 

connectionTimeout

Integer

Specifies the amount of time, in milliseconds, that the consumer will attempt to establish a connection before it times out. Default value is 0, which means infinite.

0

 

proxyHost

String

Hostname of the proxy. If this property is not set then no proxy will be used, otherwise a proxy will be used, but a proxy host must be specified.

 

proxyPort

String

Port of the proxy. If host is set then this property must be set and cannot be a negative number.

 

proxyUsername

String

Username used to authenticate against the proxy. If this property is not set then no authentication is going to be used against the proxy, otherwise this value must be specified.

 

proxyPassword

String

Password used to authenticate against the proxy.

 

version

String

The version number of the API to connect to.

9.0

 

Processors


Create

<dynamics365:create>

  DataSense enabled

Creates a new Entity
Create New Entity - https://msdn.microsoft.com/en-us/library/gg328090.aspx
Associate Entity upon Creation - https://msdn.microsoft.com/en-us/library/mt607875.aspx#Anchor_4

XML Sample

<dynamics365:create config-ref="" logicalName="entityName"  />

Attributes

Name Java Type Description Default Value Required

config-ref

String

Specify which config to use

x 

logicalName

String

The logical name of the entity. It is always the Schema Name in lower case.

x 

attributes

Map<String,Object>

The attributes of the entity to be created as a Map.

#[payload]

 

Returns

Return Java Type Description

String

The entity id which was created.


Create multiple

<dynamics365:create-multiple>

  DataSense enabled

Creates Multiple Entities
Create New Entity - https://msdn.microsoft.com/en-us/library/gg328090.aspx
Associate Entity upon Creation - https://msdn.microsoft.com/en-us/library/mt607875.aspx#Anchor_4
Batch Request - https://msdn.microsoft.com/en-us/library/mt607719.aspx

XML Sample

<dynamics365:create-multiple config-ref="" logicalName="entityName"  >
                <dynamics365:attributes-list ref="#[payload]"/>
        </dynamics365:create-multiple>

Attributes

Name Java Type Description Default Value Required

config-ref

String

Specify which config to use

x 

logicalName

String

The logical name of the entities to be created. It is always the Schema Name in lower case.

x 

attributesList

List<Map<String,Object>>

A list with the attributes of the entities to be created as a List of Maps.

#[payload]

 

useSingleTransaction

boolean

Use a single transaction for creation. If one entity fails to be created the transaction is rolled-back.

false

 

Returns

Return Java Type Description

BulkOperationResult<Map<String,Object>>

The results of the created entities in form of BulkOperationResult.


Update

<dynamics365:update>

  DataSense enabled

Update an Entity
Update an Entity - https://msdn.microsoft.com/en-us/library/mt607664.aspx
Associate Entities upon Update - https://msdn.microsoft.com/en-us/library/mt607875.aspx#Anchor_4
Batch Request - https://msdn.microsoft.com/en-us/library/mt607719.aspx

XML Sample

<dynamics365:update config-ref="" logicalName="entityName"  >
                <dynamics365:attributes ref="#[payload]"/>
        </dynamics365:update>

Attributes

Name Java Type Description Default Value Required

config-ref

String

Specify which config to use

x 

logicalName

String

The logical name of the entity. It is always the Schema Name in lower case.

x 

attributes

Map<String,Object>

The attributes of the entity that will be updated as a Map.

#[payload]

 


Delete

<dynamics365:delete>

  DataSense enabled

Delete an Entity
Delete an Entity - https://msdn.microsoft.com/en-us/library/mt607664.aspx

XML Sample

<dynamics365:delete config-ref="" logicalName="entityName"  ></dynamics365:delete>

Attributes

Name Java Type Description Default Value Required

config-ref

String

Specify which config to use

x 

logicalName

String

The logical name of the entity. It is always the Schema Name in lower case.

x 

id

String

The id of the entity that is going to be deleted

#[payload]

 


Delete multiple

<dynamics365:delete-multiple>

  DataSense enabled

Delete Multiple Entities
Delete an Entity - https://msdn.microsoft.com/en-us/library/mt607664.aspx
Batch Request - https://msdn.microsoft.com/en-us/library/mt607719.aspx

XML Sample

<dynamics365:delete-multiple config-ref="" logicalName="entityName"  >
                <dynamics365:ids ref="#[payload]"/>
        </dynamics365:delete-multiple>

Attributes

Name Java Type Description Default Value Required

config-ref

String

Specify which config to use

x 

logicalName

String

The logical name of the entity. It is always the Schema Name in lower case.

x 

ids

List<String>

The list of ids that are going to be deleted.

#[payload]

 

useSingleTransaction

boolean

Use a single transaction for deletion. If one entity fails to be deleted the transaction is rolled-back.

false

 

Returns

Return Java Type Description

BulkOperationResult<String>

The results of the deleted entities in form of BulkOperationResult.


Update multiple

<dynamics365:update-multiple>

  DataSense enabled

Update Multiple Entities
Update Entity - https://msdn.microsoft.com/en-us/library/mt607664.aspx
Associate Entities upon Update - https://msdn.microsoft.com/en-us/library/mt607875.aspx#Anchor_4
Batch Request - https://msdn.microsoft.com/en-us/library/mt607719.aspx

XML Sample

<dynamics365:update-multiple config-ref="" logicalName="entityName"  >
                <dynamics365:attributes-list ref="#[payload]"/>
        </dynamics365:update-multiple>

Attributes

Name Java Type Description Default Value Required

config-ref

String

Specify which config to use

x 

logicalName

String

The logical name of the entity. It is always the Schema Name in lower case.

x 

attributesList

List<Map<String,Object>>

A list with the attributes of the entities that are going to be updated as a List of Maps.

#[payload]

 

useSingleTransaction

boolean

Use a single transaction for update. If one entity fails to be updated the transaction is rolled-back.

false

 

Returns

Return Java Type Description

BulkOperationResult<Map<String,Object>>

The results of the updated entities in the form of BulkOperationResult.


Retrieve

<dynamics365:retrieve>

  DataSense enabled

Retrieve an Entity
Retrieve an Entity - https://msdn.microsoft.com/en-us/library/mt607871.aspx

XML Sample

<dynamics365:retrieve config-ref="" logicalName="entityName"  ></dynamics365:retrieve>

Attributes

Name Java Type Description Default Value Required

config-ref

String

Specify which config to use

x 

logicalName

String

The logical name of the entity. It is always the Schema Name in lower case.

x 

id

String

The id of the entity that is going to be retrieved.

#[payload]

 

Returns

Return Java Type Description

Map<String,Object>

The retrieve response as a Map.


Retrieve multiple

<dynamics365:retrieve-multiple>

  Paged Operation

Retrieve Multiple by URL
Query Data using the Web API - https://msdn.microsoft.com/en-us/library/gg334767.aspx

XML Sample

<dynamics365:retrieve-multiple config-ref="" dataQueryURL="URL"></dynamics365:retrieve-multiple>

Attributes

Name Java Type Description Default Value Required

config-ref

String

Specify which config to use

x 

dataQueryURL

String

The URL that is going to be used for retrieve.

#[payload]

 

pagingConfiguration

PagingConfiguration

The configuration for the pagination feature.

x 

Returns

Return Java Type Description

ProviderAwarePagingDelegate<Map<String,Object>,Dynamics365Connector>

A paging delegate with the records resulting from the query. Pagination is handled internally.


Retrieve multiple by query

<dynamics365:retrieve-multiple-by-query>

  Paged Operation

Retrieve Multiple by DSQL Query
Query Data using the Web API - https://msdn.microsoft.com/en-us/library/gg334767.aspx

XML Sample

<dynamics365:retrieve-multiple-by-query config-ref=""  query="dsql:DSQL"></dynamics365:retrieve-multiple-by-query>

Attributes

Name Java Type Description Default Value Required

config-ref

String

Specify which config to use

x 

query

String

The DSQL query that is going to be used for retrieve. The query will be transformed in a retrieve URL internally.

#[payload]

 

pagingConfiguration

PagingConfiguration

The configuration for the pagination feature.

x 

Returns

Return Java Type Description

ProviderAwarePagingDelegate<Map<String,Object>,Dynamics365Connector>

A paging delegate with the records resulting from the query. Pagination is handled internally.


Disassociate

<dynamics365:disassociate>

  DataSense enabled

Disassociate Entities
Disassociate Entities - https://msdn.microsoft.com/en-us/library/mt607875.aspx

XML Sample

<dynamics365:disassociate config-ref=""  logicalName="entityName">
                <dynamics365:attributes ref="#[payload]"/>
        </dynamics365:disassociate>

Attributes

Name Java Type Description Default Value Required

config-ref

String

Specify which config to use

x 

logicalName

String

The logical name of the entity. It is always the Schema Name in lower case.

x 

attributes

Map<String,Object>

The attributes should hold the id of the entity upon which the disassociation will be performed and a list with the entities keys that are going to be disassociated.

#[payload]

 


Do action

<dynamics365:do-action>

  DataSense enabled

Call Action
Use Web API Actions - https://msdn.microsoft.com/en-us/library/mt607600.aspx

XML Sample

<dynamics365:do-action config-ref="" actionName="actionName">
                <dynamics365:related-entities ref="#[payload]"/>
        </dynamics365:do-action>

Attributes

Name Java Type Description Default Value Required

config-ref

String

Specify which config to use

x 

actionName

String

The action name that is going to be called

x 

boundedEntityType

String

An optional bounded entity type. It must be provided if the action is bounded.

 

boundedEntityId

String

An optional bounded entity id. It must be provided if the action is bounded.

 

relatedEntities

Map<String,Object>

This is the body that will be send in the request as a Map.

#[payload]

 

Returns

Return Java Type Description

Map<String,Object>

The response as a Map.


Invoke

<dynamics365:invoke>

Generic Simple Invoke

XML Sample

<dynamics365:invoke config-ref="" uri="" httpMethod="DELETE" json="{}">
                <dynamics365:headers>
                        <dynamics365:header key="Accept">application/json</dynamics365:header>
                </dynamics365:headers>
        </dynamics365:invoke>

Attributes

Name Java Type Description Default Value Required

config-ref

String

Specify which config to use

x 

uri

String

The URI that is going to be invoked.

#[payload]

 

httpMethod

InvokeHttpMethod

The HTTP Method that is going to be invoked.

x 

headers

Map<String,String>

The HTTP headers used in the request. There are some default headers that are used; read more in the documentation.

x 

json

String

The JSON String that will be placed in the body of the request.

 

Returns

Return Java Type Description

Map<String,Object>

The response from the server as a Map.