Monday, December 4, 2017

Work less, do more with Sitecore and Microsoft Flow

As a developer who works a lot on integrating different systems with each other I was extremely happy when Microsoft Flow got announced. I've started using it since the early preview and found a ton of ways it could help me automate some tedious tasks with no (or little) coding and be more productive with my daily job.

As a Sitecore developer, I also spend my time building websites on Sitecore platform and integrating them with different systems. It often starts with Save Actions in WFFM module - integrating it with online meetings platform, payment providers, CRM systems.

So what if we could integrate Sitecore with Microsoft Flow and make it the only integration provider you'll ever need? And let the service providers take care of updating their connectors in the cloud, integrating new systems with Sitecore without developers help at all?

This the goal of the Sitecore Flow project. It's a set of "recipes" for integrating Sitecore with Microsoft Flow in such a way that you install one module,which allows you to integrate with any service supported by Microsoft Flow without coding.

The initial version comes with a "Send to Microsoft Flow" action for the Web Forms For Marketers module, which only needs Microsoft Flow trigger URL and automatically prepares field schema for the configuration at the Microsoft Flow side.

This means that after you've installed the module, the business users start building flows without any coding. Want to push the data to CRM, filter it based on submitted fields, and inform the right people using Slack? 2 minutes and you're good to go!

Let's install the module and take a look at the end to end example:

First create the web form (or use a sample one) and add a "Send to Microsoft Flow" action to it. Copy the "Request Body JSON Schema" field value to the clipboard.

Then create blank Microsoft Flow and a trigger called "When a HTTP request is received" to it. Paste the text from clipboard to the "Request Body JSON Schema" field

Now add any action (required to get the post URL), save the Flow and copy the "HTTP POST URL" to Sitecore field.

That's it! Now all Web Form submits will be posted to Microsoft Flow. With a few clicks you can build the flow for your form.

The actions is asynchronous, the form will be always submitted immediately, and number of actions can happen in the background at Microsoft Flow.

You can use any available connectors and each of them will allow you to easily map your form fields, see the example below where I create a new Contact in Dynamics CRM using fields from Sitecore Web Form and an event in Outlook calendar.

I've highlighted just a few examples, but there so much more you can do with Sitecore and Microsoft Flow! You can even build more complex logic based on conditions, use loops and more. Stay tuned for updates!

No comments:

Post a Comment