“Hey Siri, close the service request in CRM”

I was doing some testing for my previous blog where I needed to repititively change the status of service request to Resolved, which will send a message to the citizen. I was thinking what if there is a way through which I am able to change something in the D365 very easily. What if I ask the bot to do it for me ?

Then, this happened.

Along with iOS 12, there shipped something called Siri Shortcuts.

Siri Shortcuts let you quickly do everyday tasks, and with the apps you use the most — all with just a tap or by asking Siri.

If you are familiar with MS flow, it is kind of same for native phone apps, typically. For eg., you could press a button and make a series of predefined things happen. You can say “Drive Home” and the Siri automatically plays your favourite playlist, shows the driving direction and sends an ETA to your spouse or you can point at a star and ask which star you are pointing at and so on.

A lot of native iOS apps already support Siri Shortcuts and we can also build custom shortcuts for the apps that supports Siri Shortcuts.

So, I wondered what if I summon Her Majesty Siri herself to do this for me!

But Dynamics 365 is not a native app nor it supports Siri Shortcuts, so how are we going to perform an action in D365 from Siri?

Fortunately, there is a way if D365 has an open api, and it turns out it does.

I know what you are thinking! How in the world am I going to trust Siri with this task, given her notoriety. To be honest and fair, we are in the world of baby bots, no one has general purpose virtual assistant that is perfect, yet.

Let’s give her a fair chance and see what she can do for us.

Scenario

Let’s say there are a few cases scheduled for the field agents and the day in a life of a field agent would be to check the D365 (preferably on mobile) for their upcoming schedule and visit the location, fix the issue and subsequently close the case and move on to the next.

When you run the above sentence in a slow motion, there are so many detailed steps involved which could add friction to the process. But, how does the above process look when we completely remove the friction involved? – It is as simple to call Siri “Hey Siri, give me the location I am scheduled next” and the Siri would do the heavy lifting of retrieving the service request assigned to him/her, puts the status to “In Progress”, parses the location and sends it to the user, which the native map app automatically opens to show it.

And when the field agent resolves the request, he/she would call Siri, “Hey Siri, close the service request”, which will update the same service request retrieved earlier to “Resolved”.

We have dramatically simplified the entire human workflow by summoning the bot.

Traditionally, these processes have been handled by paper trails, which we all laughed at and called it “manual” process. In my humble opinion, the process of asking the user to login to the website, navigate the desired page/record to fill in the details is no different to the paper process that dominated the mankind 20 years ago.

Okay. How does our design look:

It is quite simple. We setup a Siri shortcut, which will call the MS Flow, which in-turn executes the desired actions in D365 and eventually the MS flow will send the desired results back to the Siri Shortcut.

Ask for the service request location

MS Flow

Create a new MS Flow and add a Request action to receive the request object from Siri Shortcut. This request action will generate an URL that will be used by the Siri Shortcut to trigger the flow.

Request

The request that we obtained from Siri Shortcut will have the userId data. In the next Flow action, we retrieve the service request for this userId and update the record’s status to “In Progress”.

Screen Shot 2018-09-23 at 1.31.03 PM.png

Screen Shot 2018-09-23 at 1.32.24 PM.png

We also extract the location (address) of the service request and send it to the Siri Shortcut using the “Response” action.

Screen Shot 2018-09-23 at 1.33.30 PM.png

Siri Shortcut

Create a Siri Shortcut which will send a POST request to an URL (MS Flow) with the userId. When the Siri Shortcut gets the result back, it passes the result to the Map app which will plot the location on the map.

There are 3 actions used:

  1. URL Action – Add the URL generated by the Flow. Siri Shortcut will need this URL to trigger the Flow.
  2. Get Contents of URL – This action will invoke the URL with the POST method by passing the JSON body which contains the userId. This user id will be used to filter the service request in D365. The result of this action will be the location of the service request.
  3. Show in Maps – This action will take the result of the previous Get Contents of URL action, which is nothing but the location and show it in the map.

shortcut1.jpgshortcut2.jpg

The above steps enable you to run this shortcut from the Shortcut app, but even better, you can summon Siri to run this shortcut without even opening the app.

I have setup a “Siri Phrase” “Show my next service request location”. This enables the field agent to just talk to Siri in order to show the location on the map.

Siri Phrase.jpeg

Ask to close the service request

This is very similar to the above implementation.

MS Flow

Create a flow which will take the Request object (that has userId), and retrieve the service request for the userId that is In Progress and set it to Resolved.

Siri Shortcut

Create a Siri Shortcut which will trigger the Flow with POST method.

close service request.PNG

Set a Siri Phrase “Close the service request”, so the shortcut can be run without opening the Shortcut app.

Siri Phrase Case Cloure.PNG

Demo

Hey Siri.gif

This is dramatically simple enough. But you may ask what if the agent wants to update more details on the service request closure such as Resolution Details, additional comments etc., The examples I have shown here is just a start. I am confident that we can accomodate those scenarios as well in Siri Shortcuts, which i’ll plan to cover in some of the future posts.

Obviously, this is a proof of concept and hence it is superficial. For the production grade application, we would abstract a few components and make it much more seamless and reusable.

The evolution of bots opens up a lot of possibilities, which could positively impact the daily life of the people around us. Imagine your city publishes a bunch of Siri Shortcuts for their citizens to download and use it to report service requests/incidents. Imagine a business publish shortcuts to order products lightning fast. Imagine health care providers publishes shortcuts to schedule appointments. The scenarios are just endless as we need to convert whatever we converted from paper processes to website applications to bots.

This is interesting because now you have access to rapidly growing native iOS apps’ connectors on top of rich connectors that flow offers.

Citizens do not have to download third party app to perform these voice commands or ride through a learning curve. If they know how to use Siri, they are well qualified to use this.

As Siri and Siri Shortcuts are native to iOS,  Apple has integrated this tightly into their platform and makes it really user friendly and easy adoptability.

This is just a beginning. Can’t wait to discover all the creative ways that this approach allows us to interact with the business and consumer focused applications.

2 thoughts on ““Hey Siri, close the service request in CRM”

    1. Hey Chelsea, Google has something called “Routines” and the concept is almost the same, but it is very limited at this point.
      1. If you have to build something even closer to this, you need to build “Custom Routine”, which is not available outside of the US.
      2. Even in the US, I don’t think you can call the third party API like Dynamics 365/Flow as it is not supported by Google yet. I talked to a Google Support person and he confirmed it. There is something called “building custom actions”, which takes far too much effort and require a developer to build it natively within the Google assistant itself.
      Hope it answers!

      Like

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s