Open a ticket
Chat with us
BLOG Published on 2023/01/15 by Woshada Dassanayake in Tech-Tips

Build custom communication workflows using Azure Communication Services

Over the last few years, there has been a significant shift in how employees interact with one another and the business. Similarly, it transformed how businesses interact with their customers. While customers need to connect with businesses for various reasons, there is an emerging trend of customers expecting to be served through their preferred communication channel. Every business must prioritize optimizing business processes that effectively leverage its limited workforce. It must ensure that the company adapts to the needs of its customers and derives insights from constant monitoring of sentiment, satisfaction scores, and conversation analysis.


Azure Communication Services

Many businesses have benefited from Azure Communication Services in a variety of scenarios. LinkedIn, for example, introduced native video meetings for its web and mobile users to make professional conversations more personal. Voice, video, and chat are being used to transform clinical care with more intuitive virtual appointments in the health and life sciences sector. Azure also assisted several retail customers in bridging communication gaps, whether through the provision of real-time virtual assistants or the facilitation of remote interactions such as curbside pickups.           

Azure Communication Services provides a variety of core capabilities such as voice and video calling, chat, telephony, SMS, and email. APIs enable developers to integrate all of these services directly into their mobile apps, desktop applications, and websites with just a few lines of code. APIs and SDKs for developers make it simple to create personalized communication experiences without having to worry about complex integrations. These capabilities apply to any platform or device. For example, you can build interactive person-to-person interactions for Telehealth or Telebanking use cases by leveraging Azure’s globally scaled voice and video calling. Furthermore, you can create chat experiences that are deeply integrated into your existing applications. For the first time, developers can acquire phone numbers directly from Azure, whether they are geographical local phone numbers or toll-free numbers, or integrate their existing customer service systems over SIP trunks using direct routing. Customers have been able to use SMS and email capabilities to communicate with their customers via their preferred communication channels.


The value of the Azure Communication Services platform

Azure Communication Services offers a wide range of core services to reach more customers. You can reach your customers no matter where they are by using these core communication channels.

Build custom apps with ACS libraries: Developers can use APIs and libraries to integrate these building blocks into their existing customer experiences.

Adapt and compose workflows: All of these services and capabilities can be easily integrated into your existing customer services systems, such as a contact center or a CRM system, thanks to programmable APIs and flexible SDKs.

Deep customer insights: You can use ACS to record chat conversations, messaging conversations, and leveraged call recording, which is accessible via an API. Utilize all the insights gained throughout the customer journey to comprehend and ensure that you can continuously improve your customer experience over time.


Azure Communication Services Call Automation – public preview

Call automation in Azure Communication Services enables developers to create server-based calling workflows using a simplified programming model that integrates with your existing customer service systems to deliver a more personalized customer experience. For example, it can be used to manage bookings and reservations, send voice alerts, provide a click-to-call experience directly from your web or mobile applications, and provide superior customer support.

Use cases

Augment customer service: Developers can use call automation to create workflows that help them increase agent productivity in their business by deflecting customer calls for simple self-service calling scenarios. Developers can embed calling experiences directly into their applications using ACS client libraries and UI libraries. This makes it easy not just to embed those calling experiences into their applications but also to reduce telephony spending and complexity.

Click-to-Call on web and mobile: With click-to-call experiences, you can extract specific context from a web page or a mobile UI that may be relevant to assist the customer.

Proactive voice reminders and alerts: To deliver a superior experience, more customers are looking to proactively reach out and alert customers about an upcoming outage, and reschedule.


Call automation workflow

A canonical solution architecture uses Azure Communication Services to reach customers. Customers can use SMS, chat, and email or make calls using PSTN functionality. This high-level architecture shows how ACS and Contoso's app handle customer calls, which can route to various endpoints, such as a virtual assistant or a contact center. Developers can use call automation APIs to receive incoming calls and make outgoing calls. They understand the customer experience and can assist them throughout the life cycle.

Call automation public preview provides a superior programming model via an event-driven action-based programming model that allows any developer to embed communication actions directly into their application without being a telephony expert. Control plane actions, such as the ability to make inbound and outbound calls make it simple for developers to answer, reject, transfer, and resume calls.

Developers can use this public review to program VoIP or PSTN calls for transactional workflows such as click-to-call and appointment reminders to improve customer service. Or to build more interactive self-service workflows using play and recognize actions on the data plane. Developers can easily use the control plane to make a call action or receive an incoming call notification to answer, reject, transfer, or hold calls. Furthermore, all of these APIs are fully interoperable with direct routing and direct offers, which developers can use to configure the Azure portal to integrate with your existing contact center. Developers can play a pre-recorded message and recognize input using DTMF tones through some initial data plane actions, such as play and recognize.


Demo - Notifying a customer about an upcoming flight change

This demo shows how to use an automated application to notify a customer about a flight change. The outbound dialer is used to call customers and play audio after they pick up the phone. The customers can then press a number to get more information. For example, a customer can press 1 to have his flight options emailed to him.

Some Azure resources are required for this demo to function properly, including Speech Service, which enables text-to-speech and the creation of WAV files, Storage account, which holds WAV files for the IVR experience, and Azure Communication Services.

Consider the Azure Communication Service resource. You can see the access key and connection string that are required to enable both the outbound dialer and the inbound application here.

 It has also provisioned a phone number for inbound and outbound dialing.

Enable inbound PSTN calling via Azure Communication Services. You can select from several schemas, including Cloud Event Schema and Event Grid Schema. You can also choose which events you want to subscribe to. You could subscribe to the inbound calling event if you do the inbound calling.

Next, we'll look at how to create WAV files with Azure Cognitive Services. There is an outbound call that must be made here. You must include some text and provide options.

There is also a second-level menu option where you can display or play audio to the caller. Finally, you can use cognitive services to generate audio files.

The flight option message can be exported to a WAV file and imported into your storage account.

In the storage browser, you have your Blob container with your IVR folder and three files required for your menu.

Now, you have all the resources for audio files. Then, to meet the need, review your requirements again. From a programming perspective, Adatum Airlines requires that when the call comes in, you watch through the CallConnected event. When you see the CallConnected event, you can play the top-level menu prompt that allows the user to press 1, which is the DTMF tone. You must be able to detect that DTMF tone and then invoke the Recognized API. It will recognize any DTMF tone and then launch a second-level menu.

The recognized completed or recognized failed events must be picked up with each of these events. Check the context to ensure that the right menu or DTMF tone is linked to the correct subsequent code in the workflow here. You should watch for the play completed event and then hang up the call. 

Reference:

Microsoft Ignite Sessions

Woshada Dassanayake

Technical Lead in Cloud Infrastructure and Operations

Expert in Cloud platform operations, Cloud hosting and Network operations.

Newsletter

To keep up with the news and updates related to our products, make sure to subscribe to our newsletter!

Copyright © 2025 Terminalworks. All Rights Reserved