<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0" xmlns:cc="http://cyber.law.harvard.edu/rss/creativeCommonsRssModule.html">
    <channel>
        <title><![CDATA[Stories by Anzhelika Minina on Medium]]></title>
        <description><![CDATA[Stories by Anzhelika Minina on Medium]]></description>
        <link>https://medium.com/@anzhelikaminina?source=rss-152e977c1c0a------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/2*LRfc4X5sEqmbavsQqj1o0w.jpeg</url>
            <title>Stories by Anzhelika Minina on Medium</title>
            <link>https://medium.com/@anzhelikaminina?source=rss-152e977c1c0a------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Fri, 20 Nov 2026 03:27:16 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@anzhelikaminina/feed" rel="self" type="application/rss+xml"/>
        <webMaster><![CDATA[yourfriends@medium.com]]></webMaster>
        <atom:link href="http://medium.superfeedr.com/" rel="hub"/>
        <item>
            <title><![CDATA[Call center automation: how I created a conversational AI app version of my own Apple customer…]]></title>
            <link>https://medium.com/dasha-ai/call-center-automation-how-i-created-a-conversational-ai-app-version-of-my-own-apple-customer-fc96937eb953?source=rss-152e977c1c0a------2</link>
            <guid isPermaLink="false">https://medium.com/p/fc96937eb953</guid>
            <category><![CDATA[voice-ai]]></category>
            <category><![CDATA[vscode]]></category>
            <category><![CDATA[ai-applications]]></category>
            <category><![CDATA[call-center-software]]></category>
            <category><![CDATA[articles]]></category>
            <dc:creator><![CDATA[Anzhelika Minina]]></dc:creator>
            <pubDate>Wed, 27 Oct 2021 15:23:15 GMT</pubDate>
            <atom:updated>2021-10-27T15:23:15.027Z</atom:updated>
            <content:encoded><![CDATA[<h3>Call center automation: how I created a conversational AI app version of my own Apple customer support call in just 2 hours.</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*DJVd57q8LVriZNYK0g014Q.png" /></figure><blockquote>Originally published on <a href="https://dasha.ai/en-us/blog/customer-support-conversational-ai-app">dasha.ai/en-us/blog/customer-support-conver..</a></blockquote><p>This post is a bit different from what I’ve created before. This time, I’ve recreated an Apple Support operator-to-customer phone call in a form of an automated conversational AI app.</p><p>Let me give you the reason why I’ve decided to create this Apple customer support conversational AI app. My conversational with the human operator took about 7 minutes in total. That’s 7 minutes of someone’s time to answer 2 questions and 7 minutes of my time to ask them. I believe that artificial intelligence can be used to automate this type of customer support conversation, therefore saving operators time to focus on the most complex issues that require human creativity.</p><p>Take a look at the demo call to have a quick look at how the app works:</p><p><a href="https://youtu.be/5S9OMcbSSuo">https://youtu.be/5S9OMcbSSuo</a></p><p>This app can serve you as a base to create your own customer support conversational AI apps and use it for call center automation.</p><p>Here are the steps we will take to create this app:</p><h3>Getting started with Dasha conversational AI</h3><p>If you have never used Dasha before, you need to activate your API key. The API key lets you load your conversational application to the Dasha Cloud Platform, where it is executed. If you have your Dasha API key, ignore this part.</p><p>Download the latest versions of Microsoft VSCode, Node.js and NPM installed. Dasha Studio is implemented as an extension to VSCode for your convenience. Open Visual Studio Code and install the <a href="https://marketplace.visualstudio.com/items?itemName=dasha-ai.dashastudio">Dasha Studio extension</a> and Dasha Command Line Interface.</p><pre>code --install-extension dasha-ai.dashastudio &amp;&amp; <br>npm i -g &quot;@dasha.ai/cli@latest&quot;</pre><p>Now, run a command to register your Dasha API key. A browser window will pop up and you will need to sign up for an account.</p><pre>dasha account login</pre><p>Afterwards, run to check your API key.</p><pre>dasha account info</pre><p>Now let’s get to know the files you’ll be using to create your conversational AI app. We recommend downloading <a href="https://github.com/dasha-samples/blank-slate-app">Dasha Blank Slate app</a> source code and use it as a base to write your code.</p><p>For that, you’ll have to open main.dsl and data.json files and delete everything you see there. This way, you’ll be able to start writing your code from scratch while having all the other essential files (for instance, the commonReactions library that has pre-programmed replies so you don’t have to worry about coding those).</p><p>You can also download the source code of this conversational AI app <a href="https://github.com/dasha-samples/apple-customer-support-app">here</a>.</p><p>You’ll mainly be using 2 files to create your conversational AI app:</p><ul><li>main.dsl — this is where you’ll write your DashaScript Language code to create the workflow of your conversational AI app. With Dasha Studio extension on and with the directions in this post, it’ll be an easy job for you. You can read more about it in our <a href="http://docs.dasha.ai/">documentation</a>.</li><li>data.json — is the data set you provide to train the Dasha Cloud neural networks to recognize user <a href="https://dasha.ai/en-us/blog/intent-classification">intents</a> and identify <a href="https://dasha.ai/en-us/blog/named-entity-recognition">named entities</a>.</li></ul><p>Additionally, you will want to use the index.js file to write out external functions. External functions are needed to process data with the SDK. For example, you may need to process data, get access to databases or APIs or use it for any other purposes.</p><ul><li>index.js — is the server-side JavaScript file to which the Dasha SDK is imported and which launches the contents of the /app folder to the Dasha Cloud to be executed. Here you’ll be adding any external functions you deem necessary once adapting the code to your company’s needs.</li></ul><p>Familiarizing yourself with the files is important, but now let’s get to the fun part — programming the recreated Apple customer support conversational AI app!</p><h3>Purpose of the conversation</h3><p>The conversation I had with the call center representative was quite short, though informative. My purpose was to ask 2 main questions:</p><ul><li>What can I do to get my mom’s iPhone broken screen fixed.</li><li>How can I trade in my own phone and get a discount for a newer model.</li></ul><p>Throughout the code you’ll see what kind of questions I asked and the way they were answered.</p><h3>Start with the basics</h3><p>First of all, download the <a href="https://github.com/dasha-samples/apple-customer-support-app">source code of this conversational AI app</a> to be a form of a guide to you.</p><p>Now, the basics here are 2 things:</p><ul><li>importing common library</li></ul><pre>import &quot;commonReactions/all.dsl&quot;;</pre><ul><li>writing our the context for the app</li></ul><pre>context <br>{<br>    // declare input variables phone and name  - these variables are passed at the outset of the conversation. In this case, the phone number and customer’s name <br>    input phone: string;</pre><pre>    // declare storage variables <br>    output first_name: string = &quot;&quot;;<br>    output last_name: string = &quot;&quot;;<br>    output phone_model: string = &quot;&quot;;<br>    output owner_phone_model: string = &quot;&quot;;</pre><pre>}</pre><p>The next step is writing your first node called root. Take a look at how it’s written out:</p><pre>start node root <br>{<br>    do <br>    {<br>        #connectSafe($phone);<br>        #waitForSpeech(1000);<br>        #sayText(&quot;Hi, thanks for calling Apple Support. My name is Dasha. Can I get your name, please?&quot;);<br>        wait *;<br>    }   <br>    transitions <br>    {</pre><pre>    }<br>}</pre><p>We’re achieving multiple things here. In the do section we establish a connection to the user’s phone, wait for 1 second to speak (or give the user 1 second to say something), and then say our welcome message.</p><p>Since we need to know the user’s name, we should write where the conversation should go after we get that information in the transitions section. We make a transition to the node that follows once a particular intent gets triggered (#messageHasData(&quot;first_name&quot;);).</p><p>Let’s take a dive into the data.json file and take a look at how entities work there:</p><pre>&quot;entities&quot;: {<br>    &quot;first_name&quot;: <br>    {<br>      &quot;open_set&quot;: true,<br>      &quot;values&quot;: <br>      [<br>        {<br>          &quot;value&quot;: &quot;John&quot;<br>        },<br>        {<br>          &quot;value&quot;: &quot;Bridgette&quot;<br>        },<br>        {<br>          &quot;value&quot;: &quot;James&quot;<br>        },<br>        {<br>          &quot;value&quot;: &quot;Sarah&quot;<br>        },<br>        {<br>          &quot;value&quot;: &quot;Jermaine&quot;<br>        },<br>        {<br>          &quot;value&quot;: &quot;Roseanne&quot;<br>        },<br>        {<br>          &quot;value&quot;: &quot;Ahmed&quot;<br>        },<br>        {<br>          &quot;value&quot;: &quot;Tony&quot;<br>        },<br>        {<br>          &quot;value&quot;: &quot;Jon&quot;<br>        }<br>      ],<br>      &quot;includes&quot;: <br>      [<br>        &quot;(Oscar)[first_name]&quot;,<br>        &quot;(Danielle)[first_name]&quot;,<br>        &quot;My name is (Sophie)[first_name]&quot;,<br>        &quot;My name is (Sarah)[first_name]&quot;,<br>        &quot;My name is (Cameron)[first_name]&quot;,<br>        &quot;My name is (Steven)[first_name]&quot;,<br>        &quot;My name is (Jessica)[first_name]&quot;,<br>        &quot;My name is (Jon)[first_name]&quot;,<br>        &quot;My name is (Ahmed)[first_name]&quot;,<br>        &quot;My first name is (Lisa)[first_name]&quot;<br>      ]<br>    },</pre><p>The includes section is very helpful. It provides you with an opportunity to have your model trained better as you feed it more examples.</p><p>Onexitsection lets the conversational AI app store, remember, and later use the variables we feed it. In this case, we assume the user might say their last name, first name, or both. And we got to store that information for later use. Note that this information will be used in the node you specify right after onexit.</p><p>Moving on to the next nodes.</p><p>In the following digression, our purpose is to program the conversational AI app to ask the user about their concern or problem and then transition to the corresponding nodes (or digressions).</p><pre>digression how_may_i_help<br>{<br>    conditions {on #messageHasData(&quot;first_name&quot;);} <br>    do <br>    {<br>        set $first_name =  #messageGetData(&quot;first_name&quot;)[0]?.value??&quot;&quot;;<br>        set $last_name =  #messageGetData(&quot;last_name&quot;)[0]?.value??&quot;&quot;;<br>        #sayText(&quot;Hi,&quot; + $first_name + &quot; how may I help you out today?&quot;);<br>        wait *;<br>    }<br>}</pre><p>Note that in the onexit section, what comes after set goes to our context up above.</p><p>On the phone call, I mentioned my problem: a broken phone screen. But I haven’t mentioned the model of my iPhone. Naturally, the operator asked me that question and our app shall do the same:</p><pre>node what_phone_model<br>{<br>    do<br>    {<br>        #sayText(&quot;Could you tell me the model of the phone, please?&quot;);<br>        wait *;<br>    }   <br>    transitions<br>    {</pre><pre>        broken_phone_screen: goto broken_phone_screen on #messageHasData(&quot;phone_model&quot;);<br>    }<br>    onexit<br>    {<br>        broken_phone_screen : do {<br>        set $phone_model =  #messageGetData(&quot;phone_model&quot;)[0]?.value??&quot;&quot;;}<br>    }<br>}</pre><p>Next, we need to ask qualifying questions to make the final answer to the first question as accurate as possible.</p><pre>node broken_phone_screen<br>{<br>    do <br>    {     <br>        #sayText(&quot;Gotcha, we&#39;re more than happy to help you with getting the phone screen fixed. I&#39;m gonna need one moment.&quot;); <br>        // a pause in between sentenses for more human-like interaction<br>        #waitForSpeech(1000);<br>        #sayText(&quot;Okay,&quot; + $phone_model + &quot; , let me see. Alright. Do you know if you&#39;ve got Apple Care coverage on you?&quot;);<br>        wait*;<br>    }<br>    transitions<br>    {<br>        no_apple_care_explain: goto no_apple_care_explain on #messageHasIntent(&quot;no&quot;) or #messageHasIntent(&quot;no_apple_care&quot;) or #messageHasIntent(&quot;how_much_for_repair_with_no_apple_care&quot;);<br>    }<br>}</pre><p>Here (in the transitions section and following nodes) I didn’t program the app to have an answer to a “yes, I do have Apple Care coverage” as I wanted to stick to the original conversation as closely as possible for it to be more realistic.</p><p>We got information that the user has no Care coverage. I’m glad I wasn’t asked to buy Apple Care on the spot.</p><p>Pro note: upselling is nice, but always remember that the rule of the thumb and the main purpose of a conversational AI app is to solve the user’s problem as fast and as efficiently as possible.</p><pre>node no_apple_care_explain<br>{<br>    do <br>    {<br>        #sayText(&quot;Alright. So, when it comes to getting Apple Care, it can actually only be purchased within 60 days of originally purchasing the device... Other than that once there&#39;s actual damage to the phone, you&#39;re actually not allowed to purchase Apple care.&quot;);<br>        wait *;<br>    }   <br>    transitions <br>    {<br>        confirm_phone_model: goto confirm_phone_model on #messageHasIntent(&quot;broken_phone_screen_replace_cost&quot;) or #messageHasIntent(&quot;how_much_for_repair_with_no_apple_care&quot;);<br>    }<br>}</pre><p>In the do section we don’t pose any questions. This means the conversation doesn’t have to necessarily go the direction we program it to go in the transitions section. It can go to one of the digressions instead, depending on what the user is thinking.</p><p>In my case, I asked the call center operator how much I’d have to pay to repair the phone screen without having Apple Care on me. And that’s what I wrote in the intents section in the data.json file for that:</p><pre>{<br>  &quot;version&quot;: &quot;v2&quot;,<br>  &quot;intents&quot;: <br>  {<br>    &quot;how_much_for_repair_with_no_apple_care&quot;: {<br>      &quot;includes&quot;: [<br>        &quot;how much does it cost to repair without apple care&quot;,<br>        &quot;how much will it cost to repair without apple care&quot;,<br>        &quot;how much would it cost to repair without apple care&quot;,<br>        &quot;Without apple care how much does it cost &quot;,<br>        &quot;what&#39;s the price to repair the phone with no apple care&quot;,<br>        &quot;what&#39;s the price for reparing phone without apple care&quot;,<br>        &quot;cost without apple care&quot;,<br>        &quot;if I don&#39;t have apple care, how much would it cost me to repare&quot;,<br>        &quot;without having apple care how much the repair&quot;,<br>        &quot;no apple care, how much would it cost to repair the screen&quot;,<br>        &quot;reparing the screen without apple care&quot;<br>      ]<br>    },<br>    &quot;broken_phone_screen_repair_cost&quot;: {<br>      &quot;includes&quot;: [<br>        &quot;how much does it cost to repair a broken screen&quot;,<br>        &quot;how much does it cost to repair a cracked screen&quot;,<br>        &quot;how much would it cost to repair a cracked phone screen?&quot;,<br>        &quot;what&#39;s the price to repair a cracked screen&quot;,<br>        &quot;what&#39;s the price to repair the broken screen&quot;,<br>        &quot;how much does it cost to fix a broken phone screen&quot;,<br>        &quot;cost of broken phone screen&quot;,<br>        &quot;price to fix a cracked screen on the phone&quot;<br>      ]<br>    },</pre><p>Under includes you write words or phrases that you know your user would say in a particular instant. There can be as many variations as you like.</p><p>Next node is all about confirming the phone model the user has already mentioned before. It’s only natural for a human to ask such a confirmation question and by the same token makes the conversational AI sound more natural. And that’s besides providing feedback to the user that we got all the information right.</p><pre>node confirm_phone_model<br>{<br>    do <br>    {     <br>        #sayText(&quot;Yes, I&#39;m pulling that up now...&quot;); <br>        #waitForSpeech(1000);<br>        #sayText(&quot; &quot; + $phone_model + &quot; Is it Pro or Pro Max, you said?&quot;);<br>        wait*;<br>    }<br>    transitions<br>    {<br>        screen_repair_price: goto screen_repair_price on #messageHasIntent(&quot;no&quot;) or #messageHasData(&quot;phone_model&quot;) or #messageHasIntent(&quot;not_pro_pro_max&quot;) or #messageHasIntent(&quot;phone_just_as_i_said&quot;);<br>    }<br>}</pre><p>Next up I have 2 identical phrases mapped in 2 different ways: digression and node.</p><p>Nodes are stable. They let the conversation move from one point to another in a linear way. Digressions, on the other hand, are like conversational zigzags, the conversation could jump from one digression to another and then back (if needed).</p><p>In this particular case, I wrote both because I used the following node in my previous node’s transitions section.</p><pre>node screen_repair_price<br>{<br>    do <br>    {     <br>        #sayText(&quot;Okay gotcha, so that pricing is showing one ninety-nine and that of course plus tax most likely.&quot;); <br>        wait*;<br>    }<br>    transitions<br>    {</pre><pre>    }<br>}</pre><pre>digression screen_repair_price<br>{<br>    conditions {on #messageHasIntent(&quot;pnot_pro_pro_max&quot;) or #messageHasIntent(&quot;phone_just_as_i_said&quot;) and #messageHasData(&quot;phone_model&quot;);} <br>    do <br>    {     <br>        #sayText(&quot;Okay gotcha, so that pricing is showing one ninety-nine and that of course plus tax most likely.&quot;); <br>        wait*;<br>    }<br>}</pre><p>The transitions here are empty. That means the conversation can go to one of the digressions based on the intents triggered.</p><p>Here’s a very simple digression that a customer support representative provides the user with the information on the timing of the repair.</p><pre>digression time_no_parts_available<br>{<br>    conditions {on #messageHasIntent(&quot;time_no_parts_available&quot;);} <br>    do <br>    {     <br>        #sayText(&quot;It depends, but the average time is about three to five business days. And that&#39;s for mailing in the phone instead of going to the store. That being said, I&#39;ve never heard of the screen repair taking longer than this time frame.&quot;); <br>        wait*;<br>    }<br>}</pre><p>And yet another simple digression that will get triggered shall a user ask what the mailing/shipping options are.</p><pre>digression mailing_option_pricing<br>{<br>    conditions {on #messageHasIntent(&quot;mailing_option&quot;) or #messageHasIntent(&quot;mailing_option_pricing&quot;);} <br>    do <br>    {     <br>        #sayText(&quot;Alright, so with shipping, we only ship with UPS or FedEx. That typically costs about 5 to 6 dollars. Could be a bit more expensive, though.&quot;); <br>        wait*;<br>    }<br>}</pre><p>In my real-life conversation with the Apple support representative, I got all the information I required. So it was time for me to move on to my next question about trading in my phone to get a newer version.</p><p>Note that it’s a digression since the question I asked popped out of the blue.</p><p>This digression structure follows the same logic as the digressions above, so should be easy breezy for you.</p><pre>digression trade_in_update<br>{<br>    conditions {on #messageHasIntent(&quot;upgrade_phone&quot;) or #messageHasIntent(&quot;trade_in_phone&quot;);} <br>    do<br>    {<br>        #sayText(&quot;Could you tell me the model of the phone, please?&quot;);<br>        wait *;<br>    }   <br>    transitions<br>    {<br>        trade_in_cost: goto trade_in_cost on #messageHasData(&quot;phone_model&quot;);<br>    }<br>    onexit<br>    {<br>        trade_in_cost : do {<br>        set $owner_phone_model =  #messageGetData(&quot;phone_model&quot;)[0]?.value??&quot;&quot;;}<br>    }<br>}</pre><p>Next up is a very simple node that we program to let the user know how much money that would have as a trade-in credit for the purchase of the new iPhone:</p><pre>node trade_in_cost<br>{<br>    do <br>    {   <br>        #sayText(&quot;So with the &quot; + $owner_phone_model + &quot; in prestine condition you can get up to 500 dollars in trade-in credit. That&#39;s for the next generation phone.&quot;); <br>        wait*;<br>    }<br>    transitions<br>    {</pre><pre>    }<br>}</pre><p>Similarly, here we let the user know how much the final cost of the phone be after the credits are applied:</p><pre>digression new_phone_price_after_discound<br>{<br>    conditions {on #messageHasIntent(&quot;new_phone_price_after_discount&quot;);} <br>    do <br>    {     <br>        #sayText(&quot;The best thing to do is to go to apple dot com because there are different variations to the phone. But the bottom level model with no Apple Care is showing to be 599 dollars after trade it for 128 gigabyte phone. This is a subtotal without tax.&quot;); <br>        wait*;<br>    }<br>}</pre><p>At this point I got both of my questions answered and my conversation with the Apple Support operator ended.</p><pre>digression thats_it_bye<br>{<br>    conditions {on #messageHasIntent(&quot;thank_you&quot;) or #messageHasIntent(&quot;that_would_be_it&quot;);} <br>    do <br>    {     <br>        #sayText(&quot;No problem, happy to help. I hope you have a great rest of your day. Bye!&quot;); <br>        #disconnect();<br>        exit;<br>    }<br>}</pre><p>And that’s it. End of the conversation with all issues tackled the easiest way possible.</p><p>Despite this being my whole conversation, I’ve written out more digressions that solve some of the most common user’s problems:</p><ul><li>Frozen screen</li><li>Phone doesn’t get charged</li><li>Accidental purchase on Apple Store, iTunes, etc</li><li>User forgot their iPhone password</li><li>iPhone got water damage</li></ul><p>On the Apple website, all the abovementioned solutions don’t provide an immediate answer. Instead, the users are prompted to contact chat- or voice-based support. These use cases and so many more can be automated by creating one simple conversational AI app that will tackle all the FAQs in the operator’s stead, saving the company money and time of the operators.</p><h3>Final note</h3><p>Naturally, this is just a demo and is a mirror-like reflection of my own conversation with the Apple Support operator. However, the good news is that this could serve as a solid base for your own customer support conversational AI apps. Or for automating your call center, for example.</p><p>The best thing to do now (and a great opportunity to learn by practicing) is opening the <a href="https://github.com/dasha-samples/apple-customer-support-app">source code</a> and adjusting it to make it fit your criteria.</p><p>And the number one best thing to do is to join <a href="https://community.dasha.ai/">Dasha Developer Community</a> where you’ll meet welcoming like-minded developers who share ideas, questions, and get all the help they need (for free, of course).</p><p>I’m looking forward to seeing your success story in Dasha Developer Community! :) See you there soon!</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=fc96937eb953" width="1" height="1" alt=""><hr><p><a href="https://medium.com/dasha-ai/call-center-automation-how-i-created-a-conversational-ai-app-version-of-my-own-apple-customer-fc96937eb953">Call center automation: how I created a conversational AI app version of my own Apple customer…</a> was originally published in <a href="https://medium.com/dasha-ai">Dasha AI</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[What is Dasha AI?]]></title>
            <link>https://medium.com/dasha-ai/what-is-dasha-ai-c1ba70eb593?source=rss-152e977c1c0a------2</link>
            <guid isPermaLink="false">https://medium.com/p/c1ba70eb593</guid>
            <category><![CDATA[ai]]></category>
            <category><![CDATA[voice-ai]]></category>
            <category><![CDATA[conversational-ai]]></category>
            <category><![CDATA[ai-platform]]></category>
            <category><![CDATA[programming]]></category>
            <dc:creator><![CDATA[Anzhelika Minina]]></dc:creator>
            <pubDate>Wed, 13 Oct 2021 19:28:06 GMT</pubDate>
            <atom:updated>2021-10-13T19:28:06.749Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*6tngFRymy_dmMpWzFnsakQ.png" /><figcaption>What is Dasha AI?</figcaption></figure><blockquote>Originally published on <a href="https://dasha.ai/en-us/blog/what-is-dasha-ai">dasha.ai/en-us/blog/what-is-dasha-ai</a></blockquote><p>You’ve probably heard the terms “conversational AI” and “chatbot” being thrown around. Nowadays, it seems like everyone is getting into the chatbot game, but what is Dasha AI? What does it mean to be a conversational-AI-as-a-service?</p><p>In this article, I’ll explain all of this and more. I’ll also describe the Dasha AI Platform, how it operates, and give you a few examples of what you can do with Dasha.</p><h3>What is Dasha AI?</h3><p>Dasha is a conversational-AI-as-a-service platform that lets you embed realistic voice and text conversational capabilities into your apps or products. By creating a simple conversational AI app, you can create a conversational experience that is natural, intuitive, and engaging. Just like a human, Dasha can hold a conversation with you, ask questions, and help you and/or your company complete tasks that can be and should be automated. To sound indistinguishable from a human, Dasha uses a set of machine learning (ML), natural language processing (NLP), text-to-speech (TTS), speech-to-text (STT).</p><h3>What can you build with Dasha?</h3><p>You could start off by building a simple insurance customer service app:</p><p><a href="https://www.youtube.com/watch?v=46nyWBTSHgs">https://www.youtube.com/watch?v=46nyWBTSHgs</a></p><p>Or an automated receptionist for a hotel front desk:</p><p><a href="https://www.youtube.com/watch?v=2Glp_HC-VHc&amp;t=29s">https://www.youtube.com/watch?v=2Glp_HC-VHc&amp;t=29s</a></p><p>OR you can integrate Dasha with an incident management platform to be able to resolve incidents on the go:</p><p><a href="https://www.youtube.com/watch?v=TeJAFI993_0">https://www.youtube.com/watch?v=TeJAFI993_0</a></p><p>Or build an app to qualify inbound leads and integrate it with Hubspot:</p><p><a href="https://youtu.be/MjKQ2Zibqgk">https://youtu.be/MjKQ2Zibqgk</a></p><h3>How Dasha works</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*G66pe_696oid9VxR.png" /></figure><h3>Architecture overview</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/960/0*EGZtndz8y--Cjtyr.png" /></figure><p>Dasha platform consists of 3 main parts:</p><ul><li>Dasha Cloud</li><li>Dasha SDK</li><li>Dasha Studio</li></ul><h3>Dasha SDK</h3><p>The Dasha SDK (software development kit) is an abstraction layer that lets you connect your locally stored conversational application to the Dasha AI as a service cloud platform where it is executed. It hides (abstracts) communication channels from you and, like other libraries, gives you a programmable Node.js interface that you can use every day. We regularly update Dasha SDK so that the users have the best experience possible.</p><h3>Dasha Cloud</h3><p>Dasha Cloud provides conversational AI as a service. This means that you don’t need to be a data scientist to use machine learning when building Dasha conversational apps. For example with Dasha Cloud, your app uses an NLU based on neural networks that are trained with the data you provide, Speech To Text, Voice Activity Detectors, and many other things. Here is a <a href="https://dasha.ai/en-us/blog/dasha-conversational-ai-as-a-service">detailed overview</a> of these cloud AI services. We use GRPC for communication between SDK and the Dasha Cloud. Here are its advantages:</p><ul><li>You can connect to Dasha from anywhere, from your PC, from a test environment, from another cloud.</li><li>You do not need to have the public IP address, DNS name, TLS Certificate, because the connection is initiated from your side. Dasha has DNS names, TLS Certificates.</li><li>It’s easier to implement A/B testing and scaling of your application.</li><li>It’s secure. You do not need to expose any HTTPS endpoints to the world.</li></ul><h3>Dasha Studio</h3><p><a href="https://marketplace.visualstudio.com/items?itemName=dasha-ai.dashastudio">Dasha Studio</a> is a <a href="https://code.visualstudio.com/">Visual Studio Code</a> extension. It lets you build, train manage and deploy <a href="https://github.com/dasha-samples">Dasha applications</a>. Dasha apps are human-like voice interfaces for CX, support, sales,notifications, smart IVRs or voice interfaces for web and mobile applications and games.You can also add conversational capabilities to websites, games, mobile apps, voice assistants, smart devices, and more with only a few lines of code, from Visual Studio Code. Since Dasha is an open technology you can write Dasha apps without using Dasha Studio but you will lose out on the syntax highlighting, visual graph editor and debugging tools. All code you write resides on your machine and is your intellectual property. The language you’ll be using to write your conversational AI apps is DashaScript which is the native language of the Dasha Cloud Platform.</p><h3>DashaScript</h3><p>DashaScript is an event-driven declarative programming language used to design complex real-world conversations that pass a limited Turing test. Automate call center conversations, recreate the Google Duplex demo in under 400 lines of code or create a no-code GUI for your users that translates into DashaScript code. DashaScript program consists of nodes representing AI actions and transitions between nodes representing conversation events. The program written in DashaScript is called a script. The script is an integral part of your dashaapp that determines its behavior at runtime.</p><h3>Files that comprise your Dasha conversational AI app</h3><p>Take any <a href="https://github.com/dasha-samples">Dasha app</a>. You will see the /app folder - this is where your Dasha application resides. In building Dasha apps in VSCode, you will mainly work with three files:</p><ul><li>main.dsl is the Dasha Scripting Language file. DSL is a domain-specific language, derived from TypeScript and used for the exclusive purpose of describing a conversation. You can read more about it in our documentation.</li><li>data.json is the data set you provide to train the Dasha Cloud neural networks to recognize user intents and identify named entities. I’ll discuss them in detail right below.</li><li>index.js is the server-side JavaScript file to which the Dasha SDK is imported and which launches the contents of the /app folder to the Dasha Cloud to be executed.</li></ul><h3>Join Dasha Developer Community and check Dasha out for yourself</h3><p>Join us in the <a href="https://community.dasha.ai/">Dasha developer community</a> for guidance on your exciting journey of conversational AI app creation. We share thoughts, ideas, problems, and solutions here. See what you can create!</p><p>Godspeed! :)</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=c1ba70eb593" width="1" height="1" alt=""><hr><p><a href="https://medium.com/dasha-ai/what-is-dasha-ai-c1ba70eb593">What is Dasha AI?</a> was originally published in <a href="https://medium.com/dasha-ai">Dasha AI</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[How to integrate Hubspot with Dasha AI using Zapier to automatically qualify leads over the phone]]></title>
            <link>https://medium.com/dasha-ai/how-to-integrate-hubspot-with-dasha-ai-using-zapier-to-automatically-qualify-leads-over-the-phone-c29db9d180c0?source=rss-152e977c1c0a------2</link>
            <guid isPermaLink="false">https://medium.com/p/c29db9d180c0</guid>
            <category><![CDATA[zapier]]></category>
            <category><![CDATA[hubspot-integration]]></category>
            <category><![CDATA[hubspot]]></category>
            <category><![CDATA[conversational-ai]]></category>
            <category><![CDATA[quality-leads]]></category>
            <dc:creator><![CDATA[Anzhelika Minina]]></dc:creator>
            <pubDate>Mon, 11 Oct 2021 13:36:14 GMT</pubDate>
            <atom:updated>2021-10-11T13:36:14.140Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*lfQVeMo9Q4eu9T9iweRF_A.png" /></figure><blockquote>Originally published on <a href="https://dasha.ai/en-us/blog/hubspot-dasha-lead-qualification-integration">dasha.ai/en-us/blog/hubspot-dasha-lead-qual..</a> by Arthur Grishkevich</blockquote><p>Every two minutes that an inbound lead waits to receive a call from your SDR lowers the likelihood of a closed deal by 5%. Instead of waiting for an SDR to call the lead or sending an automated email like everyone else, have a conversational AI app automatically call to the user as soon as they submit the form on your website.</p><p>I previously wrote a <a href="https://dasha.ai/en-us/blog/how-to-qualify-inbound-leads">tutorial</a> on how such an app can be built using Dasha. Today we will integrate this app into a workflow, in less than an hour. We will use the recently deployed official Dasha Zapier integration to do this. For this tutorial we will use the following tools:</p><ol><li><a href="https://daha.ai/">Dasha</a></li><li><a href="https://zapier.com/">Zapier</a></li><li><a href="https://hubspot.com/">Hubspot</a></li></ol><p>Here is the process at a glance:</p><ol><li>We create a stand-alone form on Hubspot with the fields “First Name”, “Email” and “Phone”.</li><li>We point to this form submission as the action that initiates the Zap in Zapier.</li><li>We launch a call with the Dasha Zapier integration and pass Name and Phone as input variables.</li><li>Once the call is complete, we write all the collected information to specially created fields in the Hubspot lead card using another Zapier step.</li></ol><p>Now, let’s get started.</p><h3>Setting up your Dasha app</h3><p>For this tutorial we will reuse code that I wrote previously. It is a conversational AI app that qualifies inbound leads for a company (ACME Software) that sells a software for invoicing automation. At its core, the app checks if now is a good time to talk, asks a few questions and asks when a good time for the user to take a call from an account executive is. Let’s get this application opened in your development environment.</p><p>If you have never used Dasha before, you need to activate your API key. The API key lets you load your conversational application to the Dasha Cloud Platform, where it is executed. If you have your Dasha API key, ignore this part.</p><p>Make sure you have the latest Microsoft Visual Studio Code, Node.js and NPM installed. Dasha Studio is implemented as an extension to VSCode for your convenience. Open Visual Studio Code and install the <a href="https://marketplace.visualstudio.com/items?itemName=dasha-ai.dashastudio">Dasha Studio extension</a> and Dasha Command Line Interface .</p><pre>code --install-extension dasha-ai.dashastudio &amp;&amp; <br>npm i -g &quot;@dasha.ai/cli@latest&quot;</pre><p>Now, run a command to register your Dasha API key. A browser window will pop up and you will need to sign up for an account.</p><pre>dasha account login</pre><p>Afterwards, run to check your API key.</p><pre>dasha account info</pre><p>Now, you need to clone the inbound leads Dasha app and open the folder in which it is located. We will be cloning <a href="https://github.com/dasha-samples/inbound-lead-qualification">this app</a>.</p><pre>git clone https://github.com/dasha-samples/inbound-lead-qualification<br>cd blank-slate-app</pre><p>In building Dasha apps in VSCode, you will mainly work with three files:</p><ol><li>main.dsl is the Dasha Scripting Language file. DSL is a domain specific language, derived from TypeScript and used for the exclusive purpose of describing a conversation. You can read more about it in our <a href="http://docs.dasha.ai/">documentation</a>.</li><li>data.json is the data set you provide to train the Dasha Cloud neural networks to recognize user <a href="https://dasha.ai/en-us/blog/intent-classification">intents</a> and identify <a href="https://dasha.ai/en-us/blog/named-entity-recognition">named entities</a>.</li><li>index.js is the server-side JavaScript file to which the Dasha SDK is imported and which launches the contents of the /app folder to the Dasha Cloud to be executed.</li></ol><p>Note that last bit. “launches the contents of the /app folder to the Dasha Cloud to be executed”. This means that when your Dasha application is launched from Zapier, it only functions as the contents of the /app folder.</p><p>Take a look at the main.dsl file, namely the context variables, beginning at line 7.</p><pre>context <br>{<br>    input phone: string;<br>    input name: string = &quot;&quot;;</pre><pre>    output software: string = &quot;&quot;;<br>    output invoices: string = &quot;&quot;;<br>    output lead_source: string = &quot;&quot;;<br>    output calltimeday: string =&quot;&quot;;</pre><pre>    calltime: string = &quot;&quot;;<br>    callday: string = &quot;&quot;;<br>    callback: string = &quot;&quot;;<br>    visitedNodeTime: boolean = false;<br>    visitedNodeQuestion1: boolean = false;<br>}</pre><p>Note that you are taking Input variables name and phone and outputting variables software, invoices, lead_source and calltimeday. This is a key ingredient to the Zapier integration. We will input the name and phone from the collected form data and output all of our output variables to be saved to the lead card in Hubspot.</p><p>Now, you need to run a sample. It will serve two purposes. You will test the app and secondly, you will register the app in the Dasha Cloud to your account, so that you can refer to it from Zapier in building your integration.</p><pre>npm i <br>npm start 12223334455</pre><p>Where 12223334455 is your phone number in the international format.</p><h3>Setting up Hubspot</h3><p>Log into your Hubspot account. Everything we will do here today can be done with the free Hubspot package. We will do two things:</p><ol><li>Create a stand-alone form</li><li>Add a few custom Contact properties</li></ol><h3>Creating a form</h3><p>On the top menu, hit Marketing &gt; Lead capture &gt; Forms.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*l1m_zNxmNgb7aVH-.png" /></figure><p>Now, click Create Form in the upper right corner, select Standalone Page from the Form menu and click Next. Pick Blank Template and click Next again. Name your form (I named mine “Zapier test form”) and add the following fields: First Name, Last Name, email, Phone number.</p><figure><img alt="" src="https://cdn-images-1.medium.com/proxy/1*b31hiO4ynbDLRrXWEFF4aQ.png" /></figure><p>Click Update &gt; Publish. You will get a pop up with the link to access the form. Copy this link and set it aside, we will need it to test the integration.</p><h3>Create custom fields (properties) in Hubspot</h3><p>Refer back to the output variables in main.dsl. We need to map fields in Hubspot to four output variables. Here is how I named mine in Hubspot:</p><ol><li>calltimeday &gt; call_time_day_test</li><li>invoices &gt; invoices_test</li><li>lead_source &gt; lead_source_test</li><li>software &gt; software_test</li></ol><p>Click on Settings, then Properties and finally Create Property.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*JF6X3YtXWnRqHx-R.png" /></figure><p>Select Object Type &gt; Contact Group: Contact information Label: your name for the property</p><figure><img alt="" src="https://cdn-images-1.medium.com/proxy/1*b31hiO4ynbDLRrXWEFF4aQ.png" /></figure><p>Hit Next, and select field type: single line text.</p><figure><img alt="" src="https://cdn-images-1.medium.com/proxy/1*b31hiO4ynbDLRrXWEFF4aQ.png" /></figure><p>Do the same for the other 3 properties.</p><p>Now, let’s make these properties clearly visible on the lead card, so that you can easily look at the results of the test. Open any contact by going to Contacts &gt; Contacts and clicking on any one of them. Now, scroll a bit down and click “View all properties”.</p><figure><img alt="" src="https://cdn-images-1.medium.com/proxy/1*b31hiO4ynbDLRrXWEFF4aQ.png" /></figure><p>Now, search for each of your newly added properties by their name and click “Add to your view”</p><figure><img alt="" src="https://cdn-images-1.medium.com/proxy/1*b31hiO4ynbDLRrXWEFF4aQ.png" /></figure><p>Great, our Hubspot is ready to go. Before moving to the next step, use that link to the form that you copied earlier to open up the form in a browser window, fill it out and submit. Use your real phone number in the international format (12223334455). This will give us some data for Zapier to use in the next step.</p><h3>Create a custom Zapier Zap integration</h3><p>Log into your <a href="https://zapier.com/">`Zapier</a> account. The Zap we are building is a complex multi step integration. Zapier free users only get to build two step integrations, so you will need to get the 7 day free trial of premium Zapier personal account to build this integration.</p><p>Once sorted, click “Create Zap” in the upper left corner. Name the Zap and search for Hubspot as the first kick off event.</p><figure><img alt="" src="https://cdn-images-1.medium.com/proxy/1*b31hiO4ynbDLRrXWEFF4aQ.png" /></figure><p>Choose “new form submission” for the trigger event and hit “Continue”. In the next step you will need to add a hubspot account. If you’ve never used one, click “+ Connect a new account”. Once connected, click “Continue”. Now you will be asked to set up the Trigger. Choose your Hubspot form name from the drop-down, click refresh fields and click “Continue”. If you have previously filled out the Hubspot form, you should see something like this:</p><figure><img alt="" src="https://cdn-images-1.medium.com/proxy/1*b31hiO4ynbDLRrXWEFF4aQ.png" /></figure><p>Click “Continue” and search for “Dasha” for Step 2. We will now connect Zapier to Dasha Conversational AI API.</p><figure><img alt="" src="https://cdn-images-1.medium.com/proxy/1*b31hiO4ynbDLRrXWEFF4aQ.png" /></figure><p>In the Action Event Drop-down, select “Make a Call” and “Continue”. In the next “Choose account” drop-down, select your account and click “continue”.</p><p>On the next screen, choose “Provided by Dasha” for the dropdown “SIP Trunk to use”, choose “inbound-leads” for the “Application to use” dropdown and select the upper-most value for “Application to use” dropdown. Once you select the application, two new fields should appear: “Phone” and “Name”. These are the input variables required by the Dasha app. Select from the drop down appropriate fields, as collected by the Hubspot form. (Note if the fields “Name” and “Phone” do not appear, hit the “refresh fields” button).</p><figure><img alt="" src="https://cdn-images-1.medium.com/proxy/1*b31hiO4ynbDLRrXWEFF4aQ.png" /></figure><p>Click “Test &amp; Continue”. You should get a call from your Dasha app. You will likely not see proper data appear in Zapier, do not fret, this seems to be the way it works. Once your Zap is complete, it will work as you want it to.</p><p>Click the little plus sign below to go to the next step.</p><p>In order to write data to Hubspot, we need to have the Contact ID number. Since we do not have it, we have to first make a request to Hubspot API to find the contact’s ID using the contact’s email (which we do have). Choose Hubspot under “action”. For dropdown “Action event” look for “Find Contact”. Next, select your Hubspot account. In the Set Up Action menu, select “Contact Information: Email” under “FIrst search property name” and for “First search property value” choose the email field from the first action (Hubspot form submission).</p><figure><img alt="" src="https://cdn-images-1.medium.com/proxy/1*b31hiO4ynbDLRrXWEFF4aQ.png" /></figure><p>Click “Continue” and then “Test &amp; Continue.” Now, click the + sign to create a new action. This final action will let us write the data collected by Dasha to the contact card in Hubspot.</p><p>Select Hubspot and “Action event”: Update contact. Hit “Continue”. Choose your Hubspot account and hit “Continue” again. Under Object ID select the ID value we hav received in the previous step.</p><figure><img alt="" src="https://cdn-images-1.medium.com/proxy/1*b31hiO4ynbDLRrXWEFF4aQ.png" /></figure><p>Now, scroll down to find all the property field names we have previously added to Hubspot: call_time_day_test invoices_test lead_source_test software_test</p><p>For each, select the appropriate output data type from “Step 2 — Make a Call with Dasha”, as such:</p><figure><img alt="" src="https://cdn-images-1.medium.com/proxy/1*b31hiO4ynbDLRrXWEFF4aQ.png" /></figure><p>Hit “Continue” when you are done and “Turn on Zap”.</p><h3>Testing the Hubspot-Dasha-Hubspot Zapier integration</h3><p>Now to the fun part. Fill out your form again. Within 30 seconds you should get a call from Dasha. Give it all the information it asks for. Now, go to your lead card in Hubspot, you should see something like this:</p><figure><img alt="" src="https://cdn-images-1.medium.com/proxy/1*b31hiO4ynbDLRrXWEFF4aQ.png" /></figure><p>In conclusion — you should make changes to the Dasha app, adapt it to the realities of your use case and tell us how it went in the <a href="https://community.dasha.ai/">Dasha community</a>.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=c29db9d180c0" width="1" height="1" alt=""><hr><p><a href="https://medium.com/dasha-ai/how-to-integrate-hubspot-with-dasha-ai-using-zapier-to-automatically-qualify-leads-over-the-phone-c29db9d180c0">How to integrate Hubspot with Dasha AI using Zapier to automatically qualify leads over the phone</a> was originally published in <a href="https://medium.com/dasha-ai">Dasha AI</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Multi-speaker Text To Speech]]></title>
            <link>https://medium.com/dasha-ai/multi-speaker-text-to-speech-4816fad3515b?source=rss-152e977c1c0a------2</link>
            <guid isPermaLink="false">https://medium.com/p/4816fad3515b</guid>
            <category><![CDATA[mls]]></category>
            <category><![CDATA[tts]]></category>
            <category><![CDATA[text-to-speech]]></category>
            <category><![CDATA[ai]]></category>
            <dc:creator><![CDATA[Anzhelika Minina]]></dc:creator>
            <pubDate>Mon, 11 Oct 2021 13:27:37 GMT</pubDate>
            <atom:updated>2021-10-11T13:27:37.719Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*R1n6WvT4AtqTZQ-R-TXdmg.png" /></figure><blockquote>Originally posted on <a href="https://dasha.ai/en-us/blog/multi-speaker-text-to-speech">dasha.ai/en-us/blog/multi-speaker-text-to-s..</a> by Dmitry Obukhov, ML Researcher</blockquote><p>Speech synthesis (Text-to-speech, TTS) is the formation of a speech signal from printed text. In a way, it is the opposite of speech recognition.</p><p>Speech synthesis is used in medicine, dialogue systems, voice assistants and many other business tasks.</p><p>As long as we have one speaker, the task of speech synthesis at first glance looks quite clear. When several speakers come into play, the situation becomes somewhat complicated and other tasks come into play; for example, voice cloning and voice conversion, this will be discussed further in the text.</p><p>This article aims to distinguish in simple terms between these concepts which may seem similar at first glance. I think this write up can serve as a bridge between experts in the field and the people who interact with them.</p><h3>What you came here for</h3><p>In the scheme considered in Figure 1, the speech synthesis model generates a voice recording of one given speaker. This is the speaker on which the model was previously trained.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/512/0*LYnmlzdqa6M1q2ol.png" /></figure><p>If you want to diversify the synthesis with different voices, then you can train several models on the desired voices — but this approach does not scale well, because each model takes tens of hours of pure speech for training. Therefore, it will not be considered.</p><p>Consider a situation in which we want to train AI to speak in the voices of multiple speakers. In a situation where we have several speakers, it is important to take into account the characteristics of each speaker in order to be able to replicate their voice through speech synthesis. To do this, we need to extract voice features in the form of some kind of representation that would be convenient to store and process in a computer — we call this speaker embedding.</p><p>It is important to note that the characteristics of the speaker do not depend on time, in contrast to the text or audio signal. This is usually a fixed-size vector.</p><p>In a perfect world, a single speaker’s embeddings, obtained from different audio samples, will be the same, but for different speakers they will be different. Since it is extremely difficult to achieve such perfection in an imperfect world, as a rule, in speech synthesis the speaker embedding is set in the form of a trainable embedding that depends only on the speaker identifier.</p><p>To understand how and where exactly the information about the speaker is taken into account, you need to look a little into the black box of the speech synthesis model.</p><p>The best modern synthesis systems use neural network architectures, in which two main components can be distinguished: an encoder and a decoder. In a super-simplified scheme, the encoder builds a latent representation based on linguistic features. And the decoder translates this latent representation into acoustic features.</p><p>So, in such approaches, the speaker embedding is usually added to the latent representation, and thus the decoder generates features based on the text and the speaker.</p><p>Now that the information about the speaker has been taken into account, you can build a multi-speaker TTS model that will speak in several desired voices at once.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/512/0*ZMF6NN5DV9O9TMnf.png" /></figure><p>Okay, our TTS speaks with different voices. Cool, but that’s not all!</p><p>Speech synthesis is impossible with voices that are absent from the data on which the model is trained. In other words, the model can only speak in voices that it has heard (been trained on).</p><p>Generally speaking, having a model speak in an arbitrary voice, according to a given pattern, is a more difficult and less accomplished task at the moment, and is called Voice Cloning. In some scenarios, voice cloning implies the ability to use a small limited amount of the target voice — a few minutes or even only several recorded samples (few-shot voice cloning) to train or fine-tune a model to synthesize a voice indistinguishable from these recordings. In other scenarios, it is assumed that the model sees only one recording with the target voice (one-shot voice cloning). Here, speaker adaptation is a straightforward solution that transfers an average voice model to the target voice using the samples of the target speaker while the average voice model is usually built on speech from multiple speakers.</p><p>If we require that the text be specified not in print, but in audio format, then in fact we only need to change the voice in the original audio signal, while preserving the original linguistic content. This task is called Voice Conversion.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/512/0*ygRXg2_dbqVXTqsN.png" /></figure><p>One approach to solve for voice conversion is to recognize the linguistic component of the original audio recording and reproduce it in a given voice. For this reason, such approaches are called ASR + TTS. However, complete recognition of the text usually does not occur; instead, synthesis takes some intermediate representation as input. Also, generative adversarial networks (GAN) and variational autoencoders (VAE) have found wide application in the Voice Conversion task.</p><p>Until now, we have talked about only two components of speech audio — text, i.e. linguistic information, and speaker information.</p><p>Another important characteristic of a speech signal, from the point of view of human perception, is information about the style of pronunciation — emotions, intonation, prosody. It is not at all trivial to understand from the side of the machine what exactly is responsible for the style in the audio signal. Nevertheless, the task of achieving the intonation given in the example in the synthesis is being studied and is called Prosody Transfer.</p><p>A similar problem can arise in terms of Voice Conversion when it is required to transfer not a unique reference audio voice, but a style from given audio. The class of these tasks is called Emotional Voice Conversion.</p><h3>Conclusion</h3><p>I gave a description of the tasks that I consider to be the main ones in the field of multi-speaker speech synthesis.</p><p>Of course, this is far from the entire list of approaches, and each of these is subdivided, and more than once, into smaller ones. Such classifications can be based on specific goals, methods of solution, and possible limitations. I deliberately omit such classifications in order to simplify the presentation.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=4816fad3515b" width="1" height="1" alt=""><hr><p><a href="https://medium.com/dasha-ai/multi-speaker-text-to-speech-4816fad3515b">Multi-speaker Text To Speech</a> was originally published in <a href="https://medium.com/dasha-ai">Dasha AI</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[AI devops squad to the rescue: How to use voice AI to make your site reliability engineering more…]]></title>
            <link>https://medium.com/dasha-ai/ai-devops-squad-to-the-rescue-how-to-use-voice-ai-to-make-your-site-reliability-engineering-more-cbad80389e12?source=rss-152e977c1c0a------2</link>
            <guid isPermaLink="false">https://medium.com/p/cbad80389e12</guid>
            <category><![CDATA[conversational-ai]]></category>
            <category><![CDATA[vscode]]></category>
            <category><![CDATA[site-reliability-engineer]]></category>
            <category><![CDATA[voice-ai]]></category>
            <dc:creator><![CDATA[Anzhelika Minina]]></dc:creator>
            <pubDate>Wed, 06 Oct 2021 18:43:27 GMT</pubDate>
            <atom:updated>2021-10-06T18:43:27.040Z</atom:updated>
            <content:encoded><![CDATA[<h3>AI devops squad to the rescue: How to use voice AI to make your site reliability engineering more efficient</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*P14rs6S8LIdALPxso7HQLg.png" /></figure><blockquote>Originally published on <a href="https://dasha.ai/en-us/blog/voice-AI-site-reliability-engineering">dasha.ai/en-us/blog/voice-AI-site-reliabili..</a> by Arthur Grishkevich</blockquote><p>Voice AI and site reliability engineering? What a ridiculous match up. The two live in completely different worlds. The former in the world of pesky call centers, the latter in the world of ponytailed sys admins.</p><p>I could end my post here if not for one thing. I signed up to give a lecture on using voice AI for site reliability engineering at conf42. Why would I do a stupid thing like that? Because I had a vision of how the two can work together.</p><h3>Intro and definitions</h3><p>In this tutorial we will use the following technologies and tools:</p><ul><li>Webhooks</li><li>HTTPS requests</li><li>Site reliability monitoring (we will use Better Uptime)</li><li>Conversational voice AI (we will use Dasha)</li></ul><p>First, let’s do definitions:</p><ul><li>Site reliability engineering — principles of software engineering applied to infrastucture and operations problems.</li><li>Incident — something bad that happens to your site. In other words, your site was up, an incident happens, now it’s down. Incidents are reported by site reliability monitors.</li><li>Incident acknowledgement — once an incident is reported, it has to be confirmed by a responsible individual (you).</li><li>Incident resolution — after incident is acknowledged, it has to be resolved (that is, if you want your website to be up and running again).</li><li>Conversational AI app — an automated conversation built for a specific need, integrated with tools you already use, powered by AI.</li></ul><h3>What’s wrong with the current incident reporting workflow?</h3><p>Nothing really wrong with it but it can be made more efficient.</p><p>As an example, let’s look at <a href="https://betteruptime.com/">Better Uptime</a>, since this is what we will be integrating with. You add a domain for Better Uptime to monitor. Every 30 seconds it sends an HTTP and ping request to the website. If the website is down, an incident is created. At this point, you are notified either via email, SMS, phone call or by sending out a webhook wherever you specify.</p><p>Once the incident is created, it needs to go through two more lifecycle stages. Stage one is — acknowledgement, the responsible user need to acknowledge the incident happened. The next stage is resolution — the same user or a different user with access to this monitor needs to set the incident as resolved. After its resolution, Better Uptime checks again to see if the website is indeed up.</p><p>How do I think this can be made more efficient? By adding a devops conversational AI app that will call the user when an incident happens, provide updates to the user from additional services (Kubernetes cluster, TLS certificates, etc.), be able to notify co-workers and finally, set the acknowledge and resolve statuses in Better Uptime. There are two main use cases/benefits I see here:</p><ol><li>The responsible user may be away from their machine, as the incident happens. They can check some of the systems from their phone and maybe even resolve the issue but why force them to waste time logging into Better Uptime if they can just put the phone on speaker and resolve everything with the AI app?</li><li>The user might indeed be at their computer but to resolve the incident would have to log onto a half dozen websites and click tons of things. With the AI app they will be able to get all info/data they need through a simple voice question, as well as set appropriate incident statuses in Better Uptime.</li><li>And I’m sure you will find a dozen more ways in which this tech would be useful in your devops workflow.</li></ol><p>“But Arthur,” I hear you shout “you said that Better Uptime can notify the responsible user through a phonecall when the incident happens. All on its own!”</p><p>I certainly did say that. But it is not a conversational phone call. It’s a very simple “Hi there, you had an incident. Bye.” call. Which is still great. But can be made much better.</p><p>Here is what I built:</p><p><a href="https://www.youtube.com/watch?v=TeJAFI993_0">Embedded content: https://www.youtube.com/watch?v=TeJAFI993_0</a></p><p>And here is how you can build it in ten easy steps to build our SRE conversational AI for devops:</p><ol><li>Create a Better Uptime account.</li><li>Activate Dasha API key.</li><li>Create a server for Better Uptime to monitor.</li><li>Create a server to listen to webhooks from Better Uptime and launch the Dasha app.</li><li>Build a Dasha conversational app that will call to you when an incident is created; set up external functions and HTTPS requests to Better Uptime.</li><li>Set up nodemailer to email yourself a transcript of the conversation.</li><li>Set up .env.</li><li>Set up a tunnelling service to your localhosts.</li><li>Set up the monitors and webhooks on Better Uptime.</li><li>Test.</li></ol><p>I urge you to follow the tutorial and build this thing on your own. Yet if you want it, here is the <a href="https://github.com/dasha-samples/site-reliability-monitor-handler">source code</a>.</p><h3>1. Create a Better Uptime Account</h3><p>First off, you’ll need a Better Uptime account. Unfortunately, to send webhooks out you will need a paid account. And we will need to send webhooks. There are at least a dozen Better Uptime alternatives that I was able to find, some of which might offer free webhooks. I’m using Better Uptime because we already use it for our SRE workflows at Dasha.</p><p>So, step 1, go to <a href="https://betteruptime.com/">Better Uptime</a> and register an account.</p><h3>2. Activate Dasha API key</h3><p>Now, you need to activate your Dasha API key. If you have your Dasha API key, ignore this part. Open Visual Studio Code and install the Dasha Studio extension and Dasha Command Line Interface .</p><pre>code --install-extension dasha-ai.dashastudio &amp;&amp; <br>npm i -g &quot;@dasha.ai/cli@latest&quot;</pre><p>Now, run a command to register your Dasha API key. A browser window will pop up and you will need to sign up for an account.</p><pre>dasha account login</pre><p>Afterwards, run to check your API key.</p><pre>dasha account info</pre><p>Now, you need to clone a blank Dasha app and open the folder in which it is located. We will be cloning <a href="https://github.com/dasha-samples/blank-slate-app">this app</a>.</p><pre>git clone https://github.com/dasha-samples/blank-slate-app<br>cd blank-slate-app<br>npm i</pre><h3>3. Create a server for Better Uptime to monitor</h3><p>In the root of the folder you’ve got open in VSCode, create a new Node.js file. You can name it anything, I named it helloworld.js.</p><p>Use this code for the super simple server:</p><pre>const http = require(&#39;http&#39;);</pre><pre>const hostname = &#39;127.0.0.1&#39;;<br>const port = 3000;</pre><pre>const server = http.createServer((req, res) =&gt; {<br>  res.statusCode = 200;<br>  res.setHeader(&#39;Content-Type&#39;, &#39;text/plain&#39;);<br>  res.end(&#39;Hello World. Server is up.&#39;);<br>});</pre><pre>server.listen(port, hostname, () =&gt; {<br>  console.log(&quot;Server running at http://${hostname}:${port}/&quot;);<br>});</pre><p>Now, launch it.</p><pre>node helloworld.js</pre><h3>4. Create a server to listen to webhooks from Better Uptime and launch the Dasha app</h3><p>Open index.js and delete all code. We will start from scratch here. We will do much more than just create the webhook listener server. We will build a Node.js application that will launch your Dasha AI conversational app, collect data from the app, send HTTPS requests to Better Uptime when your Dasha app requires it and email a formatted transcript of the conversation to your specified email address.</p><p>We will use Express.js to run the server. We will also use fs, Dasha SDK, body-parser, json2html, axios and dotenv. Let’s start off with the declarations and go ahead and create the server. :</p><pre>const dasha = require(&quot;@dasha.ai/sdk&quot;);<br>const fs = require(&quot;fs&quot;);<br>const express = require( &quot;express&quot; );<br>const bodyParser = require(&quot;body-parser&quot;);<br>const hook = express();<br>const PORT = 1919;<br>const json2html = require(&quot;node-json2html&quot;);<br>const axios = require(&quot;axios&quot;).default;</pre><pre>require(&quot;dotenv&quot;).config();</pre><pre>hook.get(&#39;/&#39;, (req, res) =&gt; {<br>  res.setHeader(&quot;Content-Type&quot;, &quot;text/plain&quot;);<br>  res.end(&quot;Hello World. Server running on port &quot; + PORT + &quot;. Listening for incidents on http://1543a913a2c7.ngrok.io As soon as incident is identified, I will initiate a call from Dasha AI to ackgnowledge or address the incident. &quot;);<br>})</pre><pre>hook.use(bodyParser.json());<br>hook.listen(PORT, () =&gt; console.log(&quot;🚀 Server running on port ${PORT}&quot;));</pre><p>Now, let’s create the webhook listener. Note that Better Uptime sends a webhook out whever an incident is created, acknowledged or resolved. We only need to launch the AI call when the incident is created. I got the JSON structure above from the Better uptime <a href="https://docs.betteruptime.com/api/incidents-api">Incidents API documentation</a>. Please refer to the comments:</p><pre>hook.post(&quot;/hook&quot;, async(req, res) =&gt; <br>{<br>  console.log(req.body); // Call your action on the request here<br>  res.status(200).end(); // Responding is important<br>  // save incidentID from JSON as const incidentId <br>  // we will need it to send acknowledged and resolved requests to Better Uptime <br>  incidentId = req.body.data.id; <br>  // we also save acknowledged and resolved statuses.<br>  // we will need these to keep Dasha from calling you when your incident is acknowledged or resolved<br>  acknowledged = req.body.data.attributes.acknowledged_at;<br>  resolved = req.body.data.attributes.resolved_at;<br>  // log the statuses <br>  console.log(&quot;incidentID: &quot; + incidentId);<br>  console.log(&quot;acknowledged: &quot; + acknowledged);<br>  console.log(&quot;resolved: &quot; + resolved);</pre><pre>  // Better Uptime sends out webhooks on created, acknowledged, resolved statuses for each incident <br>  // we only need to run the Dasha app when the incident is created, thus we do the following: <br>  if (acknowledged != null &amp;&amp; resolved == null) <br>  {<br>    console.log(&quot;Incident &quot; + incidentId + &quot; acknowledged.&quot;);<br>  }<br>  else if (acknowledged != null &amp;&amp; resolved != null)<br>  {<br>    console.log(&quot;Incident &quot; + incidentId + &quot; resolved.&quot;);<br>  }<br>  else <br>  { <br>    console.log(&quot;Incident &quot; + incidentId + &quot; created. Expect a call from Dasha.&quot;);<br>    // Launch the function running the Dasha app  <br>    await calldasha(incidentId);<br>  }<br>});</pre><p>Now, let’s define the Dasha App function. Note the // external functions begin and // external functions end. We will add code for external functions here as we get to this point in creating our Dasha conversation.</p><p>Please refer to the comments:</p><pre>async function calldasha(incidentId) <br>{<br>  const app = await dasha.deploy(&quot;./app&quot;);</pre><pre>  // external functions begin </pre><pre>  // external functions are called from your Dasha conversation in the body of main.dsl file <br>  // external functions can be used for calculations, data storage, in this case, to <br>  // call external services with HTTPS requests. You can call an external function from DSL<br>  // in your node.js file and have it do literally anything you can do with Node.js.</pre><pre>  // external functions end</pre><pre>  await app.start();</pre><pre>  const conv = app.createConversation({ <br>    phone: process.env.phone, <br>    name: process.env.name <br>  });</pre><pre>  conv.audio.tts = &quot;dasha&quot;;</pre><pre>  if (conv.input.phone === &quot;chat&quot;) {<br>    await dasha.chat.createConsoleChat(conv);<br>  } else {<br>    conv.on(&quot;transcription&quot;, console.log);<br>  }</pre><pre>  if (conv.input.phone !== &quot;chat&quot;) conv.on(&quot;transcription&quot;, console.log);</pre><pre>  const result = await conv.execute();</pre><pre>  console.log(result.output);</pre><pre>  //create directory to save transcriptions<br>  fs.mkdirSync(&quot;transcriptions&quot;, { recursive: true } );  <br>  var transcription = JSON.stringify(result.transcription);</pre><pre>  //save the transcript of the conversation in a file  <br>  // or you can upload incident transcriptions to your incident management system here<br>  fs.writeFileSync(&quot;transcriptions/&quot; + (incidentId??&quot;test&quot;) + &quot;.log&quot;, transcription ); </pre><pre>  // and  email it to yourself<br>  var transcript = json2html.render(transcription, {&quot;&lt;&gt;&quot;: &quot;li&quot;, &quot;html&quot;:[<br>    {&quot;&lt;&gt;&quot;: &quot;span&quot;, &quot;text&quot;: &quot;${speaker} at ${startTime}: ${text} &quot;}<br>    ]});<br>  sendemail(transcript);</pre><pre>  await app.stop();<br>  app.dispose();<br>}</pre><pre>node index.js</pre><p>To test. Your server should run. When you set the webhook address up on Better Uptime and have this server running, a Dasha conversation will be initiated every time a new incident is created. Let’s build the Dasha app.</p><h3>5. Build a Dasha conversational app that will call to you when an incident is created</h3><p>Open main.dsl. This is a Dasha Scripting Language file. DSL is a domain specific language, derived from TypeScript and used for the exclusive purpose of describing a conversation. You can read more about it in our <a href="https://docs.dasha.ai/en-us/default/dasha-script-language/">documentation</a>.</p><p>As always, we start off with declarations. Let’s declare input variables and external functions.</p><pre>context <br>{<br>    input phone: string;<br>    input name: string;<br>}</pre><pre>// declare external functions here <br>external function acknowledge(): string;<br>external function resolve(): string;<br>external function getstatusof( what:string? ): string;</pre><p>Next, we have the AI app wait for speech (the user should say “hello” or something of the sort), then greet the user, inform of the incident and wait for instructions.</p><pre>start node root {<br>    do {<br>        #connectSafe($phone);<br>        wait *;<br>    }<br>    transitions {<br>        hello: goto hello on true;        <br>    }<br>}</pre><pre>node hello {<br>    do { <br>        #sayText(&quot;Hello &quot; + $name + &quot;! This is Dasha calling you regarding your website. There has been an incident. &quot;); <br>        #sayText(&quot;You can acknowledge or resolve the incident right on the call with me. &quot;); <br>        #sayText(&quot; Please note, I will listen and take notes until you mention that you are ready to resolve or acknowledge. &quot;, interruptible:true);<br>        wait *;<br>    }<br>    transitions {<br>    }<br>}</pre><p>Note that I said “wait for instructions.” In this case, the instructions will come in the form of a digression. A digression is a node in Dasha Scripting Language which does not necessarily flow from a previous node but can be called up at absolutely any point in the conversation. The digression becomes active when a specific intent is identified in the user’s reply. Intents are defined as a data set in data.json used to train the <a href="https://dasha.ai/en-us/blog/dasha-conversational-ai-as-a-service">Dasha Cloud</a> neural network. Digressions are also useful in giving your app a human-like feel. You can read more about digressions in <a href="https://dasha.ai/en-us/blog/using-digressions">this post</a>.</p><p>In this application we will have three key digressions for three key actions that the user can perform.</p><ol><li>Acknowledge the incident.</li><li>Resolve the incident.</li><li>Ignore the incident.</li></ol><p>We will also add four additional digressions to make the conversation more efficient:</p><ol><li>Ask Dasha to wait while the user thinks something over or looks something up.</li><li>Ask Dasha to repeat what she last said.</li><li>Easter egg digression “oops”.</li><li>Journal node — lets Dasha know to not react unless an intent is identified. This lets us passively record any notes that the user makes to self, as he is resolving the incident.</li><li>Get status of vital services. *</li></ol><p>There are two steps to implementing digressions — define intents (create data set) in data.json and write out the code for the digressions in main.dsl. We will also need to write external functions in our index.js.</p><h3>Creating the data set to train the Dasha neural network</h3><p>Since digressions are activated by intents, we need to define our intents training data set in data.json. Once you run your conversational AI app, your data.json file is loaded in the Dasha Cloud, where it is used to train the neural network. The &quot;includes&quot; section for each intent is where you provide a set of phrases on which the neural net is trained to then recognize the user intent. You can (and should) read up on intents in the <a href="https://dasha.ai/en-us/blog/intent-classification">blog post</a> by Ilya Ovchinnikov, the ML team lead who built out this engine for Dasha. Open up the file and delete everyting in it. Paste the code below in.</p><pre>{<br>  &quot;version&quot;: &quot;v2&quot;,<br>  &quot;intents&quot;: <br>  {<br>    &quot;yes&quot;: {<br>      &quot;includes&quot;: [<br>        &quot;yes&quot;, &quot;sure&quot;, &quot;yep&quot;, &quot;I confirm&quot;, &quot;confirmed&quot;, &quot;I do&quot;, &quot;yeah&quot;, &quot;that&#39;s right&quot;<br>      ],<br>      &quot;excludes&quot;: []<br>    },<br>    &quot;no&quot;: {<br>      &quot;includes&quot;: [<br>      ]<br>    },<br>    &quot;repeat&quot;: {<br>      &quot;includes&quot;: [<br>      ]<br>    },<br>    &quot;acknowledge&quot;: {<br>      &quot;includes&quot;: [<br>        &quot;I acknowledge the incident&quot;, &quot;I can acknowledge the incident&quot;, &quot;I do acknowledge the incident&quot;,<br>        &quot;acknowledge&quot;, &quot;acknowledge please&quot;, &quot;incident acknowledged&quot;<br>      ]<br>    },<br>    &quot;resolve&quot;: {<br>      &quot;includes&quot;: [<br>      ]<br>    },<br>    &quot;ignore&quot;: {<br>      &quot;includes&quot;: [<br>      ]<br>    },<br>    &quot;oops&quot;: {<br>      &quot;includes&quot;: [<br>      ]<br>    },<br>    &quot;wait&quot;: {<br>      &quot;includes&quot;: [<br>      ]<br>    },</pre><pre>    &quot;status&quot;: {<br>      &quot;includes&quot;: [<br>        &quot;What is the status of (kubernetes)[statusentity]&quot;,<br>        &quot;Dasha, what&#39;s the status of (kubernetes)[statusentity] and (TLS)[statusentity]&quot;,<br>        &quot;What&#39;s the status of (kubernetes)[statusentity]&quot;,<br>        &quot;Tell me about the status (healthcheck)[statusentity]&quot;,<br>        &quot;Give me an update on the status of (healthcheck)[statusentity]&quot;,<br>        &quot;Status (healthcheck)[statusentity] and (TLS)[statusentity]&quot;,<br>        &quot;Dasha, let&#39;s look at the status of (TLS)[statusentity]&quot;<br>      ]<br>    }</pre><pre>  },</pre><pre>  &quot;entities&quot;: {<br>    &quot;statusentity&quot;: {<br>      &quot;open_set&quot;: false,<br>      &quot;values&quot;: [<br>        {<br>          &quot;value&quot;: &quot;kubernetes&quot;,<br>          &quot;synonyms&quot;: [<br>            &quot;Kubernetes cluster&quot;, &quot;cooper netease&quot;, &quot;kubernetes&quot;, &quot;Kubernetes instances&quot;, &quot;for burnett&quot;, &quot;Kubernetes deploy&quot;<br>          ]<br>        },<br>        {<br>          &quot;value&quot;: &quot;TLS&quot;,<br>          &quot;synonyms&quot;: [ &quot;SSL&quot;, &quot;TLS/SSL&quot;, &quot;TLS certificate&quot;, &quot;certificate&quot;, &quot;SSL certificate&quot;<br>          ]<br>        },<br>        {<br>          &quot;value&quot;: &quot;healthcheck&quot;,<br>          &quot;synonyms&quot;: [ &quot;site healthchecks&quot;, &quot;health check &quot;, &quot;site health checks&quot;, &quot;health checks&quot;<br>          ]<br>        }<br>      ],<br>      &quot;includes&quot;: []<br>    }<br>  }<br>}</pre><p>You will see here a few complete intents (&quot;acknowledge&quot;, &quot;yes&quot;) that you will need to activate your digressions. The format is simple to follow - intent name is followed by a list of phrases (&quot;includes&quot;) the user might use to signify their intent. You can follow this same format to specify phrases to define intents for the other digressions listed above.</p><p>Note the &quot;status&quot; digression. It is a compound intent and relies on <a href="https://dasha.ai/en-us/blog/named-entity-recognition">named entities</a> to function.</p><p>In this case, we are looking to identify two things within the user’s phrase. One is the intent to “check the status of something” and the other is what the “something” is. The “something” is defined by named entities. Using named entity recognition, the neural network powering your app in the Dasha Cloud extracts important data from the user’s speech.</p><p>You can always refer to the <a href="https://dashaai.hashnode.dev/">app source code</a> to get a copy of my data.json file.</p><h3>Writing the digressions in main.dsl</h3><pre>// acknowledge flow begins <br>digression acknowledge {<br>    conditions { on #messageHasIntent(&quot;acknowledge&quot;); }<br>    do {<br>        #sayText(&quot;Can you please confirm that you want me to acknowledge the incident?&quot;);<br>        wait *;<br>    } <br>    transitions {<br>        acknowledge: goto acknowledge_2 on #messageHasIntent(&quot;yes&quot;);<br>        donotacknowledge: goto waiting on #messageHasIntent(&quot;no&quot;);<br>    }<br>}</pre><pre>node acknowledge_2 {<br>    do {<br>        external acknowledge();<br>        #sayText(&quot;Got it. I have set the status in Better Uptime as acknowledged. The next step is to resolve the incident.&quot;);<br>        wait *;<br>    } <br>    transitions<br>    {<br>    }<br>}</pre><pre>node waiting {<br>    do{<br>        #sayText(&quot;Okay. I will wait for your instructions then. &quot;);<br>        wait *;<br>    } <br>}</pre><p>The code above is for __digression acknowledge__ use it as an example to write code for the digressions resolve and ignore. Note that you do not need to recreated the node waiting - you only need to define it once and can call this node from other nodes or digressions, as needed.</p><h3>Getting your node.js external functions to call external APIs</h3><p>Note the external acknowledge();. Here we are calling out to the external function acknowledge which we have defined in the beginning of main.dsl.</p><p>As you recall, external functions call out to a specific function in index.js. We even left some space in our index.js file specifically for our external functions.</p><p>You can go ahead and paste the following code into your index.js between // external functions begin and external functions end:</p><pre>// external functions are called from your Dasha conversation in the body of main.dsl file <br>  // external functions can be used for calculations, data storage, in this case, to <br>  // call external services with HTTPS requests. You can call an external function from DSL<br>  // in your node.js file and have it do literally anything you can do with Node.js.</pre><pre>  // External function. Acknowledge an incident in Betteruptime through posting HTTPS  <br>  app.setExternal(&quot;acknowledge&quot;, (args, conv) =&gt; <br>  {<br>    // this keeps the code from throwing an error if we are testing with blank data<br>    if (incidentId === null)<br>    return;</pre><pre>    const config = {<br>      // remember to set your betteruptimetoken in .env<br>      headers: { Authorization: &quot;Bearer &quot; + process.env.betteruptimetoken }<br>    };</pre><pre>    const bodyParameters = { key: &quot;value&quot; };</pre><pre>    axios.post( &quot;https://betteruptime.com/api/v2/incidents/&quot; + incidentId + &quot;/acknowledge&quot;, bodyParameters, config)<br>    .then(console.log)<br>    .catch(console.log);</pre><pre>  });</pre><pre>  // External function. Resolve an incident in Betteruptime through posting HTTPS  <br>  app.setExternal(&quot;resolve&quot;, (args, conv) =&gt; <br>  {  <br>    if (incidentId === null)<br>    return;</pre><pre>    const config = {<br>      headers: { Authorization: &quot;Bearer &quot;+ process.env.betteruptimetoken }<br>    };</pre><pre>    const bodyParameters = { key: &quot;value&quot; };</pre><pre>    axios.post( &quot;https://betteruptime.com/api/v2/incidents/&quot; + incidentId + &quot;/resolve&quot;, bodyParameters, config)<br>    .then(console.log)<br>    .catch(console.log);<br>  });</pre><pre>  // external function getting status of additional services <br>  app.setExternal(&quot;getstatusof&quot;, (args, conv) =&gt; <br>  {<br>    switch (args.what)<br>    {<br>      case &quot;kubernetes&quot;:<br>        return &quot;Kubernetes is up and running&quot;;<br>      case &quot;healthcheck&quot;:<br>        return &quot;Site health checks are not responding&quot;;<br>      case &quot;TLS&quot;:<br>        return &quot;TLS Certificate is active&quot;;<br>    }<br>  });</pre><p>Take a look at app.setExternal(&quot;acknowledge&quot;). As you can see we are making an HTTPS post request to the Better Uptime API and are using the incidentId variable we collected when we first got the inbound webhook notifying us of incident creation. I referred to the Better Uptime <a href="https://docs.betteruptime.com/api/incidents-api">API documentation</a> for this.</p><h3>Additional digressions in your Dasha app</h3><p>Go back to your main.dsl. We need to add a few more digressions to make our app complete. Append these to your main.dsl file</p><pre>// get status of vital services <br>digression status  {<br>    conditions { on #messageHasIntent(&quot;status&quot;) &amp;&amp; #messageHasData( &quot;statusentity&quot; ); }<br>    do {<br>        for (var e in #messageGetData(&quot;statusentity&quot;) ){ <br>            var result = external getstatusof(e.value );<br>            #sayText( result );<br>        }<br>        return;<br>    }<br>}</pre><p>Digression status becomes activated on that complex intent/named entity hybrid we built. If Intent &quot;status&quot; is identified AND the message carries data &quot;statusentity&quot;, we collect the data (note: #messageGetData collects data as an array) and send each data point to external function getstatusof which, in turn, returns a string which Dasha pronounces out to the user. Please look at the app.setExternal(&quot;getstatusof&quot;) in the JavaScript code above. This function returns dummy data for the demo. Obviously in production, you would want to call out to specific end points to get realistic data here.</p><p>Now, add this code:</p><pre>// additional digressions <br>digression @wait {<br>    conditions { on #messageHasAnyIntent(digression.@wait.triggers)  priority 900; }<br>    var triggers = [&quot;wait&quot;, &quot;wait_for_another_person&quot;];<br>    var responses: Phrases[] = [&quot;i_will_wait&quot;];<br>    do {<br>        for (var item in digression.@wait.responses) {<br>            #say(item, repeatMode: &quot;ignore&quot;);<br>        }<br>        #waitingMode(duration: 70000);<br>        return;<br>    }<br>    transitions {<br>    }<br>}</pre><pre>// this digression tells Dasha to only respond to user replies that trigger an intent<br>// this is a very helpful little piece of code for our particular use case because <br>// the user might talk to themselves as they are resolving the incident<br>// everyting the user says to themselves is logged (thus: journal) in the transcript <br>// which can then be appended to the incident report <br>digression journal {<br>    conditions { on true priority -1; }<br>    do {<br>        return;<br>    }<br>}</pre><pre>digression repeat {<br>    conditions { on #messageHasIntent(&quot;repeat&quot;); }<br>    do {<br>        #repeat();<br>        return;<br>    }<br>} </pre><pre>digression oops {<br>    conditions { on #messageHasIntent(&quot;oops&quot;); }<br>    do {<br>        #sayText(&quot;What happened &quot; + $name + &quot;? Did you ue the wrong terminal again?&quot;);<br>        return;<br>    }<br>}</pre><p>Digressions wait and repeat help progress the conversation along. The user can ask Dasha to wait a minute, or to repeat her last phrase. The digression oops is an easter egg, activated with the intent words &quot;oops&quot;, &quot;crap&quot;, or your favorite exclamation. The digression journal tells the Dasha app to stay quiet until it hears the user say one of the specificly defined intents. Everything that the user says before the intent is loggled into the transcript. This digression lets the user dictate notes to Dasha which are then collated into the transcript. The transcript can be attached to your incident management system. In this case, we will email the transcript to a specified address.</p><h3>6. Set up nodemailer to email yourself a transcript of the conversation</h3><p>Look at the last 11 lines of code in the function used for launching your Dasha app that you added to your index.js earlier. Dasha conversation transcripts are JSON. In this code, we are formatting the JSON as HTML and emailing it. To email the code, we call the sednemail(transcript) function.</p><p>Let’s now add this function to our index.js application.</p><pre>function sendemail(transcript)<br>{<br>  const nodemailer = require(&#39;nodemailer&#39;);<br>    require(&#39;dotenv&#39;).config();</pre><pre>  var transporter = nodemailer.createTransport(<br>  {<br>      service: &#39;gmail&#39;,<br>      auth: {<br>                // be sure to specify the credentials in your .env file<br>        user: process.env.gmailuser,<br>        pass: process.env.gmailpw<br>      }<br>  });</pre><pre>  var mailOptions = <br>  {<br>    from: process.env.gmailuser,<br>    to: process.env.sendto,<br>    subject: &#39;Incident conversation transcript&#39;,<br>    html: &#39;&lt;h2&gt;Conversation transcript:&lt;/h2&gt;&lt;p&gt;&#39; + transcript + &#39;&lt;/p&gt;&#39;<br>  };</pre><pre>  transporter.sendMail(mailOptions, function(error, info)<br>  {<br>      if (error) {<br>          console.log(error);<br>      } else {<br>          console.log(&#39;Email sent: &#39; + info.response);<br>      }<br>  });<br>}</pre><p>This code will send an email from your Gmail account to the specified address.</p><h3>7. Set up .env</h3><p>You will need to create .env file named “.env” (make sure you have dotenv installed).</p><p>In this file you will need to define the following tokens and/or credentials:</p><pre>betteruptimetoken = <br>name = <br>phone =<br>sendto = <br>gmailuser = <br>gmailpw =</pre><p>betteruptimetoken is, expectedly, your Better Uptime API token. If you are using a different service, rename the enviornment variable accordingly. If you are using Better Uptime, you can find the token by going to team members &gt; configure team and scroll halfway down.</p><p>name is quite literally the name which Dasha will use to refer to you.</p><p>phone is the phone number Dasha will call you on. As with name, you are welcome to push this data to Dasha externally.</p><p>sendto is the email address to which you want to send your transcript.</p><p>gmailuser is your Gmail email address.</p><p>gmailpw is your Gmail password.</p><p>There is a bit of nuance about those last two. You will need to have additional security disabled on your Gmail account to use simple auth like this. Your other option is writing our OAuth2 authentification as per this <a href="https://stackoverflow.com/questions/26196467/sending-email-via-node-js-using-nodemailer-is-not-working">StackOverflow thread</a>.</p><p>At the end of this step, you should have all needed environment variables defined in your .env file.</p><h3>8. Set up a tunnelling service to your localhosts.</h3><p>Open split terminals in your VSCode. In one, run:</p><pre>node helloworld.js</pre><p>In the other, run:</p><pre>node index.js</pre><p>Congrats, you should have two servers running. helloworld.js on port 3000 and index.js on port 1919. They are running as localhosts which will not do because we need them to interact with the web. To solve this you can use a local tunnel. I used Ngrok but you can use any other one.</p><p>To use Ngrok, you will need to sign up and follow these <a href="https://dashboard.ngrok.com/get-started/setup">instructions</a>. Once you have got Ngrok installed and authorized, open two terminal windows (I did outside of VSCode) and run this command in one:</p><pre>./ngrok http 3000</pre><p>and this command in the other terminal:</p><pre>./ngrok http 1919</pre><p>This will create two internet domain names which will tunnel to your locally hosted servers. Note: you may have to purchase the paid Ngrok subscription for two tunnels.</p><h3>9. Set up the monitors and webhooks on Better Uptime</h3><p>Let’s assume that Ngrok gave you two domain names:</p><ol><li><a href="http://12345.ngrok.io/">12345.ngrok.io</a> — localhost: 3000 (helloworld.js) (the server we are monitoring)</li><li><a href="http://67890.ngrok.io/">67890.ngrok.io</a> — localhost: 1919 (index.js) (the server which catches webhooks)</li></ol><p>Go to <a href="https://betteruptime.com/">Better Uptime</a> &gt; Monitors &gt; Create Monitor</p><p>Enter “<a href="http://12345.ngrok.io/">12345.ngrok.io</a>” into the field “URL to monitor”. Now, uncheck all boxes under On-call escalation (Call, send sms, send e-mail, push notification). Finally, hit Create monitor.</p><p>Go back to the monitors page and you should see your monitor turn green.</p><p>Now, go to Integrations &gt; Exporting Data &gt; Configure Webhooks &gt; Add</p><p>Give your webhook a name and list this Webhook URL: <a href="http://67890.ngrok.io/hook">67890.ngrok.io/hook</a></p><p>You can hit send test webhook and watch the Terminal in your Dasha app. It should show something like this:</p><h3>10. Test the entire app</h3><p>Now, to launch a full on call, the only thing you need to do is kill your helloworld server. Ctrl+с in the VSCode terminal running the helloworld.js app and you will get an inbound webhook. Watch the terminal for index.js and you will see a Dasha call initiated. The call will arrive on your phone ASAP, so make sure it is not in do not disturb mode.</p><p>Congratulations! You have just built a conversational AI app for site reliability engineering automation.</p><p>If you need it, here is the link to the <a href="https://github.com/dasha-samples/site-reliability-monitor-handler">source code</a> again.</p><p>Let us know in the <a href="https://community.dasha.ai/">Dasha community</a> how you did with this app.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=cbad80389e12" width="1" height="1" alt=""><hr><p><a href="https://medium.com/dasha-ai/ai-devops-squad-to-the-rescue-how-to-use-voice-ai-to-make-your-site-reliability-engineering-more-cbad80389e12">AI devops squad to the rescue: How to use voice AI to make your site reliability engineering more…</a> was originally published in <a href="https://medium.com/dasha-ai">Dasha AI</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[How to connect jambonz with Dasha AI]]></title>
            <link>https://medium.com/dasha-ai/how-to-connect-jambonz-with-dasha-ai-d145ce395db4?source=rss-152e977c1c0a------2</link>
            <guid isPermaLink="false">https://medium.com/p/d145ce395db4</guid>
            <category><![CDATA[code]]></category>
            <category><![CDATA[coding]]></category>
            <category><![CDATA[conversational-ai]]></category>
            <dc:creator><![CDATA[Anzhelika Minina]]></dc:creator>
            <pubDate>Tue, 05 Oct 2021 16:19:54 GMT</pubDate>
            <atom:updated>2021-10-05T16:19:54.499Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*aF_H24DBPH8Kzn9AleR4CA.jpeg" /></figure><blockquote>Originally posted on <a href="https://dasha.ai/en-us/blog/how-connect-jambonz-dasha-AI">dasha.ai/en-us/blog/how-connect-jambonz-das..</a></blockquote><p>Note from the editor: this is a repost of David Horton’s <a href="https://blog.jambonz.org/how-to-connect-jambonz-with-dasha-ai">article</a>. <a href="https://jambonz.org/">jambonz</a> is an open source CPaaS for communications service providers.</p><p><a href="https://dasha.ai/en-us">Dasha</a> is a conversational-AI-as-a-service platform that lets you embed realistic voice and text conversational capabilities into your apps or products. Dasha is a relatively new entry in the conversational AI space, albeit one with that is <a href="https://dasha.ai/en-us/blog/gartner-cool-vendor-dasha">getting some nice press</a> and brings some interesting capabilities, including such things as handling conversational digressions more easily and a nice <a href="https://code.visualstudio.com/">VSCode</a> plugin for creating applications using their <a href="https://docs.dasha.ai/en-us/default/dasha-script-language/">declarative language</a>.</p><p>When building contact center solutions using <a href="https://jambonz.org/">jambonz</a>, integrating with Dasha is a breeze!</p><h3>Dasha side</h3><p>Make sure you have node.js version 13+ and npm installed. You will also want the latest version of Visual Studio Code running to edit and test the Dasha app.</p><ol><li>Join <a href="https://community.dasha.ai/">Dasha Community</a> — you will get your API key here automatically</li><li>Open VSCode and install the <a href="https://marketplace.visualstudio.com/items?itemName=dasha-ai.dashastudio&amp;ssr=false">Dasha Studio Extension</a> from the extension store. You’ll get all the DSL syntax highlighting and a GUI interface for debugging your conversation flow.</li><li>Run npm i -g &quot;@dasha.ai/cli@latest&quot; to install the latest Dasha CLI.</li></ol><h3>Run a Dasha app</h3><p>You’ll want to load up a Dasha conversational AI app. For the purposes of this tutorial, we will load up the simple <a href="https://github.com/dasha-samples/dasha-sip-test">inbound tester app</a> that they provide.</p><pre>$ git clone https://github.com/dasha-samples/dasha-sip-test \<br>&amp;&amp; cd dasha-sip-test \<br>&amp;&amp; npm install</pre><pre>Cloning into &#39;dasha-sip-test&#39;...<br>remote: Enumerating objects: 66, done.<br>remote: Counting objects: 100% (66/66), done.<br>remote: Compressing objects: 100% (51/51), done.<br>remote: Total 66 (delta 27), reused 41 (delta 14), pack-reused 0<br>Unpacking objects: 100% (66/66), done.</pre><pre>added 204 packages, and audited 205 packages in 2s</pre><p>Dasha integrates with voice systems over SIP. That makes it super simple to integrate with jambonz.</p><p>So the next thing we shall do is create a SIP endpoint on the hosted Dasha platform that we can send our calls to. We will create a unique SIP URL that routes to their platform and which on the Dasha side is linked to our application.</p><pre>$ dasha sip create-inbound --application-name sip-test-app sip-test-app<br>{<br>  &quot;applicationName&quot;: &quot;sip-test-app&quot;,<br>  &quot;priority&quot;: 0,<br>  &quot;groupName&quot;: &quot;Default&quot;,<br>  &quot;uri&quot;: &quot;sip:5de44e6b-c0df-4532-b952-e4e4c5a5a9ec@sip.us.dasha.ai&quot;<br>}</pre><p>Whoa, slow down! What just happened there?</p><p>We used the dasha cli to create a SIP URI on the Dasha platform that we can send to. We specified an application name and a config name — in this case, using sip-test-app for both.</p><p>We can also use the dasha cli to list the sip-inbound endpoint we have created:</p><pre>$ dasha sip list-inbound<br>{<br>  &quot;sip-test-app&quot;: {<br>    &quot;applicationName&quot;: &quot;sip-test-app&quot;,<br>    &quot;priority&quot;: 0,<br>    &quot;groupName&quot;: &quot;Default&quot;,<br>    &quot;uri&quot;: &quot;sip:5de44e6b-c0df-4532-b952-e4e4c5a5a9ec@sip.us.dasha.ai&quot;<br>  }<br>}</pre><p>We can see the data returned is an object keyed by the config name where the values are objects containing information about an individual SIP URI.</p><blockquote>Note that in order for everything to link up properly on the Dasha side, the application-name you use in the dasha sip create-inbound command must match the value in the name field of your dashaappfile (which is found in app/app.dashaapp). If you want to change the name of the application, change it in the dashaappfile and create a new sip inbound URI using that same name, then restart your app.</blockquote><p>Now all we need to do is start our Dasha app:</p><pre>$ npm start in</pre><pre>..skipping startup log messages here..</pre><pre>Waiting for calls via SIP<br>sip:5de44e6b-c0df-4532-b952-e4e4c5a5a9ec@sip.us.dasha.ai</pre><p>Note that it again tells us the SIP URI Dasha has exposed for our application.</p><h3>jambonz side</h3><p>On the jambonz side, all we need to do is to <a href="https://www.jambonz.org/docs/webhooks/dial/">dial</a> an outbound call leg to that SIP URI provided. Let’s whip up a jambonz app to do just that:</p><pre>$ npx create-jambonz-app --scenario dial dasha-connect</pre><pre>Creating a new jambonz app in /Users/dhorton/dasha/dasha-connect</pre><pre>Installing packages...</pre><blockquote>Note: you can see the finished app <a href="https://github.com/jambonz/dasha-connect">here on github</a>.</blockquote><p>This gives us a basic demo jambonz application that by default dials a talking time clock. Let’s change it to dial the Dasha SIP URI instead.</p><p>First, let’s rename the webhook file:</p><pre>$ cd dasha-connect<br>$ mv lib/routes/endpoints/dial-time.js lib/routes/endpoints/dial-dasha.js</pre><p>Next, replace the contents of lib/routes/endpoints/dial-dasha.js with this:</p><pre>const router = require(&#39;express&#39;).Router();<br>const WebhookResponse = require(&#39;@jambonz/node-client&#39;).WebhookResponse;</pre><pre>router.post(&#39;/&#39;, (req, res) =&gt; {<br>  const {logger} = req.app.locals;<br>  logger.debug({payload: req.body}, &#39;POST /dial-dasha&#39;);<br>  try {<br>    const app = new WebhookResponse();<br>    app.dial({<br>      answerOnBridge: true,<br>      target: [<br>        {<br>          type: &#39;sip&#39;,<br>          sipUri: &#39;sip:5de44e6b-c0df-4532-b952-e4e4c5a5a9ec@sip.us.dasha.ai&#39;<br>        }<br>      ]<br>    });<br>    res.status(200).json(app);<br>  } catch (err) {<br>    logger.error({err}, &#39;Error&#39;);<br>    res.sendStatus(503);<br>  }<br>});</pre><pre>module.exports = router;</pre><blockquote>Note: replace the sipUri above with your own SIP URI that you generated in the previous step.</blockquote><p>You can see that all we are doing is using the jambonz dial target type to dial out to a SIP URI.</p><p>Finally, edit the lib/routes/endpoints/index.js to reference dial-dasha instead of dial-time</p><pre>const router = require(&#39;express&#39;).Router();</pre><pre>router.use(&#39;/call-status&#39;, require(&#39;./call-status&#39;));<br>router.use(&#39;/dial-dasha&#39;, require(&#39;./dial-dasha&#39;));</pre><pre>module.exports = router;</pre><p>As with any jambonz Node.js app, we need to provide environment variables to reference our account sid and other details, so edit the ecosystem.config.js file accordingly, then start it</p><pre>$ pm2 start ecosystem.config.js</pre><p>Now that it’s running, all we need to do is create an application in our jambonz portal for this webhook:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/979/0*o_nfDEVHohPLyX2N" /></figure><p>and then point a phone number to it:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/915/0*KeKzmMvtfeth9L5k" /></figure><p>That’s it! Time to test by calling the number we assigned. This dasha sample app is quite simple so you will simply hear a woman’s voice saying hello and then waiting for your response after which she will close out the conversation.</p><p>Of course, this simple Dasha app is only meant to provide an easy way to verify SIP connectivity, and you can now proceed to build out more sophisticated conversational AI apps using Dasha and connect them to your jambonz voice applications.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=d145ce395db4" width="1" height="1" alt=""><hr><p><a href="https://medium.com/dasha-ai/how-to-connect-jambonz-with-dasha-ai-d145ce395db4">How to connect jambonz with Dasha AI</a> was originally published in <a href="https://medium.com/dasha-ai">Dasha AI</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Conversational AI can handle order confirmation for you… and more.]]></title>
            <link>https://medium.com/dasha-ai/conversational-ai-can-handle-order-confirmation-for-you-and-more-d45f79e4acf9?source=rss-152e977c1c0a------2</link>
            <guid isPermaLink="false">https://medium.com/p/d45f79e4acf9</guid>
            <category><![CDATA[ai]]></category>
            <category><![CDATA[food-ordering-script]]></category>
            <category><![CDATA[food-ordering-system]]></category>
            <category><![CDATA[food-ordering-app]]></category>
            <category><![CDATA[order-confirmation]]></category>
            <dc:creator><![CDATA[Anzhelika Minina]]></dc:creator>
            <pubDate>Thu, 09 Sep 2021 15:23:11 GMT</pubDate>
            <atom:updated>2021-09-09T15:23:11.361Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*8NWrsnOtBURepwJUxjp0jw.png" /></figure><blockquote>Originally posted on <a href="https://dasha.ai/en-us/blog/order-confirmation-ai">dasha.ai/en-us/blog/order-confirmation-ai</a></blockquote><p>A new wave of conversational AI helps automate order confirmation — and potentially save your company money and time. All while skyrocketing your customer experience.</p><p>The conversational AI market is booming. If you’ve been following developments, you’ll know that it goes by a lot of different names — chatbots, voicebots, personal assistants, etc. But at the end of the day, everyone agrees to use conversational AI as a cheaper and more accessible way to interact with users. One of the ways companies use conversational AI is to automate their order confirmation process.</p><p>Grubhub, for instance, gets over 620,000 orders per day, and that’s just one food ordering app. UPS <a href="https://www.businessinsider.com/ups-q2-2020-earnings-top-wall-street-estimates-deliveries-surge-2020-7">delivered</a> 21.1 million packages on average in 2020. With such huge numbers of deliveries per day, it’s essential for companies to make sure they can accurately and efficiently confirm the order and the delivery details.</p><h3>Why traditional order confirmation ways aren’t efficient</h3><p>While some companies have implemented traditional order confirmation via text message or email, there are many drawbacks. The ability to confirm the order in real-time changes the entire customer experience. It saves time and money for the customer and improves their experience with the company. An order confirmation text is not the best method for companies that deliver perishable goods like flowers or food.</p><p>What if the flowers arrive but the customer didn’t get the text? What if the food delivery was made to the wrong address? What if the right information wasn’t provided correctly? Conversational AI tackles these issues by allowing you to easily and efficiently confirm orders in real-time. This article will explain how conversational AI can be used for order confirmation, and how you can automate it for your company.</p><p>The order confirmation option is available in most apps right now. The customer and the delivery company both get a notification, and both parties can see the confirmation. However, some apps give the delivery company access to the order details, and not the customer. This can be problematic for the customer. The customer might not even realize their order was placed, and it would be very difficult to cancel and get a refund. Besides, it’s not uncommon for the customer to have ordered something they didn’t mean to order, be it an extra pizza, or jeans in the wrong size. The best way to avoid such errors is by calling the person who placed an order right after it has been placed. And you can do just that with an automated conversational AI order confirmation app.</p><h3>Why conversational AI is the best way to confirm orders</h3><p>In the U.S, online spending amounted to around $900 billion in 2020. With such a huge amount of spending, companies have to keep their order confirmation process as efficient as possible, and that’s what conversational AI does. If a company chooses to automate its order confirmation process, it doesn’t mean that it has to spend lots of time creating a conversational AI app. In fact, it only takes a couple of hours to write an order confirmation app with Dasha AI. Once done, your company will no longer need to bother with hiring personnel to handle order confirmation calls, conversational AI will do it in their stead.</p><p>Besides, one of the greatest benefits of conversational AI apps is that you can not only automate the order confirmation process. The app can help you create the best customer experience by not only automatically confirming orders, but also ask customer experience and/or NPS survey questions such as,</p><ul><li>“Are you satisfied with your order?”,</li><li>“How would you rate the delivery process?”,</li><li>“Did the size of the [item ordered] fit you?”,</li><li>“Would you recommend [brand name] to your friends?.”</li></ul><p>The applications of conversational AI apps are virtually limitless. Why waste time and money on a team of customer service people when you can “hire” a conversational AI app to do the work for you?</p><p>With the right app, you can automate the process of connecting with customers and building an immediate rapport, since the person will hear a human voice on the other side of the phone. The best part is that, with conversational AI, you don’t need to create a separate app for every category of products. Whether it’s customer service, delivery confirmation, or product search or recommendation, the app can be created once and then used across different use cases.</p><h3>Benefits of automating processes with conversational AI</h3><p>There are several benefits to conversational AI automation:</p><ul><li>Increase customer satisfaction.</li></ul><p>Most companies see conversational AI as an opportunity for you to connect with your customers in a human-like, most natural manner. In turn, they get happier and more engaged. Moreover, you can nudge your customers to respond to questions and/or requests as they come in.</p><ul><li>Increase customer retention and loyalty.</li></ul><p>Newer, smarter customers have become harder to retain. If you want to win back these customers, you have to offer a better experience. You can use Dasha AI to make calls that are more personal and specific to the customer. For example, you can ask if they would be happy with a discount, or you can send a generous promo code in case they weren’t fully satisfied with the previous order.</p><ul><li>Gaining new customers with conversational AI.</li></ul><p>Baymard Institute states that nearly 70% of carts get abandoned. Whole 7 out of 10 potential customers leave the purchasing process mid-way. Yet conversational AI could be a game-changer. With Dasha, you could create a conversational AI app that would call those potential customers. Dasha will remind them about the unfinished order, thus reducing the abandoned cart rate and increasing the conversion rate.</p><p>Also, your company can analyze customer behavior and know that they’d be most likely to purchase a product if they have already got similar ones. Then, you can mark these new customers as potential prospects, create a compelling personalized offer.</p><ul><li>Get honest feedback.</li></ul><p>The best way to learn if your company is doing well is by asking your customers about their experience. Use a conversational AI app to ask questions about their opinion on their order, or even ask feed company and how you could improve the experience. Take a look at how NPS surveys are automated with a conversational AI app in this post.</p><ul><li>Reduce cancellations.</li></ul><p>When your customer places an order and gets a confirmation from the merchant, they feel reassured and are more likely to complete the transaction. However, many times, the customer realizes that they made a mistake during the ordering process. It could be because the company changed prices, or a different product was ordered. But as a result of having paid for it, the customer would want to get a refund. With conversational AI, the customer would not only be able to revise their food delivery, clothes, or tech device order, but cancel it right after the purchase was complete, shall they have a change of heart.</p><h3>How the conversational AI order confirmation process works</h3><p>With Dasha, the interactions with customers aren’t troublesome to automate. Companies can focus more on other things while conversational AI does most of the work dealing with customers.</p><p>Before I get into describing the process, I encourage you to take a look at this <a href="https://dasha.ai/en-us/blog/order-confirmation-ai-app">how-to post</a> on how I created an order delivery conversational AI app in just a couple of hours.</p><p>Without further ado, with Dasha, the order confirmation process is done as follows:</p><p>Once your company gets an order request, they will be given a call from Dasha and the person on the other line will sound like a human. At this point Dasha will already have all the necessary information needed such as ordered items, customer’s name, and delivery address, to proceed with the order confirmation.</p><p>Next, Dasha will proceed conversing with the customer regarding their order and say things like: “Hi Jessica, this is Dasha from [company name] calling to confirm your order. I see you’ve ordered [item 1] and [item 2] to be delivered to [customer’s address]. Would you like to change anything about your order?” and go from there.</p><p>Dasha conversational AI can also ask the customer about their preferred paying method and shall it be a card, process the payment right there and then.</p><p>Once Dasha has confirmed the order, the order can then be passed on to the fulfillment team to prepare the order.</p><p>The order is then delivered (or shipped) to your customer’s address. Once the shipping/delivery process is initiated, Dasha can call back the customer to confirm that the package or the delivery is on its way.</p><p>This, in essence, is how conversational AI saves your company time and money, by taking care of the customer service aspect of the order, thus allowing companies to spend more time improving their other services.</p><h3>Develop an AI ordering system yourself (it’s easy!)</h3><p>Take a look at how the conversation would go once you create the order confirmation app:</p><p><a href="https://youtu.be/J4JuK6ds8PE">https://youtu.be/J4JuK6ds8PE</a></p><p>Since creating an order confirmation conversational AI app takes only a couple of hours, I encourage you to try developing an app yourself! You don’t need a team of developers to write it, using Dasha is intuitive and doesn’t require any programming knowledge, so come as you are! In case you run into any difficulties, we’re always here to help you in <a href="https://community.dasha.ai/">Dasha Developer Community</a>, so join us! :)</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=d45f79e4acf9" width="1" height="1" alt=""><hr><p><a href="https://medium.com/dasha-ai/conversational-ai-can-handle-order-confirmation-for-you-and-more-d45f79e4acf9">Conversational AI can handle order confirmation for you… and more.</a> was originally published in <a href="https://medium.com/dasha-ai">Dasha AI</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Take order confirmation to a new level with conversational AI]]></title>
            <link>https://medium.com/dasha-ai/take-order-confirmation-to-a-new-level-with-conversational-ai-b41dcbd4592f?source=rss-152e977c1c0a------2</link>
            <guid isPermaLink="false">https://medium.com/p/b41dcbd4592f</guid>
            <category><![CDATA[order-fulfillment]]></category>
            <category><![CDATA[vscode]]></category>
            <category><![CDATA[javascript]]></category>
            <category><![CDATA[ai]]></category>
            <category><![CDATA[conversational-ai]]></category>
            <dc:creator><![CDATA[Anzhelika Minina]]></dc:creator>
            <pubDate>Tue, 31 Aug 2021 19:20:21 GMT</pubDate>
            <atom:updated>2021-08-31T19:20:21.388Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*XM0rdkeWApvaS1Air7Jhyg.png" /></figure><p>Today we’ll be taking a look at how to create a conversational AI app that automates order confirmation. While this app will be targeted towards confirming a food delivery order, yet the logic of this app can apply to create virtually any order confirmation app. Let’s get started!</p><h3>Prep steps to create conversational AI apps with Dasha</h3><p>In order to get access to the community of like-minded developers, have all your questions answered, and get help with app development the moment you need it, join <a href="https://community.dasha.ai/">Dasha Developer Community</a>.</p><p>Once done, you’ll need to download the latest versions of:</p><ul><li><a href="https://nodejs.dev/">NodeJS</a></li><li><a href="https://code.visualstudio.com/Download">VSCode</a></li><li><a href="https://www.npmjs.com/">NPM</a></li></ul><p>Open VSCode, go to extensions and download the <a href="https://marketplace.visualstudio.com/items?itemName=dasha-ai.dashastudio&amp;ssr=false">Dasha Studio</a> extension. You use the studio to create your conversational script, it gives you syntax analysis and highlights the code. There’s also a visual graph editor and it has a GUI tool for debugging.</p><p>All done with the downloads!</p><p>Now you can go ahead and download <a href="https://github.com/dasha-samples/blank-slate-app">Dasha Blank Slate app</a> source code and use it as a base to write your code. You can also refer to the source code of this order confirmation conversational AI app* that you can download <a href="https://github.com/dasha-samples/food-order-confirmation">here</a>.</p><p>You would want to install the latest version of Dasha CLI. Do that by opening the Terminal in VSCode and running this command:</p><p>npm i -g &quot;@dasha.ai/cli&quot; npm i</p><p>You could also run a live chat at any moment of time with the following command:</p><p>npm start chat (text chat) npm start your_phone_number (voice chat. Instead of “your_phone_number” type the number of your phone)</p><p>With these commands, you’ll be able to converse with the AI in text form. This will not only help you test the conversational flow but also gauge whether there are any errors in the code.</p><h3>Get to know the files you’ll use to create human-like conversational AI apps</h3><p>There are 3 main files you need to know about and use:</p><ul><li>main.dsl — here you’ll write DashaScript Language code to create the workflow of your conversational AI app.</li><li>data.json — you will set the <a href="https://dasha.ai/en-us/blog/intent-classification">intents</a> and <a href="https://dasha.ai/en-us/blog/named-entity-recognition">entities</a> (/NER/Named Entity Recognition) in this file. The neural network will use intents and entities you’ll create to learn.</li><li>index.js — a NodeJS file that launches the Dasha SDK. You’ll be adding any external functions you deem necessary once adapting the code to your company’s needs. External functions are needed to process data in JavaScript or to get or push data from external APIs. For example, you may need to process data, get access to databases or APIs or use it for any other purposes.</li></ul><h3>Create your order confirmation conversational AI app!</h3><p>Off to creating your 2-in-1 ai food delivery and order confirmation app!</p><p>Start with importing the common library. It provides all the pre-programmed replies to common digressions such as “wait”, “are you a robot?”, etc.</p><pre>// Import the commonReactions library so that you don&#39;t have to worry about coding the pre-programmed replies<br>import &quot;commonReactions/all.dsl&quot;;</pre><p>Now you want to establish the context. Here you’ll write the variables, both input (the ones available at the start of the conversation) and output (the variables AI will receive, store and use throughout the conversation).</p><pre>context<br>{<br>// Declare the input variable - phone. It&#39;s your hotel room phone number and it will be used at the start of the conversation.  <br>    input phone: string;<br>// Storage variables. You&#39;ll be referring to them across the code. <br>    appetizers: string=&quot;&quot;;<br>    drinks: string=&quot;&quot;;<br>    new_burger: string=&quot;&quot;;<br>    street: string=&quot;&quot;;<br>    house_num: string=&quot;&quot;;<br>}</pre><p>Once you’ve set the variables, write out the start node named root. In it, under the do command, you’ll let the AI know that it needs to connect to the user’s phone, wait for 1 second, and then say some kind of a welcome message and wait for the reply (wait *;).</p><p>Once the user says something, the AI will go to the next node. Under transitions you can either write directions to the specified nodes, or leave it blank in case you want the transitions to be not to any of the nodes, but to one of the digressions. In this case, we have next: goto order_confirmation_start on true; -- this means that the transition will happen despite what the user says.</p><pre>// A start node that always has to be written out. Here we declare actions to be performed in the node. <br>start node root<br>{<br>    do<br>    {<br>        #connectSafe($phone); // Establishing a safe connection to the user&#39;s phone.<br>        #waitForSpeech(1000); // Waiting for 1 second to say the welcome message or to let the user say something<br>        #sayText(&quot;Hi, this is Dasha, I&#39;m calling to verify some informaton regarding your order with ABC Burgers.&quot;); // Welcome message<br>        wait *; // Wating for the user to reply<br>    }<br>    transitions // Here you give directions to which nodes the conversation will go<br>    {<br>        next: goto order_confirmation_start on true;<br>    }<br>}</pre><p>As we programmed the AI to go to node order_confirmation_start, let’s write it out:</p><pre>node order_confirmation_start<br>{<br>    do <br>    {   <br>        #sayText(&quot;Yeah, hi, so I see that you&#39;ve ordered a cheeseburger to be delivered to 78 Washington Road. Do you want to change anything about your order?&quot;); <br>        wait*;<br>    }<br>    transitions<br>    {<br>        payment_method: goto payment_method on #messageHasIntent(&quot;no&quot;);<br>        edit_new_order: goto edit_new_order on #messageHasIntent(&quot;yes&quot;);<br>    }<br>}</pre><p>Note that after #sayText we wrote a random order to a random address. However, you should create an external function (you’ll be doing that in index.js file as we’ve discussed above) and connect it to your internal ordering system, that will pull the information on the order and the delivery address of the user.</p><p>Considering that the user knows the menu and wants to change the burger they are ordering, let’s write out the corresponding node and <a href="https://dasha.ai/en-us/blog/using-digressions">digression</a>. The reason we should write out both is that we’ll be referring to this node in another node’s transition, and the digression will be there to get triggered at any point of the conversation should there be a need for it.</p><pre>digression change_order_burger<br>{<br>    conditions {on #messageHasData(&quot;burger_kind&quot;);}<br>    do <br>    {   <br>        set $new_burger = #messageGetData(&quot;burger_kind&quot;)[0]?.value??&quot;&quot;;<br>        #sayText(&quot;Perfect. I&#39;ve added &quot; + $new_burger + &quot; to your order. Would you like anything else?&quot;); <br>        wait *;<br>    }<br>    transitions<br>    {<br>        edit_new_order: goto edit_new_order on #messageHasIntent(&quot;yes&quot;) or #messageHasIntent(&quot;order_sth_else&quot;);<br>    }<br>}</pre><pre>node change_order_burger<br>{<br>    do <br>    {   <br>        set $new_burger = #messageGetData(&quot;burger_kind&quot;)[0]?.value??&quot;&quot;;<br>        #sayText(&quot;Perfect. I&#39;ve added &quot; + $new_burger + &quot; to your order. Would you like anything else?&quot;); <br>        wait *;<br>    }<br>    transitions<br>    {<br>        edit_new_order: goto edit_new_order on #messageHasIntent(&quot;yes&quot;) or #messageHasIntent(&quot;order_sth_else&quot;);<br>    }<br>}</pre><p>At this point, let’s write the node we mention in the transition (+ a corresponding digression):</p><pre>digression edit_new_order<br>{<br>    conditions {on #messageHasIntent(&quot;order_sth_else&quot;);}<br>    do<br>    {<br>        #sayText(&quot;What can I get for you?&quot;); <br>        wait *; <br>    }<br>}</pre><pre>node edit_new_order<br>{<br>    do<br>    {<br>        #sayText(&quot;What can I get for you?&quot;); <br>        wait *; <br>    }<br>    transitions<br>    {</pre><pre>    }<br>}</pre><p>This is a simple, yet multifunctional node in a way since we’ll be transferring to it in multiple nodes.</p><p>Another similar digression and node are the following:</p><pre>node nvm<br>{<br>        do<br>    {<br>        #sayText(&quot;Is there anything else I can help you with?&quot;); <br>        wait *;<br>    }<br>    transitions<br>    {<br>        payment_method: goto payment_method on #messageHasIntent(&quot;no&quot;);<br>        edit_new_order: goto edit_new_order on #messageHasIntent(&quot;yes&quot;);<br>    }<br>}</pre><pre>digression nvm<br>{<br>    conditions {on #messageHasIntent(&quot;nvm&quot;);}<br>    do<br>    {<br>        #sayText(&quot;Okay! How may I help you?&quot;); <br>        wait *; <br>    }<br>}</pre><p>We’ll also have a chance to refer to them in other nodes.</p><p>Let’s write a digression for a case when a person asks about the burger menu after deciding to change the order:</p><pre>digression burgers_available<br>{<br>    conditions {on #messageHasIntent(&quot;burgers_available&quot;);}<br>    do <br>    {<br>        #sayText(&quot;We&#39;ve got cheeseburger, hawaiian burger, buffalo chicken burger, creamy mushroom burger, beef burger and barbeque burger. Which one would you like?&quot;); <br>        wait*;<br>    }<br>    transitions<br>    {<br>        change_order_burger: goto change_order_burger on #messageHasData(&quot;burger_kind&quot;);<br>    }<br>}</pre><p>Pretty simple!</p><p>Now, what if the user wants to change the delivery address? Let’s program the conversational AI app to be able to deal with this case scenario.</p><p>There could be 4 different paths here. Either the user states they want to change the address without specifying it, or they name the new street, or the new building number, or the full address. We should write down a digression for each of these scenarios as they can pop up at any moment during the conversation:</p><pre>digression different_address<br>{<br>    conditions {on #messageHasIntent(&quot;different_address&quot;);}<br>    do<br>    {<br>        #sayText(&quot;Sounds good, could you tell me the building number and the street name, please?&quot;); <br>        wait *; <br>    }<br>}</pre><pre>digression change_street<br>{<br>    conditions {on #messageHasIntent(&quot;change_street&quot;);}<br>    do <br>    {<br>        set $street = #messageGetData(&quot;street&quot;)[0]?.value??&quot;&quot;;<br>        #sayText(&quot;Okay, I changed the street to &quot; + $street + &quot; . Is there anything else you&#39;d like to change?&quot;); <br>        wait *;<br>    }<br>    transitions<br>    {<br>        edit_new_order: goto edit_new_order on #messageHasIntent(&quot;yes&quot;) or #messageHasIntent(&quot;order_sth_else&quot;);<br>        review_full_order: goto review_full_order on #messageHasIntent(&quot;no&quot;);<br>    }<br>}</pre><pre>digression change_house_num<br>{<br>    conditions {on #messageHasIntent(&quot;change_house_num&quot;);}<br>    do <br>    {<br>        set $house_num = #messageGetData(&quot;house_num&quot;)[0]?.value??&quot;&quot;;<br>        #sayText(&quot;Gotcha, I changed the building number to &quot; + $house_num + &quot; . Is there anything else you&#39;d like to change?&quot;); <br>        wait *;<br>    }<br>    transitions<br>    {<br>        edit_new_order: goto edit_new_order on #messageHasIntent(&quot;yes&quot;) or #messageHasIntent(&quot;order_sth_else&quot;);<br>        review_full_order: goto review_full_order on #messageHasIntent(&quot;no&quot;);<br>    }<br>}</pre><pre>digression change_address<br>{<br>    conditions {on #messageHasData(&quot;house_num&quot;) and #messageHasData(&quot;street&quot;);}<br>    do <br>    {<br>        set $street = #messageGetData(&quot;street&quot;)[0]?.value??&quot;&quot;;<br>        set $house_num = #messageGetData(&quot;house_num&quot;)[0]?.value??&quot;&quot;;<br>        #sayText(&quot;Okay, changed the delivery address to &quot; + $house_num + &quot; &quot; + $street + &quot;. Is there anything else you&#39;d like to change?&quot;); <br>        wait *;<br>    }<br>    transitions<br>    {<br>        edit_new_order: goto edit_new_order on #messageHasIntent(&quot;yes&quot;) or #messageHasIntent(&quot;order_sth_else&quot;);<br>        review_full_order: goto review_full_order on #messageHasIntent(&quot;no&quot;);<br>    }<br>}</pre><p>Take a look at the digression change_street the line under the do command: set $street = #messageGetData(&quot;street&quot;)[0]?.value??&quot;&quot;;. You might recognize $street from the content that we’ve established right off the bat. This line lets the AI store the variable $street and use it throughout the chat.</p><p>Note that we can store multiple variables under the do section as seen under change_address.</p><p>We’ll use the stored variables right in the digressions to provide feedback to the user, letting them know we’ve understood them correctly and make some changes if we didn’t.</p><p>Now, let’s consider the case when the user decides to edit their order by ordering something extra that’s on our menu. Appetizers, for instance. Remember that the user might know the menu and say exactly what they want to order, or they might ask what you have on the menu appetizers-wise:</p><pre>digression appetizers<br>{<br>    conditions {on #messageHasIntent(&quot;appetizers&quot;);}<br>    do <br>    {<br>        #sayText(&quot;We&#39;ve got fried calamari, french fries, spring salad, and a soup of the day. What of these would you like to order?&quot;);<br>        wait *;<br>    }<br>    transitions <br>    {<br>       confirm_appetizers: goto confirm_appetizers on #messageHasData(&quot;appetizers&quot;);<br>    }<br>     onexit<br>    {<br>        confirm_appetizers: do {<br>        set $appetizers =  #messageGetData(&quot;appetizers&quot;, { value: true });<br>       }<br>    }<br>}<br>node confirm_appetizers<br>{<br>    do<br>    {<br>        var sentence = &quot;Perfect. I&#39;ve added &quot;;<br>        set $appetizers = #messageGetData(&quot;appetizers&quot;);<br>        for (var item in $appetizers) {<br>            set sentence = sentence + (item.value ?? &quot; and &quot;);<br>        }<br>        set sentence = sentence + &quot; to your order. Is there anything else you&#39;d like?&quot;;<br>        #sayText(sentence); <br>        wait *;<br>    }<br>     transitions <br>    {<br>        edit_new_order: goto edit_new_order on #messageHasIntent(&quot;yes&quot;) or #messageHasIntent(&quot;drinks&quot;);<br>        confirm_drinks: goto confirm_drinks on #messageHasData(&quot;drinks&quot;);<br>        review_full_order: goto review_full_order on #messageHasIntent(&quot;no&quot;);<br>    }<br>}</pre><p>The same thing goes for the drinks menu:</p><pre>digression drinks<br>{   <br>    conditions {on #messageHasIntent(&quot;drinks&quot;);}<br>    do <br>    {<br>        #sayText(&quot;We have orange juice, Sprite, and vanilla milkshakes. What would you like to get?&quot;);<br>        wait *;<br>    }<br>    transitions <br>    {<br>       confirm_drinks: goto confirm_drinks on #messageHasData(&quot;drinks&quot;);<br>    }<br>    onexit<br>    {<br>        confirm_drinks: do {<br>        set $drinks = #messageGetData(&quot;drinks&quot;, { value: true });<br>       }<br>    }<br>}</pre><pre>node confirm_drinks<br>{<br>    do<br>    {<br>        var sentence = &quot;Noted, I added &quot;;<br>        set $drinks = #messageGetData(&quot;drinks&quot;);<br>        for (var item in $drinks) {<br>            set sentence = sentence + (item.value ?? &quot; and &quot;); // In case the guest desides to order multiple items of food<br>        }<br>        set sentence = sentence + &quot; to your order. Anything else you&#39;d like to order?&quot;;<br>        #sayText(sentence); <br>        wait *;<br>    }<br>     transitions <br>    {<br>        edit_new_order: goto edit_new_order on #messageHasIntent(&quot;yes&quot;) or #messageHasIntent(&quot;appetizers&quot;);<br>        confirm_appetizers: goto confirm_appetizers on #messageHasData(&quot;appetizers&quot;);<br>        review_full_order: goto review_full_order on #messageHasIntent(&quot;no&quot;);<br>    }<br>}</pre><p>Now that we’re done changing the order, we should provide the user with the final confirmation:</p><pre>node review_full_order<br>{<br>    do<br>    {<br>        var sentence = &quot;To review your order, you want to get &quot;;<br>        for (var item in $new_burger) {<br>            set sentence = sentence + (item.value ?? &quot;&quot;) + (&quot;, &quot;);<br>        }<br>        for (var item in $appetizers) {<br>            set sentence = sentence + (item.value ?? &quot;&quot;) + (&quot;, and &quot;);<br>        }<br>        for (var item in $drinks) {<br>            set sentence = sentence + (item.value ?? &quot;&quot;);<br>        }<br>        set sentence = sentence + &quot;. Would you like anything else?&quot;; <br>        #sayText(sentence); <br>        wait *;<br>    }<br>     transitions <br>    {<br>        payment_method: goto payment_method on #messageHasIntent(&quot;no&quot;);<br>        edit_new_order: goto edit_new_order on #messageHasIntent(&quot;yes&quot;);<br>    }<br>}</pre><p>Here we write out the for statements to account for multiple food/drink items (for example, if the user says they want both calamari and fries). The + (&quot;, &quot;); and + (&quot;, and &quot;); so that the multiple variables are separated when the text is spoken (fries, Hawaiian burger, and Sprite vs friedHawaiian burgerSprite).</p><p>Now, a couple of simple nodes will let the AI know it needs to ask about the payment method:</p><pre>node payment_method<br>{<br>    do<br>    {<br>        #sayText(&quot;Gotcha. Now, would you be paying with cash or by card?&quot;);<br>        wait *;<br>    }<br>     transitions <br>    {<br>        with_cash: goto with_cash on #messageHasIntent(&quot;cash&quot;);<br>        by_card: goto by_card on #messageHasIntent(&quot;card&quot;);<br>    }<br>}</pre><pre>node with_cash<br>{<br>    do<br>    {<br>        #sayText(&quot;Sounds good, with cash it is. Your order will be ready in 15 minutes. Thank you for your order! Bye bye!&quot;);<br>        exit;<br>    }<br>}</pre><pre>node by_card<br>{<br>    do<br>    {<br>        #sayText(&quot;Sounds good, by card it is. Your order will be ready in 15 minutes. Thank you for your order! Bye bye!&quot;);<br>        exit;<br>    }<br>}</pre><p>It goes without saying that we need to account for the case scenario when the user wants to cancel the order altogether:</p><pre>digression cancel_order<br>{   <br>    conditions {on #messageHasIntent(&quot;cancel_order&quot;);}<br>    do <br>    {<br>        #sayText(&quot;Okay, just cancelled your order. Is there anything else I can help you with?&quot;);<br>        wait *;<br>    }<br>    transitions <br>    {<br>        edit_new_order: goto edit_new_order on #messageHasIntent(&quot;yes&quot;);<br>        bye: goto bye on #messageHasIntent(&quot;no&quot;);<br>    }<br>}</pre><p>And the final touch is our bye node and digression. We don’t ever want the user to not have an option to end the conversation:</p><pre>digression bye <br>{<br>    conditions { on #messageHasIntent(&quot;bye&quot;); }<br>    do <br>    {<br>        #sayText(&quot;Thanks for your time. Have a great day. Bye!&quot;);<br>        #disconnect();<br>        exit;<br>    }<br>}</pre><pre>node bye <br>{<br>    do <br>    {<br>        #sayText(&quot;Thanks for your time. Have a great day. Bye!&quot;);<br>        #disconnect();<br>        exit;<br>    }<br>}</pre><h3>Create your own conversational AI app! It’s easy :)</h3><p>Try creating an order confirmation app that fits your business’ needs. Think of the questions your users could ask, plot them and write out corresponding nodes and digressions. Or improve the app and share the results in <a href="https://community.dasha.ai/">Dasha Developer Community</a> :)</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=b41dcbd4592f" width="1" height="1" alt=""><hr><p><a href="https://medium.com/dasha-ai/take-order-confirmation-to-a-new-level-with-conversational-ai-b41dcbd4592f">Take order confirmation to a new level with conversational AI</a> was originally published in <a href="https://medium.com/dasha-ai">Dasha AI</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Conversational AI is the modern way of booking hotels]]></title>
            <link>https://medium.com/dasha-ai/conversational-ai-is-the-modern-way-of-booking-hotels-d7eda73eba73?source=rss-152e977c1c0a------2</link>
            <guid isPermaLink="false">https://medium.com/p/d7eda73eba73</guid>
            <category><![CDATA[ai]]></category>
            <category><![CDATA[ai-for-business]]></category>
            <category><![CDATA[conversational-ai]]></category>
            <category><![CDATA[hotel-booking]]></category>
            <dc:creator><![CDATA[Anzhelika Minina]]></dc:creator>
            <pubDate>Mon, 30 Aug 2021 19:14:21 GMT</pubDate>
            <atom:updated>2021-08-30T19:14:21.474Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*6cJ7nVXWRLAEiBQo8wq0ZA.png" /></figure><blockquote>Originally published on <a href="https://dasha.ai/en-us/blog/hotel-booking-ai-automation">dasha.ai/en-us/blog/hotel-booking-ai-automa..</a></blockquote><p>With over <a href="https://www.condorferries.co.uk/hotel-industry-statistics">700,000 hotels</a> worldwide and a contribution of $3.41 trillion to the global economy, the hotel sector is on the rise. The hotel industry suffered a number of setbacks, travel restrictions were put in place early on, which limited the number of potential guests. The hotel industry did not have the infrastructure to quickly make accommodations for the number of people who were at risk due to the disease, and many hotels are struggling to adapt. The room rates for hotels dropped significantly, and low room rates are likely to continue to cause issues in the industry.</p><h3>How can hotels use conversational AI?</h3><p>The hotel industry should look at how conversational AI can be used to make travel more enticing for guests. This involves implementing conversational AI systems to allow guests to easily get and stay informed about the status of their reservations, view their reservations and compare them with others, and receive suggestions to increase their stay. Conversational AI can also help the hotel industry in providing services to guests. This can include having guests talk with the AI for simple questions and problems that they may have, which will help the conversational AI to provide simplified, personalized responses to the guest. Conversational AI can also be used to identify the guests’ needs to determine what services the hotel should offer them. As the conversation evolves, the conversational AI can use the guest’s prior experiences, preferences, and preferences to determine the most appropriate actions to take for the guest, such as booking accommodation or making food reservations.</p><p>From any business perspective, the hotel industry can benefit from using AI in various ways. Some of those include: improving customer experience, streamlining operations, improving workforce productivity, reducing costs, and many more.</p><p>This is exactly what the hotel booking conversational AI app is meant to do. It gathers information from the user such as their destination, date of check in and check out, star rating, etc, and the mentioned hotels for them based on all the information collected. Once the hotel options are mentioned, the app will prompt the customer to select the hotel that they are interested in, and will offer them the chance to book it. This will also help in decreasing the number of no-shows and cancellations.</p><p>For the customer, it will help in creating a better experience and would be necessary to book a room without facing any setbacks. In addition to this, it is a great way to differentiate yourself from your competitors.</p><p>You must be wondering what such hotel automation technology looks like, so let me demonstrate:</p><p><a href="https://youtu.be/hUkM9JoVO-I">Embedded content: https://youtu.be/hUkM9JoVO-I</a></p><p>Take a look at <a href="https://dasha.ai/en-us/blog/ai-hotel-booking">this tutorial</a> to see how a hotel booking conversational AI app is built.</p><h3>Personalized hotel assistance experience</h3><p>With the help of conversational AI, hotels can also personalize the guest experience.</p><p>The AI system can be trained to recognize the guest’s voice, preferences, and patterns of behavior. It can then use that information to provide the guest with a personalized conversation.</p><p>If a guest asks “Is there a restaurant nearby?” the AI system can respond with “There are 2 amazing restaurants around. One is Kimchi One restaurant, which is open from 9 AM to 9 PM, and the other is Bonjorno restaurant, open from 8 AM to 11 PM. Would you like for me to make a reservation at one of these?.”</p><p>Or if the guest says “I’m looking for something fun to do. Is there something like that in the area?” the AI system can respond with “There’s an amusement park which is within a 15-minute drive. You can take the free shuttle that’s located right outside the hotel entrance to get there. But make sure to go there within its working hours, it closes at 4 PM these days.”</p><p>###Automated front desk receptionist service</p><p>Conversational AI can also be used to create front desk receptionist apps.</p><p>An AI front desk receptionist can provide information about the hotel, city, and nearby attractions. It can help with various tasks for guests, such as suggesting restaurants and making reservations, booking concert tickets. It can inform guests about things to do at the hotel and recommend them to visit the hotel’s casino, spa, swimming pool, etc.</p><p>An automated front desk receptionist service is great for hotels because it helps guests find information in a timely manner, making them even more satisfied with their stay.</p><p><em>Pro-tip</em>: if you would like your hotel guests to have this type of personalized experience, check out this <a href="https://dasha.ai/en-us/blog/AI-hotel-front-desk-receptionist">step-by-step tutorial</a> on how to create a conversational AI app that will make your guests in awe. Your hotel will definitely become their top preference for years to come!</p><h3>Development of сonversational AI for hotel booking</h3><p>Before delving into the development process of the Hotel Ai app, it is important to first discuss its business objective. In short, the objective is to gather information from the users and let them select the best-suited hotel. Once they have selected the hotel, the app will provide them the chance to book it.</p><p>Here are some of the key points that you can base the design of the hotel booking AI app on:</p><ul><li>the app should gather all the information in a structured manner. The app should prompt the user to select the choices and arrange them in a logical, clear manner,</li><li>it should have a friendly <a href="https://dasha.ai/en-us/blog/conversational-design">conversational design</a>. The flow of the conversation should be as natural as possible and closely resemble the way of human interaction,</li><li>since the user is the main focus of the app, the display of the relevant information should be concise. Don’t bombard the customers with lots of questions at once, instead, take it slow, but steady,</li><li>the app should be able to handle any key scenario. Incorporating digressions in your hotel booking AI app will be a huge asset when it comes to planning for different conversational paths.</li></ul><h3>How do you create the best hotel booking app?</h3><p>Now, here are some other important points that you can consider when developing the hotel booking app. It should be:</p><ul><li>ready for integration with other apps,</li><li>capable of handling different key scenarios,</li><li>capable of offering the best suggestions for the hotel choice,</li><li>it should be able to handle questions it may get from the user and understanding them correctly,</li><li>able to identify if the user is a new or existing customer,</li><li>capable of keeping the information collected secure and private,</li><li>the app should be able to identify the user accurately by recognizing them from the database,</li><li>able to make suggestions to users,</li><li>able to calculate the amount of the booking.</li></ul><p>All of this is possible when creating a hotel booking app with Dasha. You can access the demo app and listen to the live conversation <a href="https://dashaai.hashnode.dev/LINK">here</a>.</p><p>Here’s some great news: even a non-developer can build apps with Dasha. It’s intuitive and only takes a few hours to develop a fully functional app. So <a href="https://community.dasha.ai/">try it out</a>!</p><h3>How does the hospitality industry benefit from using conversational AI for making hotel reservations?</h3><ul><li>Provide a better customer experience</li></ul><p>With the introduction of conversational AI for hotel booking, the hospitality industry can ensure that users can enjoy a better customer experience. In a competitive scenario, using AI as a way to search for an ideal place to stay will make the customers want to stay with you long term and make your hotel booking AI app their go-to app.</p><ul><li>Improved user acquisition and retention strategy</li></ul><p>The app can be the perfect tool for attracting new customers and help in retaining customers. It can make the customer process simpler, more user-friendly, and efficient.</p><ul><li>Reduce operating costs</li></ul><p>Conversational AI can help reduce operating costs by reducing the no-show and cancellations. This will help in saving a lot on customer service and customer acquisition costs.</p><ul><li>Reduce wastage of time and resources</li></ul><p>The hotel booking AI app can help reduce wastage of time and resources by helping in reducing the number of customer support inquiries. It will make the customer support team more productive and reduce the number of inquiries.</p><h3>How is conversational AI hotel booking different from traditional booking?</h3><ul><li>The conversational AI for hotel booking is a two-way service.</li></ul><p>The app will have a two-way conversation with the user. Unlike searching for and booking hotels on the websites, the app will ask questions to the users and will let them decide what hotel is best for them. There is a human touch to the conversation since the AI speaks in a human-indistinguishable manner. The user speaks directly in their own words, and the AI analyses it and responds to it in the same manner.</p><ul><li>The hotel booking app can not be limited to hotels only. The app will work with any service or product. The app can also be used as a personal assistant/travel assistant. The app will be a general travel assistant. It can also be used as a personal travel assistant that will help the user plan and book their travel. The app can also suggest the best restaurants, local places to visit, or sights based on the user’s interest. All the information can easily be incorporated with the app Also, the app can be used for any other travel-related inquiries.</li></ul><h3>How to develop a conversational AI hotel booking app?</h3><p>Easy! Join <a href="https://community.dasha.ai/">Dasha Developer Community</a> and we’ll teach you how to create such an app and many more. You can also tell your developers about Dasha so they can take on the task of automating your business processes, be it an automated hotel reservation system, customer support automation, or something else.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=d7eda73eba73" width="1" height="1" alt=""><hr><p><a href="https://medium.com/dasha-ai/conversational-ai-is-the-modern-way-of-booking-hotels-d7eda73eba73">Conversational AI is the modern way of booking hotels</a> was originally published in <a href="https://medium.com/dasha-ai">Dasha AI</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[How to get started with customer service automation at your bank.]]></title>
            <link>https://medium.com/dasha-ai/how-to-get-started-with-customer-service-automation-at-your-bank-7a8c016a4835?source=rss-152e977c1c0a------2</link>
            <guid isPermaLink="false">https://medium.com/p/7a8c016a4835</guid>
            <category><![CDATA[conversational-ai]]></category>
            <category><![CDATA[banking-technology]]></category>
            <category><![CDATA[money-transfers]]></category>
            <category><![CDATA[ai]]></category>
            <dc:creator><![CDATA[Anzhelika Minina]]></dc:creator>
            <pubDate>Fri, 27 Aug 2021 18:14:37 GMT</pubDate>
            <atom:updated>2021-08-27T18:14:37.782Z</atom:updated>
            <content:encoded><![CDATA[<h3>How to get started with customer service automation at your bank. A quick start guide for a simple money transfer AI app.</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*7YMsnHgcPL7uMNQdtV0ecQ.png" /></figure><blockquote>Originally published on <a href="https://dasha.ai/en-us/blog/money-transfer-automation">dasha.ai/en-us/blog/money-transfer-automation</a></blockquote><p>So you’re considering using customer support automation at your bank but are unsure where to begin. The good news is you’re at the right place.</p><p>In this guide, we’ll talk about why it is a smart decision to use artificial intelligence in banking, how to use customer service and support automation, and will provide you with a step-by-step guide on creating your own automated money transfer app.</p><h3>What exactly are the benefits of automation for banking industry?</h3><p>Automation is a catalyst for growth for companies. It’s tough to imagine a company that’s not deploying at least some sort of automated procedures. Without automation, you are bound to have persistent human errors, overheads and reduced operational efficiency.</p><p>According to a <a href="https://drive.google.com/file/d/1N9bD4dSzvOcZ3F6OO-MMxmQXF6xgpnwU/view">Pega robotic automation case study</a>, automating customer experience reduced error rates down to 2% (from an approximate of 30% rate), reduced processing time by a whole 78% and accounts processed number increased twofold.</p><p>Customer service and support automation help:</p><ul><li>avoid repetitive tasks,</li><li>employees to focus on focal projects and tasks,</li><li>reduce operational costs,</li><li>scale the business,</li><li>reduce AHT,</li><li>be available to customers on a 24/7 basis, etc.</li></ul><h3>Why you should use customer support automation in banking</h3><p>Let’s start with something that affected nearly all consumer banking customers.</p><p>During 2020, the number of times when the customers were put on hold for hours while trying to reach their bank is immense. Some of the clients had to spend three, five, and some even ten hours on hold, which greatly diminished their satisfaction with the banking experience. By letting artificial intelligence take care of incoming calls, banks that employed such tech managed not only to increase CX and to improve customer loyalty and satisfaction, but also avoided unnecessary work, which would’ve been their CS team spending time resolving complaints. This is just one example of how invaluable customer support automation is for the banking industry.</p><p>There is no question whether utilizing artificial intelligence in banking is a must in 2021. According to <a href="https://www.ey.com/en_gl/news/2020/02/artificial-intelligence-will-be-an-essential-business-driver-for-financial-services-within-two-years-according-to-study-co-sponsored-by-ey">EY press release</a>, 68% of financial institutions executives are planning to “use AI for new revenue generation, process automation, risk management, customer service and client acquisitions within two years”. And there’s no wonder why: “AI can potentially unlock $1 trillion of incremental value for banks, annually”, as per <a href="https://www.mckinsey.com/industries/financial-services/our-insights/ai-bank-of-the-future-can-banks-meet-the-ai-challenge#">McKinsey</a>.</p><p>The banking industry can rest assured that using automation will get their customers’ requests answered promptly and accurately. While AI can handle most customer questions, some require complex problem solving, human interaction and creativity, in which case calls get transferred securely to a human operator.</p><p>One of the most compelling reasons for utilizing artificial intelligence in banking is self-explanatory: cost saving. According to <a href="https://www.businessinsider.com/ai-in-banking-report">Business Insider</a>, front- and middle-office AI uses provide banks with a cost-saving opportunity of $416 billion. Think about that.</p><p>Now, let’s consider some AI implementation use cases for banks. You will see that AI in banking customer service is indispensable.</p><p>Conversational AI is a hype nowadays and it’s justified. There are myriad ways artificial intelligence can be used in banking. Banks use it to automate the way customer can:</p><ul><li>submit a loan application,</li><li>report a stolen or lost card,</li><li>check balance of their accounts,</li><li>schedule an appointment with a bank representative,</li><li>transfer money, etc.</li></ul><p>All of these use cases can be easily and seamlessly be solved with Dasha Studio. Without further ado, let’s take a look at how anyone with little to no coding skills can create the last point mentioned in the list, money transfer.</p><h3>How to automatically conduct a money transfer with a simple conversational AI app</h3><p>Let’s take a look at a Dasha conversational AI demo for the money transfer use case.</p><p>First things first, you’ll need to install <a href="https://code.visualstudio.com/">Visual Studio</a>, <a href="https://nodejs.org/en/download/">Node.js</a>, join <a href="http://community.dasha.ai/">Dasha’s developer community</a> (that’d allow you to get any help you need), and finally download a money transfer code demo. If that sounds confusing to you, don’t fret. We have a <a href="https://dasha.ai/en-us/blog/virtual-receptionist-software">step-by-step guide</a> that will allow you to do everything in a matter of minutes (you can go straight to the “Installing Dasha Studio and loading a pre-built AI virtual receptionist app” part).</p><p>Now to the fun part! Let’s take a look at the code.</p><p>In order to see the full picture of what’s happening in the code without actually distracting yourself with the code lines themselves, check out the Graph Editor. It will show you the pathways conversation might take place. The Graph Editor essentially shows you all the high-level nodes. (P.S. a node describes the system’s actions in the current state and the conditions for transitioning to other nodes. For more information on DashaScript language structure (dsl), check out the <a href="https://docs.dasha.ai/en-us/default/dasha-script-language/">Documentation</a> link).</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*5Lk6HBGkpQuhpUKt.jpg" /></figure><p>Note: if you can’t see the pathways, just zoom out. It should look like this:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*4qozFqti-bysAR-p.jpg" /></figure><p>At this point, zoom in a bit. What you are seeing are digressions. Nodes that have no other nodes leading into them. A user can call a digression up at any point in the conversation. This functionality emulates the way in which humans communicate with each other. For more info on digressions, take a look at this post.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*cHUh0fbtYMiVhCzR.jpg" /></figure><p>Now, let’s get to the most important part — the code. Open file main.dsl</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*5rdcCk__73ESkhA3.jpg" /></figure><p>With line 1 we import common libraries. In line 7 we declare alias for a type and in lines 12–22 we declare variables for context. The variables will be used later to store data received from the user in the course of the conversation.</p><p>The lines 34–43 describe what happens at the start of the chat between AI and the customer.</p><pre>start node root<br>{<br>    do<br>    {<br>        #connectSafe($phone);</pre><p>tells us that Dasha safely connected to a customer’s phone. moving on to the</p><pre>#waitForSpeech(1000);</pre><p>means that Dasha will wait for 1000ms (1 second) and move on to</p><pre>#say(&quot;greeting&quot;);</pre><p>which means Dasha will greet the customer and after that it’ll wait for them to respond:</p><pre>wait *;<br>    }</pre><p>The lines 43–47 describe the transition the app makes once an event is triggered. In this case we see #messageHasIntent(“transfer_money”);, which refers to the intent transfer_money, which is when the customer specifies their intention to transfer money from one account to another.</p><p>It’s now the best time to take a look at the intents themselves. But what are intents? Intents are reusable within the application. It means that you can use it in different steps of the conversational script. You don’t need to define individual ones for different transitions, except for those cases when it’s necessary for your script. Intent classification is aimed to categorize phrases by their meanings (intention). (Note: for more information on intents you can check out <a href="https://dasha.ai/en-us/blog/intent-classification">this blog post</a> which focuses on them).</p><p>Go to data.json to view all the specified intents As you can see, there are 2 main parts to each intent: includes and excludes. Includes part shows all the specified phrases a customer can say to trigger transition. In this case, a customer talks about their intention to have their money transferred. The excludes part describes the phrases that need to be prevented from being included in the intent so that the app doesn’t trigger the unexpected response.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*6yuqB_HwlzAqLuhM.jpg" /></figure><p>Moving on to lines 48–64. The onexit node section is defined right after transitions section and allows to specify actions to perform before exiting the node. The app goes on to perform lines 66–115, starting with the preprocessor digression transfer_data.</p><pre>preprocessor digression transfer_data<br>{<br>    conditions<br>    {<br>        on true;<br>    }</pre><pre>    var amount: string = &quot;&quot;;<br>    var source_account: string=&quot;&quot;;<br>    var target_account: string=&quot;&quot;;<br>    var account: string =&quot;&quot;;</pre><p>Here all the entities that the customer could have mentioned in the phrase are mentioned. If they said “$50”, the app remembers it in the amount (var amount: string = “”;), if the person said something about their account (savings or deposit) or the bank they want to transfer the money to (Wells Fargo, Bank of America, etc — which are already on file in users_db.json), the app remembers that information, as the lines below show:</p><pre>var source_account: string=&quot;&quot;;<br>    var target_account: string=&quot;&quot;;</pre><p>Same logic applies to var account: string =””;.</p><p>Tags source and target are an extra marker of entities, which help differentiate entities’ meaning. Source refers to which account the money will be transferred from and target refers to where the money will be transferred to.</p><p>Lines 105–108 refer to the instance when the bank or account was identified without any tag assigned. For example, if a customer says “transfer $50, savings account”, we don’t yet know whether we should take $50 from the savings account or transfer that amount to the savings account.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*cgC9Dre9G7vqBsD5.jpg" /></figure><p>One more important thing to note is that you shouldn’t worry about the customer asking tangential phrases such as “are you a robot?”, “call me back later”, or “wait a moment”:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*afrBC9oGqIl93vP1.jpg" /></figure><p>As you can see, common reactions not only have the “wait” part, but iAmRobot, for instance, which describes the situation when a customer can digress to asking whether the person on the other side of the phone is a robot. You don’t need to worry about digressions such as a customer asking to repeat a question or a statement AI says, as it’s already accounted for.</p><p>Note that the app follows a slot filling system. From lines 186–192 you see that AI will try to get all the information necessary (what bank to transfer money to, from what account to take the funds from, and what amount to transfer) from the customer. It will go in a loop loop: goto transfer_money; until it has all the information.</p><pre>transitions<br>    {<br>        provide_data: goto transfer_money on #messageHasIntent(&quot;transfer_money&quot;) or #messageHasData(&quot;bank&quot;) or #messageHasData(&quot;account&quot;) or #messageHasData(&quot;numberword&quot;);<br>        loop: goto transfer_money;<br>        confirm: goto transfer_confirmation;<br>    }<br>}</pre><p>Also note that in this particular demo case the app accounts for 2 different users, yet it can account for all the customers that exist in your bank’s database. We can see that from the screenshot below. For this app, we set those two users to have different banks to transfer money to, set one to have both savings and deposit accounts, and the other to have only a deposit account. Additionally, the app accounts for the customer’s balance in order to cancel the transaction in case the customer doesn’t have sufficient funds.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/455/0*fQj2HG-nE2GuKI2d.jpg" /></figure><p>At this point, we got all the information we need from a customer, which is the account they want to transfer money from, the bank account they want to transfer money to, and the amount. Lines 224–258 describe the steps to make AI ask for confirmation. It will repeat all the information received from the customer and if it’s correct (positive: goto process_transfer on #messageHasIntent(“agreement”, “positive”); ), the app proceeds to transfer the money. If it got something wrong (negative: goto transfer_money on #messageHasIntent(“agreement”, “negative”); ), it will ask again for the needed information.</p><pre>node transfer_confirmation<br>{<br>    do<br>    {</pre><pre>        #say(&quot;ask_transfer_confirmation&quot;,<br>        {<br>            amount: $amount,<br>            source_name: $source_account?.name,<br>            source_num: $source_account?.num,<br>            target_name: $target_account?.name,<br>            target_num: $target_account?.num<br>        }<br>        );<br>        wait *;<br>    }<br>    transitions<br>    {<br>        positive: goto process_transfer on #messageHasIntent(&quot;agreement&quot;, &quot;positive&quot;);<br>        negative: goto transfer_money on #messageHasIntent(&quot;agreement&quot;, &quot;negative&quot;);<br>    }<br>    onexit <br>    {<br>        negative: do {<br>            set $amount = &quot;&quot;;<br>            set $source_account = null;<br>            set $target_account = null;<br>            set digression.transfer_data.amount = &quot;&quot;;<br>            set digression.transfer_data.source_account = &quot;&quot;;<br>            set digression.transfer_data.target_account = &quot;&quot;;<br>            set digression.transfer_data.account = &quot;&quot;;<br>        }<br>    }<br>}</pre><p>Let’s go back to lines 194–222 for a moment.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*VL2EXLc2uaGE5jEz.jpg" /></figure><p>This part describes a situation where a customer decides to change the amount they want to be transferred. The block is a graph analog of subroutines that provides a mechanism for code reuse.</p><p>The if part describes a situation where a customer says they want to change the transfer amount and say the exact amount they want to change it to. In which case we notify that the amount has been changed and say the new amount.</p><pre>if(#messageHasData(&quot;numberword&quot;, { value: true })){<br>           var amount = #messageGetData(&quot;numberword&quot;, { value: true })[0]?.value??&quot;&quot;;<br>           #sayText(&quot;Awesome, I&#39;ve just changed the transfer amount to &quot; + amount, repeatMode: &quot;ignore&quot;);<br>           return amount;</pre><p>The else part describes a situation where a customer only says they want to change the transfer amount. Here we ask the customer to tell us the amount they want to change to.</p><pre>else {<br>            #sayText(&quot;What&#39;s the amount you want to be transfered?&quot;, repeatMode: &quot;ignore&quot;);<br>            wait *;</pre><p>Note that digression can happen at any moment of the conversation. For example, a customer could decide to change the amount to be transferred after choosing where to transfer the money to. You can see which phrases will trigger “differentamt” intent in the data.json tab on the left.</p><p>The final step, as mentioned above, is the app concluding the transaction and sending the funds to where the customer specified, lines 247–267 depict that.</p><pre>node process_transfer<br>{<br>    do<br>    {<br>        #say(&quot;wait_for_processing&quot;);<br>        set $result = external transfer_money($amount, $source_account, $target_account);<br>        if($result)<br>        {<br>            #say(&quot;transfer_success&quot;);<br>        }<br>        else<br>        {<br>            #say(&quot;transfer_failed&quot;);<br>        }<br>        #disconnect();<br>        exit;<br>    }<br>    transitions<br>    {<br>    }<br>}</pre><p>And done! Great job, you now have your own automated money transfer conversational AI app!</p><h3>Conclusion</h3><p>Whether your main goal is to reduce errors of your call center team, scale your business or become more effective in daily operations, automating with Dasha conversational AI is the right next step for your bank.</p><p>Now that you know how to build a money transfer app, you can go on to building more elaborate apps that target your main goals. And don’t worry if you encounter complications or have questions — Dasha AI developer team is always ready to help you out.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=7a8c016a4835" width="1" height="1" alt=""><hr><p><a href="https://medium.com/dasha-ai/how-to-get-started-with-customer-service-automation-at-your-bank-7a8c016a4835">How to get started with customer service automation at your bank.</a> was originally published in <a href="https://medium.com/dasha-ai">Dasha AI</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
    </channel>
</rss>