Scheduling Support in Dynamics 365 for Customer Service with Power Automate and Calendly

As a functional consultant, I dedicate most of my day to billable work. To provide my customers with the best service, the time that they pay for shouldn't be interrupted. Still, I do appreciate that I should try to be as available as possible to my customers and that there will always be times where my customers feel the need to circumvent the support process, pick up the phone and contact me directly.

So, how do I minimise disruptions while still maintaining availability to my customers? Well, I came up with a solution that that has been working well for me using a service called Calendly. I then used Power Automate to write a Flow to compliment that service, increase visibility and minimise admin.

Calendly works by allowing you to configure events. In my case, I only use one event, which is for a 20-minute phone call.

Among other things, it allows you to specify event duration and when to allow people to request the event.

It then provides you for a link to that event which you can distribute to your customers. I find adding this link to my email signature gets the message across well enough although some customers do need an extra verbal prompt.

When a customer clicks the link, the event booking page displays, Calendly looks at your Outlook calendar and allows the customer to book the event in an available slot. There are some configuration options to stop your customers from booking within, for example, four hours to help prevent anyone from making a surprise booking.

It's essential to keep your calendar up to date. I block out a few hours of project work in the morning and afternoon with daily recurring appointments. These show as 'Free' until my project manager tells me precisely what I'm doing, then I update them individually with the name of the task and to show as 'Busy'. Also, don't forget to block out time for lunch :-)

When a customer requests a call then you receive an email alert in your inbox, Calendly creates an appointment with the relevant parties in your calendar at the specified time, and the requester receives an invite accordingly.

2020-01-21_08-09-50.png

That's a brief overview of the Calendly functionality, and how I manage my Outlook calendar. Although the solution works well, I found a few minor issues.

  1. I still have nothing to log the time for the call against

  2. I have to rely on automated emails from Calendly to receive a heads up on the booking in advance of the standard 15-minute Outlook appointment notification.

Luckily, Calandly has a Power Automate connector (at the time of writing, the connector's in preview) so I designed a Flow which would notify me via Teams when someone requested a phone call and allow me to approve or reject it. 

Here's a summary of how the process flows - 

To trigger my Flow, I use the 'When an Event is Created' trigger that comes in the Calendly connector.

To trigger my Flow, I use the 'When an Event is Created' trigger that comes in the Calendly connector.

I needed to configure this with my Calendly API key. Note, that (at the time of writing) although an API key is available on free subscriptions, the API is only accessible from Power Automate on trial and premium subscriptions.

I then used the 'List Records' action in the Common Data Service (Current Connector) connector to get the most recently created active contact record where the email address is equal to that of the invitee email address.

Please see Sara Lagerquist’s excellent article on how to populate the filter query field - Be Lazy: Filter List Records in Power Automate with FetchXML Builder.

I initialised a variable to store the GUID of the contact record.

Next, I checked whether the value of the array returned from my List Records action was not empty.

The expression I used in the conditional statement was -

empty(outputs('Get_first_contact_with_matching_email')?['body/value'])

If it was not empty, I set the variable to the unique identifier of the returned entity.

The expression I used here was -

first(outputs('Get_first_contact_with_matching_email')?['body/value'])?['contactid']

Huge thanks to Elaiza Benitez for her video - How to avoid Apply to Each from appearing.

If the list was empty, I used the 'Create a New Record' action to create a new Contact in CDS and then set the variable to the unique identifier of that record. Note that, the first and last name values I got from the output of the Calently trigger were always blank so I populated the Last Name of my contact with the invitee email address. Also, as I configured my event in Calendly as a phone call, the Event Location property from the trigger output contained the phone number.

Now that I have the unique ID of a contact record in CDS, I use the 'Get Record' action to get that contact record and access it's other attributes.

I want to approve or reject the call, so I'll create an approval.

I want my approval to notify me via Teams rather than Outlook so note that I set 'Enable Notifications' to 'No'.

Note that the expression in the 'Assigned To' field uses the same technique as described in Elaiza's video mentioned earlier again to avoid an unwanted 'Apply to Each' action. It is -

first(triggerOutputs()?['body/payload/event/extended_assigned_to'])?['email']

Then I use the 'Post your adaptive card as the Flow bot to a user' action in the Teams connector to send the Teams notification.

I get an informative notification in Teams showing the customer and time of the scheduled phone call.

I then wait for the approval response.

2020-01-22_10-14-03.png

And once a response has been received, I check the outcome.

If I approve the phone call request, a case gets created in CDS, and I can log my time against this after the call.

If I've neglected to keep my calendar current, I can reject the phone call request which sends a polite, personalised email to the customer explaining that I'll check my schedule in due course and reschedule.

I find this to be a slick, simple case study which highlights the integration possibilities available in Power Automate and how we can use it along with third-party as well as numerous Microsoft apps to automate and improve routine processes.

Please try this out and let me know if this helps you avoid distractions or maximise your productivity when you're working on billed time. You can download the Flow from here - https://link.freefall365.com/randomfiles.

Or, please let me know how you deal with interruptions or if you could improve this process further.