Flow: Connectors for Common Data Service Platform

Last week, I was prepping for my session at Dynamics 365 Summit on Logic Apps and noticed my Flow connector got few more features added. Often time Logic Apps connector is more advanced than the same connector in Flow, this is so not true when for CDS/Dynamics. 

Flow currently has 3 Connectors for connecting to CDS/Dynamics 365:

Dynamics 365 Connector: was the first D365 connector published and has been around since Flow & Logic Apps were released. This connector went through a couple of revision and has been deemed deprecated since April 22nd in Favour of CDS Connector

Common Data Service: This was released when CDS was released this is the recommended connector to be used with Flow and Logic Apps when creating independent flow. This connector has parity with Dynamics 365 connector which has been deprecated.

Common Data Service (current environment): is the newest Flow connector, released earlier this year. As the name suggests this connector is Environment specific and solution aware. it also has a lot of new features(actions/Triggers).

Flow & Solutions: Flow has been touted as a replacement for the CDS/D365 CE workflow since its inception and Since last July Microsoft has even put a recommendation alert suggesting to instead create flow when you try to create a workflow.

Microsoft recommends creating Flow instead while creating a Workflow.

One of the advantage workflows had was it could be added to the solution, Last year solution support was announced for Microsoft flow but it had some challenges, since then the solution support has much improved. as part of the solution support, a new CDS (Current Environment) connector was released.

CDS (Current Environment) connector has a couple of features which is only available through this connector. they simplify and make it easier to build flow. Let’s do a deeper dive and look into the features and capabilities of the CDS solution aware connector.

How do I access it:  CDS (Current Environment) connector is only available when you create a flow from a CDS/D365 Solution. 

Triggers: with Solution connector, there is only one trigger with different permutation combination of create, update, delete. This helps with organization as now you can have one logic app to trigger the different events rather than having duplicate logic apps doing the same thing.

Trigger options comparison for CDS connector

 

 

Actions: The solution CDS connector has introduced a couple of new Actions which makes it a lot easier for new build flow. The new actions with the exception of Predict bring web API operations to Flow.

Actions option comparison between CDS connector
    • Associate entities: action is to create an association for 1:N or N: N relationship between two records. 

But as the feature is based on the web API method, it requires parameters in the same format. 

The “Item Identifier” input parameter takes record Id(GUID) as input but for the associating item you need to provide the OData URL for the record to “Associating item full URL Identifier”.

You may compose the URL in expression using the Record Id or perform a “Get a Record” action which in turn includes record Odata URL in output(OData Id).

 

    • Disassociate entities: action is to remove a reference/relationship with another entity record. It has the same parameter set as associate action.

    • Perform a bound action: is the latest and new action added to the CDS solution connector, It was released as part of the October 2019 release. This action is to trigger actions that are bound to entities.  This is awesome as you can not only trigger the Out of the Box actions But even trigger the custom action you may have created on an entity(here are the steps for creating custom action).
Custom entity bound Action

 

Based on the action being triggered, the action input parameter options are presented and the action output parameter could be used in subsequent Flow actions. Flow doesn’t enforce the requirement constraint of the parameter but instead, you will get an error at runtime if a mandatory input value is not supplied.

    • Perform an unbound action:  is another action which got released as part of the October 2019 release. this is to trigger all other actions that are not bound to any entity type, like triggering close entity actions like “CloseIncident“, “CloseQuote“, “WinOpportunity” or solution and customization specific action like “DeleteOptionValue” .

The available options are based on web API action reference, You can find the complete list of supported/available unbound actions here.

 

    • Predict: Predict is for PowerApps AI Builder, It can is used to trigger the AI Model and get the output response, It supports OOB as well as custom models

    • List actions: This is an action that is available in Dynamics 365 and CDS(non-solution) connector as well, but the new version of it which is available in CDS(Current environment) connector packs an upgrade. 

The new actions have 3 new options:

    • Select Query: This is to specify fields for the entity to retrieve. this is great as you can filter out and focus on bringing the attributes you care about rather than data in entirety.
    • Fetch XML Query: Provide the fetch XML as an input to query(This has been my most favorite update). 
    • Skip token: to retrieve data in batches.

 

 

 

 

 

 

 

 

 

 

 

 

 

I am quite excited with what the future Holds for FLOW and CDS, It has come a long way since the Flow solution support was announced last year, there is still some distance to cover adding support for Flow Buttons to solutions.

I hope the CDS solution connector is made available for LogicApps soon as it will greatly simplify and reduce actions count in while building Integrations.

Leave a Reply

Your email address will not be published. Required fields are marked *