<?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[Cognigy.AI - Medium]]></title>
        <description><![CDATA[Cognigy.AI is a highly flexible Conversational Automation Platform to build advanced, integrated Enterprise Virtual Agents for Customer and Employee Service on chat and voice channels. - Medium]]></description>
        <link>https://medium.com/cognigyai?source=rss----7843ffd8082a---4</link>
        <image>
            <url>https://cdn-images-1.medium.com/proxy/1*TGH72Nnw24QL3iV9IOm4VA.png</url>
            <title>Cognigy.AI - Medium</title>
            <link>https://medium.com/cognigyai?source=rss----7843ffd8082a---4</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Sat, 21 Nov 2026 11:47:49 GMT</lastBuildDate>
        <atom:link href="https://medium.com/feed/cognigyai" rel="self" type="application/rss+xml"/>
        <webMaster><![CDATA[yourfriends@medium.com]]></webMaster>
        <atom:link href="http://medium.superfeedr.com/" rel="hub"/>
        <item>
            <title><![CDATA[Advanced Conversational AI with Amazon Connect and Cognigy]]></title>
            <link>https://medium.com/cognigyai/advanced-conversational-ai-with-amazon-connect-and-cognigy-11ad60d4ff51?source=rss----7843ffd8082a---4</link>
            <guid isPermaLink="false">https://medium.com/p/11ad60d4ff51</guid>
            <category><![CDATA[amazon-connect]]></category>
            <category><![CDATA[conversational-ai]]></category>
            <category><![CDATA[nlu]]></category>
            <category><![CDATA[conversational-commerce]]></category>
            <category><![CDATA[cognigy]]></category>
            <dc:creator><![CDATA[Peter Nann]]></dc:creator>
            <pubDate>Tue, 14 Apr 2020 16:08:20 GMT</pubDate>
            <atom:updated>2020-04-14T16:08:20.422Z</atom:updated>
            <content:encoded><![CDATA[<p><a href="https://aws.amazon.com/connect">Amazon Connect</a> is a cloud contact centre that can be up and running in minutes, on <a href="https://aws.amazon.com/blogs/aws/new-omnichannel-contact-center-web-and-mobile-chat-for-amazon-connect">both telephone and chat channels</a>. It has a pay-as-you-go pricing model that many businesses are starting to find attractive.</p><p>A powerful feature of Connect is that it supports <a href="https://aws.amazon.com/lex">Amazon Lex</a> out-of-the-box for natural language understanding (NLU), able to understand both spoken input on the telephone, and typed input in chat. With Amazon Connect being so easy to access, all of a sudden, the power of Conversational AI can be readily employed in contact centres of all shapes and sizes.</p><p>Or can it?</p><p><strong>NLU is not enough</strong></p><p>You see, NLU is only one part of building a high quality conversational experience. It is only the ‘understanding’ part, and much more is needed to get the user what they need quickly and reliably.</p><p>NLU just captures user input. If we use a website analogy, working NLU just means the user has a working mouse and keyboard — There is a lot left to design and build for a compelling experience. Conversational AI solutions require us to also build the complex and subtle processes of handling a multi-turn, bi-directional conversation; formulating responses such that they are natural and helpful to the user at all times, handling problems gracefully, and accessing multiple external data sources to bring data to bear on the conversation.</p><p><strong>At </strong><a href="https://cognigy.com/"><strong>Cognigy</strong></a><strong> we recently completed an integration with Amazon Connect, bringing together the power of these two platforms. Connect brings a wealth of Contact Centre features that are standard or can be employed with a few clicks, such as call recording, and full chat session handover to agents. Cognigy.AI brings a powerful, low-code tool-set for building and maintaining advanced automated conversations. You can see a demonstration of the Cognigy.AI platform </strong><a href="https://youtu.be/EeOU_f167Xk"><strong>here</strong></a><strong>.</strong></p><p><strong>Standard Amazon Connect / Lex tooling</strong></p><p>While Connect’s in-built ‘Contact Flow’ tool can be used to create simple conversational flows, it uses a basic flowchart paradigm with many limitations at this time. Alternatively, the Lex framework can be used on its own to create complex conversations, but that typically requires significant amounts of back-end code development which often becomes opaque and hard to maintain over time. Sometimes a mixture of the two approaches is used, requiring two skill-sets and two processes to maintain.</p><p><em>Connect &amp; Lex logic tooling:</em></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*SCf2oFCgOGb7nGJ8h7y_lQ.png" /><figcaption>Connect &amp; Lex logic tooling — A basic flow tool, and/or back-end Lambda code</figcaption></figure><p><strong>Cognigy.AI integrated with Amazon Connect</strong></p><p>The <a href="https://cognigy.com/product">Cognigy.AI platform</a> is a perfect complement to the NLU facilitated by Lex. It enables the creation and deployment of advanced, enterprise-class AI-driven conversations which can be very easily integrated with existing back-end systems, such as CRM, ERP or RPA. It solves the limitations of Lex &amp; Connect, with an enterprise-grade, graphical, low-code tool for complex conversations, with many advanced features.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*LgCrm57iZxrm8lVB.jpg" /><figcaption>The Cognigy.AI Flow editor — Many advanced features</figcaption></figure><p>Moreover, with just a few clicks, a conversation built in Cognigy.AI can be deployed to over 15 other channels, such as Alexa, Facebook, SMS or Apple Business Chat. Your organisation can share skill-sets and prior work across multiple conversational projects — Reaching a level of organisational maturity not often seen to date in this space.</p><p>Our integration with Amazon Connect utilises standard features of Lex, which is itself a standard feature of Connect. By using <a href="https://docs.cognigy.com/docs/transformers">Endpoint Transformers</a> and <a href="https://docs.cognigy.com/docs/nlu-transformers">NLU Transformers</a> available in the Cognigy.AI platform, no internal changes were needed, which is an excellent demonstration of the platform’s flexibility.</p><p><strong>Full integration code is available</strong></p><p>A <a href="https://gist.github.com/peternann/41b68c561a955f858ec08285cd54ef25">GitHub Gist is available</a> with all the code needed for this integration. To complete a running test you will need access to a Cognigy.AI platform version 3.6 or greater, your own Amazon Connect instance, a Lex bot to test, and an AWS Lambda function you’ll create.</p><p>But please read the full post before you jump into the code! The easiest order of deployment is described near the end of this post.</p><p><strong>The integration with Connect</strong></p><p>The following graphic shows the overall architecture.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*tIdJAxRCNyXTvQtYDRPLaw.png" /><figcaption>Amazon Connect &amp; Cognigy.AI integration architecture</figcaption></figure><p>As illustrated above, a small <a href="https://aws.amazon.com/lambda">Amazon Lambda function</a> is used, since Lambda is the only back-end integration mechanism supported by Lex. This Lambda is essentially a ‘shim’, of just a few lines of code, which translates the Lambda <a href="https://docs.aws.amazon.com/lex/latest/dg/lambda-input-response-format.html">event from Lex</a> into a request to a <a href="https://docs.cognigy.com/docs/deploy-a-rest-endpoint">Cognigy.AI REST Endpoint</a>:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/592/1*X_5fIFl-GL_16UaFoqGWEw.png" /><figcaption>The crux of the Lambda function ‘shim’</figcaption></figure><p>There is a little more too it than the few lines above, which you can see in <a href="https://gist.github.com/peternann/41b68c561a955f858ec08285cd54ef25">the Gist that accompanies this post</a>, but the above code illustrates the core behaviour of the Lambda function — Not much to it.</p><p>Cognigy.AI’s <a href="https://docs.cognigy.com/docs/transformers">Endpoint Transformers</a> are used on the REST Endpoint to translate the NLU result in <a href="https://docs.aws.amazon.com/lex/latest/dg/lambda-input-response-format.html">Lex format</a>, into the expected <a href="https://docs.cognigy.com/docs/deploy-a-rest-endpoint#section-final-step-connect-your-application-to-the-endpoint">Cognigy REST format</a>.</p><p>An <a href="https://docs.cognigy.com/docs/nlu-transformers">NLU Transformer</a> (a new feature in <a href="https://hello.cognigy.com/news/cognigy.ai-3.6-release-article">Cognigy.AI v3.6</a>) is also used to achieve some increased convenience with NLU handling in the Cognigy.AI Flows. More on this below.</p><p><strong>NLU — We have options</strong></p><p>Both Lex and Cognigy.AI can carry out NLU. For this blog post we decided to use Lex for NLU processing. For an organisation invested in the Amazon Connect ecosystem, we believe this will be a common choice. This means that Intents and Slots will be extracted by a fully-formed Lex NLU model, before being passed into the Cognigy.AI REST Endpoint. The raw text string of what the user typed or spoke is also included.</p><p>Another option for NLU would be to use the raw text string supplied from Lex, and process that within Cognigy.AI to derive intents and slots. This could utilise the in-built Cognigy NLU, or another NLU engine available in the platform. Contact us at <a href="/service/mailto:support@cognigy.com?subject=Amazon%20Connect%20integration">support@cognigy.com</a> for more information on this option.</p><p><strong>Passing Lex NLU results into Cognigy</strong></p><p>The Lambda code snippet above shows that we pass the full Lambda event into Cognigy.AI, which is not expecting such a format.</p><p>In fact, Cognigy.AI does not typically expect NLU information to come in via a channel Endpoint.</p><p>We solve the format problem with an <a href="https://docs.cognigy.com/docs/input-transformer">Input Transformer</a> configured within a <a href="https://docs.cognigy.com/docs/deploy-a-rest-endpoint">REST Endpoint</a>, which simply takes the Lex Lambda event, and processes it into data structures that we then passes into our conversational Flows.</p><p>The core of the <a href="https://docs.cognigy.com/docs/input-transformer">Input Transformer</a> function is quite simple:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/619/1*B3og9Id24BT4NZ3V_Yb0zA.png" /><figcaption>Cognigy Input Transformer</figcaption></figure><p>See <a href="https://gist.github.com/peternann/41b68c561a955f858ec08285cd54ef25">the Gist</a> for full details.</p><p>The ‘data’ property is a powerful feature across Cognigy.AI to include/attach arbitrary data for many and varied uses.</p><p>The critical part above is that the full Lex event, in the variable ‘lex’ above, is passed through into the platform in ‘data’. This will be accessible as ‘ci.data.lex’ in a Flow, and critically: is also available in an <a href="https://docs.cognigy.com/docs/nlu-transformers">NLU Transformer</a> as ‘data.lex’.</p><p>An <a href="https://docs.cognigy.com/docs/execution-finished-transformer">Execution Finished Transformer</a> is also configured, to turn aggregated Flow outputs (mainly: The response to speak) into a format that Lex will understand. This is a little more complex and not highly important to show here, so see <a href="https://gist.github.com/peternann/41b68c561a955f858ec08285cd54ef25">the Gist</a> for details.</p><p>Note that CustomerNumber (the calling phone number) and ContactId (a UUID for the specific call) as seen above should be passed through from Connect — we show you how below. The code above defaults these to random UUID values if not supplied.</p><p><strong>Using Lex intents in place of Cognigy intents</strong></p><p>The remaining challenge is using the Lex-detected intents inside our Cognigy Flows.</p><p>We wanted to achieve a solution which would capitalise on some of the convenient features of Cognigy NLU — Namely the convenience of <a href="https://docs.cognigy.com/docs/intents#section-default-replies">Default Replies</a> attached to intents, such that we need no Flow logic to handle simple user queries that have simple ‘one-shot’ answers, often referred to as ‘FAQs’.</p><p>This is where the new <a href="https://docs.cognigy.com/docs/nlu-transformers">NLU Transformer</a> feature was employed. Above, we stored the Lex result as ‘data.lex’, and this can now be used in an NLU Transformer.</p><p>We configure the REST Endpoint to use Cognigy NLU, but then ‘Transform’ the result to essentially cause the Lex intent result to overwrite the Cognigy intent result, with the following NLU Transformer code:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/786/1*sEymTdsBMuonmTmVwKowvA.png" /><figcaption>NLU Transformer — Lex intent overrides Cognigy intent</figcaption></figure><p>With this in place, any Cognigy intents with names matching Lex intents, will emit their ‘Default Replies’ as configured in the Cognigy.AI GUI. This is a simple, powerful way to answer basic questions from users (FAQs), without having to build an explicit flow for each.</p><p>You may also notice above that Lex slots are ‘merged’ in with the Cognigy slots, so both are available. This allows Flows to take advantage of Cognigy’s powerful and automatic functionality of <a href="https://docs.cognigy.com/docs/lexicon">Slot and Keyphrase extraction</a>, for use in all decision Flows, as well as Lex-detected slots.</p><p><strong>The final piece of the puzzle</strong></p><p>As a recap, the steps to utilise Cognigy.AI from Amazon Connect, in the most convenient sequence to deploy, are:</p><ol><li>In Cognigy.AI 3.6 project, create a new NLU Connector, of type ‘Cognigy’, insert the NLU Transformer code <a href="https://gist.github.com/peternann/41b68c561a955f858ec08285cd54ef25">from the Gist</a>, and be sure to enable the ‘post NLU Transformer ’ with the toggle above the code</li><li>Create a REST Endpoint, using the NLU Connector created above, insert the Endpoint Transformer code, and enable the ‘Input’ and ‘Execution Finished’ Transformers with the toggles</li><li>Create an AWS Lambda function, using the code <a href="https://gist.github.com/peternann/41b68c561a955f858ec08285cd54ef25">from the Gist</a>, and alter the doPOST() URL to be the ‘Endpoint URL’ from the REST Endpoint configured above</li><li>Create/Use a <a href="http://console.aws.amazon.com/lex/home">Lex bot</a> — Each intent should use the above Lambda function for fulfillment</li><li>Ensure Connect can access your Lex bot. Head to the Amazon Connect <a href="https://console.aws.amazon.com/connect/home">service console</a>, select your instance, and navigate to ‘Contact Flows’. There should be a section called Lex where you can add your bot.</li><li>Now finally : Access the Lex bot from your Connect ‘Contact Flow’. See below!</li></ol><p>The final step is to integrate the Lex bot into a Connect Flow. In the Connect ‘Contact Flow’ editor, add a ‘Get customer’ input block. It will end up looking something like this:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/709/1*7bebsnjXuQRYX829bNpuLA.png" /></figure><p>Where ‘LexTest’ will be replaced by your Lex bot’s name, and the region may be different. Configure the block as shown below. Note that the very first prompt played by the bot is supplied in this block in Connect; also select your Lex bot in place of ‘LexTest’.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/408/1*2flJdg0RhXFYKj1qfblOmw.png" /></figure><p>To pass through some useful session attributes from Connect, through Lex, and to Cognigy.AI, also add these session attributes exactly as shown to the block:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/408/1*BzZYPzM5-uHPmU3Sk8x1UQ.png" /></figure><p><strong>Ready to run!</strong></p><p>If all is well, you can now <a href="https://docs.aws.amazon.com/connect/latest/adminguide/chat-testing.html">test the phone or chat experience in Connect</a>.</p><p>When you respond, your first input should be processed in your Cognigy.AI Flow, and then the conversation should follow your Cognigy.AI Flow logic, utilising Lex detected intents.</p><p><strong>Seeing what’s what</strong></p><p>If you have your Flow running, that’s great!</p><p>If not, we need to see what’s what.</p><p>You may have noticed that the code samples in <a href="https://gist.github.com/peternann/41b68c561a955f858ec08285cd54ef25">the accompanying Gist</a>, include ‘console.log()’ lines to emit key information. So look in your Cognigy.AI project logging, turn on ‘Debug’ view, and look for lines starting with ‘########’. These should help to see what is happening at key points with this integration. If you need to dig deeper, add or alter console.log() lines to print more details.</p><p>You may want to delete the lines once you are happy with your integration.</p><p><strong>Epilogue</strong></p><p>This concludes the groundwork for this integration.</p><p>Where you take your solution, with the power of Cognigy, Connect and Lex, is up to you!</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=11ad60d4ff51" width="1" height="1" alt=""><hr><p><a href="https://medium.com/cognigyai/advanced-conversational-ai-with-amazon-connect-and-cognigy-11ad60d4ff51">Advanced Conversational AI with Amazon Connect and Cognigy</a> was originally published in <a href="https://medium.com/cognigyai">Cognigy.AI</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Connecting LiveChat to Cognigy.AI Enterprise Virtual Agents using Endpoint Transformers]]></title>
            <link>https://medium.com/cognigyai/connecting-livechat-to-cognigy-ai-enterprise-virtual-agents-using-endpoint-transformers-a4e74d18bc84?source=rss----7843ffd8082a---4</link>
            <guid isPermaLink="false">https://medium.com/p/a4e74d18bc84</guid>
            <category><![CDATA[live-chat]]></category>
            <category><![CDATA[customer-service]]></category>
            <category><![CDATA[conversational-ai]]></category>
            <category><![CDATA[chatbots]]></category>
            <category><![CDATA[automation]]></category>
            <dc:creator><![CDATA[Cognigy]]></dc:creator>
            <pubDate>Wed, 18 Mar 2020 10:02:48 GMT</pubDate>
            <atom:updated>2020-03-22T13:20:22.620Z</atom:updated>
            <content:encoded><![CDATA[<p>In this tutorial we’re describing how to use Cognigy.AI’s Endpoint Transformers to create a seamless, blended virtual agent/human agent customer service solution.</p><p><a href="https://www.livechatinc.com/">LiveChat </a>is an application that enables the visitors on your website to chat live with your customer support.</p><p><a href="https://www.cognigy.com/">Cognigy.AI</a> is an application that enables the creation and deployment of advanced, enterprise-class virtual agents (essentially chatbots 2.0) which can be integrated with existing back-end systems, such as CRM, ERP or RPA tools, with ease. See a demo of Cognigy.AI <a href="https://youtu.be/EeOU_f167Xk">here</a>.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*yyUrWv3Lzgjm7M9U7AiXgA.png" /><figcaption>Cognigy.AI Architecture</figcaption></figure><p><strong>The Goal<br></strong>We want to place a chat window on our website and have a virtual agent answer customer queries. If the virtual agent doesn’t know the answer, we want to hand over the chat to a human agent and possibly hand it back to the virtual agent at a later stage.</p><p><strong>The Challenge</strong><br>The main challenge lies in how to connect LiveChat to Cognigy.AI and have Cognigy.AI process the events which LiveChat is passing to Cognigy.AI’s Endpoints. We also had to find a way to pass back the answers of the virtual agent to LiveChat, including text, images and the structured messages LiveChat supports. Finally the virtual agent must be able to hand the chat to a human agent.</p><p><strong>The Solution</strong><br>Both LiveChat (<a href="https://developers.livechatinc.com/docs/">documentation</a>) and Cognigy.AI (<a href="https://docs.cognigy.com/">documentation</a>) have extensive, well-defined APIs, which make life easier. The solution in this case is to create a LiveChat Bot Agent which handles incoming messages and forwards them to a Cognigy.AI webhook. Here the messages are processed using Cognigy.AI’s Natural Language Understanding and the Dialog Manager generates the outputs to go back to LiveChat. These are sent against LiveChat’s Agent API and are in turn passed back to the customer chat window.</p><p>On the Cognigy.AI side, a generic REST Endpoint is used to receive the messages and Endpoint Transformer Functions are used to format the incoming LiveChat messages and send the outgoing virtual agent messages back against the LiveChat Agent API.</p><p>The following graphic shows the overall architecture.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*hrt0vnZi7PnEQYMbzhh3-w.png" /><figcaption>LiveChat &amp; Cognigy.AI Architecture</figcaption></figure><p><strong>Step-by-Step Tutorial</strong><br>The following section describes the steps to take to achieve a working version of the abovementioned solution.</p><p>In Cognigy.AI: <strong>Set up virtual agent</strong><br>Create a virtual agent in Cognigy.AI. A tutorial on how to do this can be found <a href="https://docs.cognigy.com/docs/hello-world">here</a>. Then create a <a href="https://docs.cognigy.com/docs/deploy-a-rest-endpoint">REST Endpoint</a> which points to the virtual agent. <br>Copy the Endpoint URL to clipboard.</p><p>In LiveChat: <strong>Create Personal Access Token with correct scopes</strong></p><p>In order to use LiveChat’s APIs, you have to use one of several authentication flows. For simplicity’s sake, we have opted for <a href="https://developers.livechatinc.com/docs/getting-started/authorization/#personal-access-tokens">Personal Access Tokens</a> (PAT) in this case.</p><p>Go to the L<a href="https://developers.livechatinc.com/console/tools/personal-access-tokens">iveChat Developer Console</a> and create your PAT. Make sure to give the Token the correct scopes needed for this tutorial:</p><ul><li><em>chats — all:rw</em></li><li><em>chats.conversation — all:rw</em></li><li><em>agents-bot — my:rw</em></li><li><em>agents-bot — all:rw</em></li><li><em>properties — my:rw</em></li><li><em>webhooks — all:rw</em></li></ul><p>In LiveChat: <strong>Create Bot Agent with correct config</strong></p><p>With the abovementioned PAT, you can now create a new <a href="https://developers.livechatinc.com/docs/management/configuration-api/#bot-agents">bot agent</a> via LiveChat’s <a href="https://developers.livechatinc.com/docs/management/configuration-api/">Configuration API</a>. When creating the bot agent, you need to specify the webhook where events will be sent and which events to send. The webhook to send the events to is the Endpoint URL you copied above. The events to subscribe to are:</p><ul><li><em>incoming_chat_thread</em></li><li><em>incoming_event</em></li><li><em>incoming_rich_message_postback</em></li></ul><p>In order to use the Configuration API with the PAT, you need to use Basic Authentication and use the Account ID (can be found on the PAT page) as the user and the Token as the password.</p><p>Below is the payload to use to create the Bot Agent.</p><pre>{<br>  &quot;name&quot;: &quot;Cognigy Bot&quot;,<br>  &quot;status&quot;: &quot;accepting chats&quot;,<br>  &quot;default_group_priority&quot;: &quot;first&quot;,<br>  &quot;webhooks&quot;: {<br>    &quot;url&quot;: &quot;YOUR_ENDPOINT_URL&quot;,<br>    &quot;secret_key&quot;: &quot;anything you like&quot;,<br>    &quot;actions&quot;: [<br>      {<br>        &quot;name&quot;: &quot;incoming_chat_thread&quot;<br>      },<br>      {<br>        &quot;name&quot;: &quot;incoming_event&quot;<br>      },<br>      {<br>        &quot;name&quot;: &quot;incoming_rich_message_postback&quot;<br>      }<br>    ]<br>  }<br>}</pre><p>In LiveChat: <strong>Create two new groups, one for Bots, one for Agents</strong></p><p>Now that we have our Bot Agent created (and it shows up in the LiveChat UI), let’s create two new Groups inside LiveChat, one for Bot Agents, one for Human Agents. To do that, navigate to your Groups overview under the Agents section and click Add &gt; Create a Group (<a href="https://my.livechatinc.com/agents/groups/add">or follow this link</a>). Create one group called “Bot Group” (and add your Cognigy Bot into it) and one group called “Agent Group” (and add your human agents into it). We need that second group, because all users, including Bot Agents are in the default “General Group”. Remember the ID for your Agent Group (you can find it in the URL when editing it).</p><p>In LiveChat: <strong>Create routing rules to route all chats to Bot Group</strong></p><p>In the LiveChat settings, create a URL rule to route all incoming chats to the Bots group initially. This will route every incoming chat to the virtual agent first.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*A0anhYxM4025vnofJ5BLTA.png" /><figcaption>Routing in LiveChat</figcaption></figure><p>In Cognigy.AI: <strong>Create Endpoint Transformers to handle LiveChat payloads</strong></p><p>Endpoint Transformer Functions allow you to hook into the input, output and other events in Cognigy.AI (learn more about that <a href="https://docs.cognigy.com/docs/transformers">here</a>).</p><p>In this case we need two transformers:</p><ol><li>An Input Transformer which receives the LiveChat webhook events</li><li>An Output Transformer which receives Cognigy.AI outputs, formats these for LiveChat’s Agent API and sends them via an authenticated HTTP request</li></ol><p>Now you have to write your Transformer Code. To make things easy, we have uploaded the <a href="https://github.com/Cognigy/TransformersSamples/tree/master/LiveChatIncEndpoint">Transformer Code to our GitHub Repo</a>. Simply paste it into your Endpoint’s Transformer Functions tab, enter your Account ID, Token and Agent Group ID in the transformer code on top and activate the Input and Output Transformer toggles on top.</p><p><strong>Test it<br></strong>When you speak to your bot on your website, it should now redirect everything to your Cognigy.AI virtual agent.</p><p><strong>Handover</strong><br>To trigger a human handover, create a Say Node in your Cognigy.AI Flow which contains the following data output:</p><pre>{<br>  &quot;handover&quot;: true<br>}</pre><p>This will move the chat to your Agent Group. When the agent is done with the chat, they can hand the conversation back to the bot by transferring it to the Bot Group (hint: if you don’t see the Bot Group in the transfer dialog, try refreshing your browser window).</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=a4e74d18bc84" width="1" height="1" alt=""><hr><p><a href="https://medium.com/cognigyai/connecting-livechat-to-cognigy-ai-enterprise-virtual-agents-using-endpoint-transformers-a4e74d18bc84">Connecting LiveChat to Cognigy.AI Enterprise Virtual Agents using Endpoint Transformers</a> was originally published in <a href="https://medium.com/cognigyai">Cognigy.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 Start Conversational AI Projects]]></title>
            <link>https://medium.com/cognigyai/how-to-start-conversational-ai-projects-fe9d27fdccb9?source=rss----7843ffd8082a---4</link>
            <guid isPermaLink="false">https://medium.com/p/fe9d27fdccb9</guid>
            <category><![CDATA[use-cases]]></category>
            <category><![CDATA[chatbots]]></category>
            <category><![CDATA[conversational-ai]]></category>
            <category><![CDATA[project-management]]></category>
            <category><![CDATA[cognigy]]></category>
            <dc:creator><![CDATA[Christoph Bullmann]]></dc:creator>
            <pubDate>Fri, 24 Jan 2020 16:26:33 GMT</pubDate>
            <atom:updated>2020-01-28T17:41:37.405Z</atom:updated>
            <content:encoded><![CDATA[<p>When our customers start their first conversational AI (chatbot) project, there is usually some confusion on how to do it; this guide should help to find an answer to that question.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*x4skhnr9KmObqhNKzfJ4PQ.jpeg" /><figcaption>Image by <a href="https://pixabay.com/users/889520-889520/?utm_source=link-attribution&amp;utm_medium=referral&amp;utm_campaign=image&amp;utm_content=2284501">Malachi Witt</a> from <a href="https://pixabay.com/?utm_source=link-attribution&amp;utm_medium=referral&amp;utm_campaign=image&amp;utm_content=2284501">Pixabay</a></figcaption></figure><h3>Define Use Cases</h3><p>In many of the Cognigy AI projects I have been involved in, much of the initial confusion was created by technologies that had been heavily promoted by others but were not useful in the project’s context. A good example for this would be an Amazon Alexa Skill in a B2B automation setting. Imagine an office with everyone shouting at their Amazon Alexa-enabled devices. Now imagine the same office with people typing with a chatbot on a website. I would much prefer the second scenario, based on noise level, data protection and legal requirements.</p><blockquote>You should have your use cases defined before you select the technology.</blockquote><p>However, sometimes it is not possible to do that, technology selection has often been a very political topic in projects. You always have to work within the restrictions of your environment.</p><h3>Use Case Environment</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Tu5vbJHU_hUx_fQMTwRmDA.jpeg" /><figcaption>Image by <a href="https://pixabay.com/users/igorovsyannykov-6222956/?utm_source=link-attribution&amp;utm_medium=referral&amp;utm_campaign=image&amp;utm_content=2693078">Igor Ovsyannykov</a> from <a href="https://pixabay.com/?utm_source=link-attribution&amp;utm_medium=referral&amp;utm_campaign=image&amp;utm_content=2693078">Pixabay</a></figcaption></figure><p>Chatbot use cases can generally be categorized in <strong>external </strong>and <strong>internal use cases</strong>. This categorization defines the handling of sensitive information and data. It also determines how polished the release must be; internal application is often more forgiving and has less legal requirements. In case you have not thought about your target audience before, this is a good point to start.</p><h3>External Use Cases</h3><p>are often based on marketing campaigns</p><blockquote><em>Campaign Promotion:</em><br>- Brands<br>- Products<br>- Limited time offers<br>- …</blockquote><p>or focus on service desk automation</p><blockquote><em>Incident Reporting:</em><br>- Orders<br>- Cancellations<br>- Warranty claims<br>- …</blockquote><blockquote><em>Information Retrieval:</em><br>- How to XXX?<br>- What is XXX?<br>- What to do when XXX?<br>- …</blockquote><h3><strong>Internal Use Cases</strong></h3><p>often fall into the area of RPA (robotic process automation), the most common application area is the internal service desk, covering one or more of the following aspects:</p><blockquote><em>Incident Reporting:</em><br>- Printer not working<br>- Hardware requests<br>- Vacant job position<br>- …</blockquote><blockquote><em>Information Retrieval:</em><br>- Who is responsible for XXX?<br>- Who can help me with XXX?<br>- Where can I find XXX?<br>- …</blockquote><h3>Value Creation</h3><p>Both internal and external use cases need to create value for your company to ensure project success. They usually do it in one of the following ways:</p><h4><strong>Cost Efficiency:</strong></h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*79comp6oL7XKPLtADm5ZKw.jpeg" /><figcaption>Image by <a href="https://pixabay.com/users/geralt-9301/?utm_source=link-attribution&amp;utm_medium=referral&amp;utm_campaign=image&amp;utm_content=499481">Gerd Altmann</a> from <a href="https://pixabay.com/?utm_source=link-attribution&amp;utm_medium=referral&amp;utm_campaign=image&amp;utm_content=499481">Pixabay</a></figcaption></figure><p><em>Reduce call center engagement by:</em><br>- Solving the issue without the need for human interaction<br>- Providing necessary information before the human interaction, therefore reducing call time</p><p><em>Reduce generated paperwork by:<br>- </em>Preventing mail<br>- Reducing necessary amount of coordination between employees</p><p><em>Reduce licensing costs by:<br>- </em>Reducing the necessary number of employees with system access</p><p><em>Reduce opportunity costs by:<br>- </em>Reducing the churn rate of customers</p><h4>Process Efficiency</h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*ca84WGeqRVEcDIaUrn8Vog.jpeg" /><figcaption>Image by <a href="https://pixabay.com/users/NataliSamorod-12674614/?utm_source=link-attribution&amp;utm_medium=referral&amp;utm_campaign=image&amp;utm_content=4492709">Natali Samorod</a> from <a href="https://pixabay.com/?utm_source=link-attribution&amp;utm_medium=referral&amp;utm_campaign=image&amp;utm_content=4492709">Pixabay</a></figcaption></figure><p><em>Freeing up time of existing employees for high value processes:</em><br>- Reduce time spent on searching for information<br>- Reducing the time employees spend on low value processes (e.g. password resets)</p><h4>Reach Extension</h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*OjbJ9csEKLlCnQ3m6V9zng.jpeg" /><figcaption>Image by <a href="https://pixabay.com/users/sumanley-2265479/?utm_source=link-attribution&amp;utm_medium=referral&amp;utm_campaign=image&amp;utm_content=3228704">Sumanley xulx</a> from <a href="https://pixabay.com/?utm_source=link-attribution&amp;utm_medium=referral&amp;utm_campaign=image&amp;utm_content=3228704">Pixabay</a></figcaption></figure><p><em>Serve new channels, previously blocked by:</em><br>- Missing integration<br>- Staff shortage<br>- Staffing costs</p><p><em>Serve channels 24/7, previously blocked by:</em><br>- Labor laws<br>- Staff shortage<br>- Staffing costs</p><h3>Use Case Prioritization</h3><p>A prioritization should take place once you have identified your use cases. This will make it easier to work iteratively and create maximum value within the project constraints. It will also help with decision making, when the requirements for two use cases conflict with each other.</p><h3>Use Case Evolution</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*ipN9uTaJDDCE1K1KVdZigg.jpeg" /><figcaption>Image by <a href="https://pixabay.com/photos/?utm_source=link-attribution&amp;utm_medium=referral&amp;utm_campaign=image&amp;utm_content=1209640">Free-Photos</a> from <a href="https://pixabay.com/?utm_source=link-attribution&amp;utm_medium=referral&amp;utm_campaign=image&amp;utm_content=1209640">Pixabay</a></figcaption></figure><p>Keep in mind that the initial use case definition might not be that perfect, technical, legal or other circumstances have not been taken into consideration. We also often see that the initial use case definition and vision expands over the course of the project, with new ideas being generated during testing. Therefore, keep in mind that you might have to change the use case definitions during the project and adjust Flows and Intents accordingly.</p><h3>Use Case Implementation</h3><p>Feel free to get in touch with us by <a href="https://hello.cognigy.com/cognigy-demo-request">requesting a demo</a>!</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=fe9d27fdccb9" width="1" height="1" alt=""><hr><p><a href="https://medium.com/cognigyai/how-to-start-conversational-ai-projects-fe9d27fdccb9">How to Start Conversational AI Projects</a> was originally published in <a href="https://medium.com/cognigyai">Cognigy.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 build a Google Maps plugin for Cognigy.AI’s Webchat]]></title>
            <link>https://medium.com/cognigyai/how-to-build-a-google-maps-plugin-for-cognigy-ais-webchat-737ec8305f16?source=rss----7843ffd8082a---4</link>
            <guid isPermaLink="false">https://medium.com/p/737ec8305f16</guid>
            <category><![CDATA[cognigy]]></category>
            <category><![CDATA[react]]></category>
            <category><![CDATA[chatbots]]></category>
            <category><![CDATA[webchat]]></category>
            <category><![CDATA[google-maps]]></category>
            <dc:creator><![CDATA[Miriam Schröder]]></dc:creator>
            <pubDate>Fri, 09 Aug 2019 13:37:27 GMT</pubDate>
            <atom:updated>2019-12-09T10:11:02.021Z</atom:updated>
            <content:encoded><![CDATA[<p>Context is key for a delightful conversational experience, because utterances often can’t be understood in isolation, they can only be understood in context. Therefore, how cool would it be to use location-based services and display maps? With Cognigy.AI this works like a charm, thanks to its</p><ul><li>Custom Integration Framework, and</li><li>extensible Webchat architecture.</li></ul><p>In this tutorial we will learn how to use a webchat plugin to show an exact location on a map using Google Maps and how to build a Custom Module to invoke the plugin in a user-friendly way.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/450/1*xnC0l4_ug8T-Zyv09GRcKg.png" /><figcaption><em>Locations and maps: Enrich a conversation with context and multimodal elements to improve the User Experience.</em></figcaption></figure><h3>Building a Webchat Plugin to display Google Maps</h3><p>We take the <a href="https://github.com/google-map-react/google-map-react">Google Maps React</a> component as a starting point and turn it into a <a href="https://docs.cognigy.com/docs/cognigy-webchat#section-webchat-plugins">Webchat Plugin</a> for the conversational AI platform <a href="https://cognigy.com/">Cognigy.AI</a> according to the instructions <a href="https://github.com/Cognigy/WebchatPlugins/blob/master/README.md">here</a>:</p><p>1. Setting up the environment</p><p>2. Writing the code</p><p>3. Using the Plugin</p><h3>Setting up the environment</h3><p>1. Create a new project plugin and initialize it with npm init</p><p>2. Also, install <a href="https://www.npmjs.com/package/react">react</a>, <a href="https://www.npmjs.com/package/@google/maps">@google/maps</a>, <a href="https://www.npmjs.com/package/google-map-react">google-map-react</a>, <a href="https://www.npmjs.com/package/react-dom">react-dom</a> by running npm i <em>“component”</em> successively</p><p>3. The installation has changed your package.js-file. Now, add a build job in the scripts field:</p><pre>“build”: “parcel build — out-file webchat-plugin.js ./src/index.jsx”</pre><p>4. Create a folder named src in which you create an index.jsx file, which we will fill in the next steps.</p><h3>Writing the code</h3><p>All the logic of a Webchat Plugin goes into the index.jsx file as a react based “Message Component”.</p><p>1. Create a React Component that will be used to render a message. Via its props, it will get a message property representing the content of the message we want to render. Inside that message object, we have a &lt;div&gt; with a size containing a GoogleMapReact component.</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/9f289d02312c5b5140684d9d26404163/href">https://medium.com/media/9f289d02312c5b5140684d9d26404163/href</a></iframe><p>2. Now that we have our Message Component, it’s time to use it in a plugin definition. A Message Plugin definition is an object that must contain a match and a component value. The match value is used to decide for which messages this plugin should be used, and the component value tells the webchat what Message Component to use with this plugin. Setting match to ‘google-maps’ means that this plugin will match if a message has data that is set up like this:</p><pre>{<br> &quot;_plugin&quot;:{<br>  &quot;type&quot;:&quot;google-maps&quot;<br> }<br>}</pre><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/bb0ae6482ac4d7d48d365787b2255419/href">https://medium.com/media/bb0ae6482ac4d7d48d365787b2255419/href</a></iframe><p>3. Finally, register the Plugin. In order to cause the plugin to be recognized by the webchat, it needs to be put at a specific location in the window object. At that location, we have a list of webchat plugins where we want to append out plugin. Because our plugin might be registered first, it may be that the list does not exist yet, so we must make sure to create it if it does not exist yet.</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/c4852ff4468dd466038a21f4d73ba122/href">https://medium.com/media/c4852ff4468dd466038a21f4d73ba122/href</a></iframe><h3>Using the Plugin</h3><p>Now that we have our complete plugin code ready, we can go on and build it, load it into the inbuilt Cognigy.AI webchat and use it.</p><p>1. To create a package of the Webchat Plugin enter npm run build in the command line within the plugin folder. It should create a webchat-plugin.js file.</p><p>2. Upload that file to a web server the chatbot can access (for example Amazon S3).</p><p>3. Now add the Plugin URL in Webchat Plugins section at the bottom of your <a href="https://docs.cognigy.com/docs/integrated-demo-page#section-webchat-plugins">Webchat configuration</a> by clicking +.</p><p>4. Now in a Cognigy Flow, create a Say Node that calls the plugin<a href="#_msocom_1">[PH1]</a> by filling the data part as follows:</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/d0c739da478b6d0f99710ed197a3c3d4/href">https://medium.com/media/d0c739da478b6d0f99710ed197a3c3d4/href</a></iframe><p>If you want to use the plugin on your live website, you have to include the plugin into your website source as explained here: <a href="https://docs.cognigy.com/docs/working-with-webchat-plugins-in-cognigy-ui">https://docs.cognigy.com/docs/working-with-webchat-plugins-in-cognigy-ui</a></p><h3>Building a Custom Module to retrieve a location using Google’s Geocoding API</h3><p>Whilst we can trigger plugins from a Say Node, it would be more convenient to give business users a graphical UI to configure the plugin. This we can achieve with a Custom Module.</p><p>To use the Webchat Plugin built in the previous step, you need the longitude and latitude. If you don’t have those coordinates, you can use a geocoding API. Thus, we build a <a href="https://github.com/Cognigy/CustomModules">Custom Module</a> for <a href="https://docs.cognigy.com/docs/integration-framework">Cognigy.AI’s Custom Integration Framework</a>. This makes accessing the Google’s Geocoding API easy. You only need to send it the desired address and get the coordinates in return. Those can then be used for displaying a map inside the conversation. Follow the steps below to create a Custom Module for this purpose:</p><p>1. Setting up the environment</p><p>2. Writing the code</p><p>3. Using the Custom Module</p><h3>Setting up the environment</h3><p>1. Create a new project called Custom Module and initialize it with npm init</p><p>2. Also install request &amp; request-promise by running npm I “component” successively</p><p>3. Customize the package.json document so that the main line looks like this:</p><pre>“main”: “src/module.js”,</pre><p>4. Always create a README.md file</p><p>5. Create a folder src in which you create a module.js file</p><h3>Writing the code</h3><p>All the logic of a Custom Module goes into the module.js file.</p><ol><li>Use the require function to resolve the request-promise module in the Node search path</li></ol><pre>const request = require(‘request-promise’);</pre><p>2. Define the input fields that should be available in your custom module</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/a680468c9ced0e1976fd3d1834947a17/href">https://medium.com/media/a680468c9ced0e1976fd3d1834947a17/href</a></iframe><p>3. Now we define an asynchronous function showGoogleMaps with two parameters. Make sure all parameters have the correct content. When we receive an address to search for, the request will be sent to <a href="https://developers.google.com/maps/documentation/javascript/geocoding">Google Maps Geocoding</a> and we will get the appropriate longitude and latitude values. This requires a valid <a href="https://developers.google.com/maps/documentation/javascript/get-api-key">API key</a>.</p><p>4. Generate in the function a message that can be interpreted by the plugin. And then return a Cognigy.AI object.</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/308380ed4cf5a05b82422a9297987fb9/href">https://medium.com/media/308380ed4cf5a05b82422a9297987fb9/href</a></iframe><h3>Using the Custom Module</h3><p>1. Zip the root of the module and the / build folder</p><p>2. Upload the zipped module into your Cognigy.AI installation through the Cognigy Integration Framework Manager.</p><h3>Now we have all the components together and can use the Google Maps Plugin with a Webchat:</h3><p>1. If you are using the Cognigy.AI Webchat, enter the URL of your plugin there.</p><p>2. Create a <a href="https://docs.cognigy.com/docs/secrets">Cognigy Secret</a> in your Cognigy.AI-Project for accessing the Google API. The secret key needs to be named api_key and the value must contain your Google Maps API Key.</p><p>3. Create a flow using your Custom Module Node.</p><p>4. Add the Node and fill in all the necessary fields of the module to display the Google Map. The Secret field requires a Cognigy Secret with a valid Google Maps API Key (see step 2).</p><h3>What’s next?</h3><p>Want to take the Custom Module and Webchat Plugin for a spin? Check out our Module GitHub Repo <a href="https://github.com/Cognigy/CustomModules">https://github.com/Cognigy/CustomModules</a> and our example Webchat Plugins <a href="https://github.com/Cognigy/WebchatPlugins/blob/master/docs/examples.md">https://github.com/Cognigy/WebchatPlugins/blob/master/docs/examples.md</a>. Need more technical information? Have a look at our docs: <a href="https://docs.cognigy.com/docs">https://docs.cognigy.com/docs</a>. Ready to give it a go? Contact your Cognigy.AI sales rep or request a demo: <a href="https://hello.cognigy.com/cognigy-demo-request">https://hello.cognigy.com/cognigy-demo-request</a>!</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=737ec8305f16" width="1" height="1" alt=""><hr><p><a href="https://medium.com/cognigyai/how-to-build-a-google-maps-plugin-for-cognigy-ais-webchat-737ec8305f16">How to build a Google Maps plugin for Cognigy.AI’s Webchat</a> was originally published in <a href="https://medium.com/cognigyai">Cognigy.AI</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Push notifications for Google Assistant (Actions on Google)]]></title>
            <link>https://medium.com/cognigyai/push-notifications-for-google-assistant-actions-on-google-4fb4cf2d529b?source=rss----7843ffd8082a---4</link>
            <guid isPermaLink="false">https://medium.com/p/4fb4cf2d529b</guid>
            <category><![CDATA[google-assistant]]></category>
            <category><![CDATA[push-notification]]></category>
            <category><![CDATA[cognigy]]></category>
            <category><![CDATA[chatbots]]></category>
            <category><![CDATA[actions-on-google]]></category>
            <dc:creator><![CDATA[Sascha Wolter]]></dc:creator>
            <pubDate>Sun, 19 May 2019 19:01:01 GMT</pubDate>
            <atom:updated>2019-05-19T19:01:00.987Z</atom:updated>
            <content:encoded><![CDATA[<p>The Google Assistant push notification feature allows you to send notifications, which if tapped, trigger a predefined intent of your Action. To be able to send notifications to a user they must first explicitly opt-in to receive notifications for a specific intent. This intent must be configured to be eligible as intent that supports push notifications. Setting up Notifications the first time might be a little tedious, but once you succeed, it’s easily repeatable. Furthermore, this knowledge is also applicable for similar <a href="https://developers.google.com/actions/assistant/updates/overview">user engagement</a> features like updates.</p><p>There are a bunch of <strong>pitfalls </strong>to be aware of while developing:</p><ul><li>Push notifications aren’t currently supported on voice-activated speakers.</li><li>Actions cannot be configured to trigger the Default Welcome Intent from a push notification.</li><li>You can send up to 10 notifications per user per day.</li><li>Sending notifications is limited to one notification per user per minute.</li><li>There may be limitations associated with the chosen language.</li></ul><p>Building an Action on Google for a better user engagement using notifications consists of the following steps:</p><ol><li>Prepare an Intent for notifications</li><li>Ask for permission</li><li>Push notifications</li></ol><h3>Prepare an Intent for notifications</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/605/1*Q0IjOECWnRlK4q8aNhQIRA.png" /><figcaption>Google Assistant Integration</figcaption></figure><p>In Dialogflow, you need to add the intent for notifications to the list for “Implicit invocation” (done via Google Assistant Integration). This is the “RecentNewsIntent” intent in this sample.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/605/1*EfTTQeDPSZT400K7cNE4wQ.png" /><figcaption>User engagement for Actions on Google</figcaption></figure><p>Furthermore, you need to allow the “User engagement” for notifications for the intent’s related action on the “Actions on Google”-side.</p><h3>Ask for permission</h3><p>Before users can receive push notifications from an Action for the Google Assistant (both via Dialogflow integration and as a plain “Action on Google”), you must show them a suggestion chip to invite them to <strong>opt-in </strong>for push notifications. In this sample, this is done on the fulfillment side using <a href="https://cognigy.com/">Cognigy.AI</a> in response to the “Default Welcome Intent”.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/605/1*Teiz4254_0B6EeUWhfLOkg.png" /><figcaption>Requesting permission for notifications inside Cognigy.AI</figcaption></figure><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/7d44ee018f520b6254009959af954aed/href">https://medium.com/media/7d44ee018f520b6254009959af954aed/href</a></iframe><p>Then you need to request permission, which is done on the Cognigy.AI side in response to the “SendNotificationsIntent” (which needs to be defined in Dialogflow). The response sends a payload shown above (it’s important to have the intent for notifications here).</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/605/1*_QKDrOhCRhlXjFetr1CrNA.png" /></figure><p>If the user now permits notifications you get the result through the intent, which listens for the “Google Assistant Permissions” event. In this sample “FinishNotificationsSetupIntent”.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/605/1*iu-9reBrt64UHJeaGVgm0g.png" /></figure><p>Finally, you get the result in the “FinishNotificationsSetupIntent” intent in Cognigy.AI (you can check this via the log). To finalize the subscription in Cognigy.AI, you need to save the User ID for the user. This is passed as argument if the user grants the permission. Once you have checked the permission, you can simply take the User ID from the Cognigy Input Object {{ci.userId}}.</p><h3>Push notifications</h3><p>To send notifications with Push Notifications, we need to use Actions API. But we cannot use the Actions API yet, event though you created your project on Actions on Google and Dialogflow. You need to make the Actions API available on the Google Cloud Platform .</p><p>To enable Actions API, do the following operations:</p><ol><li>There is a gear icon next to the Dialogflow agent name on the left navigation menu in Dialogflow. Click the gear icon to open the setting page.</li><li>Click the Google Cloud link on the GOOGLE PROJECT. In the new tab, the Google Cloud Platform Console is opened. Confirm that the “Notifications” project is selected on the header.</li><li>Click the hamburger menu on the top left of the page, then click APIs &amp; Services in the menus. Then click Dashboard.</li><li>Click ENABLE APIS AND SERVICES on the top of the page.</li><li>Enter “Actions API” to the Search for APIs &amp; Services field. Then, the search result will be shown. In the result, click “Actions API”.</li><li>Click the ENABLE button on the description page for Actions API.</li></ol><p>To issue a Service Account Key, do the following operations:</p><ol><li>Click the hamburger menu on the top left of the page, then click APIs &amp; Services in the menus. Next, click Credentials.</li><li>Select Service account key from the Create Credentials pulldown menu.</li><li>For the service account, select “New service account”, and fill in the following:</li></ol><ul><li>Service account name: “notifications”</li><li>Role: (Project) Owner</li><li>Key type: JSON</li></ul><p>Now, you get a JSON-file with credentials to use the services. Once you have everything together, you can create your push notifications with a script like:</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/c2558a0a9ab1f10eeeab12491b9850cc/href">https://medium.com/media/c2558a0a9ab1f10eeeab12491b9850cc/href</a></iframe><p>Please note, you need to change the path to your JSON-file containing the credentials. You also need to change the userId, and you should check the intent name as well. Usage is simply something like:</p><pre>node .\send-notification.js &quot;Hello my friend.&quot; </pre><h3>Conclusion and next steps</h3><p>This tutorial’s purpose is to simply see and learn how Push notifications for the Google Assistant (Actions on Google) work. Thanks, to the Conversational AI Platform Cognigy.AI I could accomplish this task without writing much code. The <a href="https://developers.google.com/actions/assistant/updates/overview">official documentation</a> is a good starting point, but I found the <a href="https://yoichiro.github.io/codelabs/actions-updates-and-notifications">tutorial by Yoichiro Tanaka</a> very inspiring every time I got stuck. By the way, I want to make push notifications even easier and plan to build a <a href="https://github.com/wolter/CustomModules">custom module for Cognigy.AI</a>, which lets you send notifications from within a conversation without any hassle.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=4fb4cf2d529b" width="1" height="1" alt=""><hr><p><a href="https://medium.com/cognigyai/push-notifications-for-google-assistant-actions-on-google-4fb4cf2d529b">Push notifications for Google Assistant (Actions on Google)</a> was originally published in <a href="https://medium.com/cognigyai">Cognigy.AI</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[The Most Important App on Your Phone That Marketers are Ignoring]]></title>
            <link>https://medium.com/cognigyai/the-most-important-app-on-your-phone-that-marketers-are-ignoring-ebe2cc03b56d?source=rss----7843ffd8082a---4</link>
            <guid isPermaLink="false">https://medium.com/p/ebe2cc03b56d</guid>
            <category><![CDATA[rbm]]></category>
            <category><![CDATA[google]]></category>
            <category><![CDATA[mobile-world-congress]]></category>
            <category><![CDATA[rc]]></category>
            <category><![CDATA[messaging]]></category>
            <dc:creator><![CDATA[Derek Roberti]]></dc:creator>
            <pubDate>Sat, 23 Feb 2019 18:50:28 GMT</pubDate>
            <atom:updated>2019-02-23T03:12:50.974Z</atom:updated>
            <content:encoded><![CDATA[<p><a href="https://medium.com/cognigyai/sms-chatbot-ecde9c2ed6dc">SMS</a> is the missed opportunity in mobile marketing. Cognigy, along with RCS Business Messaging (RBM), helps us reclaim it. RBM messages are <em>visual, branded, and interactive experiences </em>that <em>persist in a user’s messaging app</em>, making it the perfect medium for engaging users and responding with smart automation.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/400/1*mZuvto1Qva16d9iWPxh3dw.png" /><figcaption>RBM messages are visual, branded and interactive</figcaption></figure><h3>Let’s take a step back.</h3><p>At any moment, most of us have at least five text messages on our phones from businesses that are woven into the fabric of our day-to-day communication. Along with all of our personal threads with our friends and family, we have texts with shipping details, authorization codes, reservation reminders, billing alerts, booking confirmations, and weather notifications.</p><blockquote>We receive these messages all the time, but we view them as one-way notifications rather than an opportunity for a bi-directional marketing conversation.</blockquote><h3>Users opt in to this messaging, so why aren’t marketers taking advantage of it?</h3><p>Some important distinctions make text messages even more compelling:</p><ol><li>Everyone has a messaging app — we don’t have to spend marketing dollars making the app discoverable.</li><li>Messaging apps offer persistence — messages exist in a user’s messaging app long after they were sent.</li></ol><p>And, perhaps most importantly,</p><p>3. Messaging apps are the <em>priority </em>apps for users.</p><p>Almost universally, at least one messaging app lives in the valuable space on a mobile device’s home screen, within thumb reach.</p><p>App discovery is <a href="https://www.comscore.com/Insights/Presentations-and-Whitepapers/2017/The-2017-US-Mobile-App-Report">down across several channels</a> (including the App Store, word of mouth and advertising) and the majority of app users don’t download any apps per month.</p><p>But messaging apps exist on our phone by default and are integrated with the native SMS capability provided by carriers.</p><h3>So why aren’t we connecting more with users over SMS?</h3><p>There are, unfortunately, a few really good reasons why we aren’t doing more with SMS that have to do with the limitations of the SMS format:</p><ul><li>When users receive a message, such as a shipping confirmation, we aren’t able to provide context on how to respond. Do users know they can talk back and, if so, what questions can they ask?</li><li>Sending users to a website or app could be a better user experience. A website or app can provide information visually — such as maps, buttons or images — that simply aren’t available in a 160 character text message.</li><li>Finding a specific brand’s message thread amidst all of the other messaging threads is hard. Message apps are cluttered by nature, and it’s hard for your message to stand out with a shortcode as the sender.</li></ul><p>In addition to these user interface issues, most businesses lack the resources — human or software — to respond usefully to large numbers of incoming text messages.</p><h3>So how do we reconcile this?</h3><p>Brands have great real estate on the most-used app on the phone, but with a user experience that is too simple and narrow to be useful. How do we fix this?</p><p>The answer is <strong>Rich Communication Services (RCS</strong>) and <strong>RCS Business Messaging (RBM).</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/400/1*9qb00SsShDmwXBHAVvesLg.png" /></figure><h3>RCS? RBM? Or both?</h3><p>It takes <em>sixteen </em>syllables in English to pronounce these two terms. But we can simplify them quickly.</p><p><em>Rich Communication Services </em>is a standard established by the GSMA, the same organization that set the standard for SMS many years ago.</p><p>RCS allows for text messages that are more in line with modern messaging capabilities. RCS allows messaging to include media and interactive features (more on that shortly).</p><p>If you have used messaging apps like Facebook Messenger, you’ve already seen something similar to what RCS enables.</p><p>RCS matters as a standard because it enables your <em>phone carrier </em>to bring features to text messaging that already exist in other modern messaging apps.</p><p><em>RCS Business Messaging </em>refers to the application of RCS for business-to-consumer messaging scenarios. RBM is used to talk about the full visual and functional capabilities that RCS enables.</p><p>Google, a major champion of RBM, promotes it as allowing for:</p><ul><li>Branding</li><li>Business verification</li><li>Suggested replies and actions</li><li>Rich card carousels</li><li>Payments</li><li>And more</li></ul><p>Instead of plain text, RBM introduces branded messaging that stands out in your messaging app, offers visual components and enables interactivity.</p><p>For a marketer or product manager, RBM is the best term to use as it highlights the user experience enabled by RCS rather than the details of the RCS standard.</p><h3>A huge leap in user experience</h3><p>This might sound generally interesting but not revolutionary.</p><p>Branded text messages are an improvement, but we’ve lived without them so far. Adding visual components to text messages makes them more interesting to users, but, again, we already have other solutions for this (like linking to a website that gives a rich interactive experience).</p><p>So, why should we see this as a truly compelling change to the user experience for communicating with our customers?</p><p>There are two related reasons why RBM is a game changer:</p><p>First, think of RBM not as a single one-way message. RBM messages are <em>interactive experiences </em>that <em>persist in a user’s messaging app</em>.</p><p>If a user books a hotel on your website, for example, you can send a confirmation as an RBM message. Within that message, you can have images that showcase the hotel’s restaurants, buttons that let you schedule a spa appointment and information about local activities.</p><p>If a user orders a product on your website, your RBM message can include options to check order status and purchase accessories, all without leaving the messaging context.</p><p>This means you can have an interactive presence on a user’s native messaging client without requiring them to download a separate app or navigate your website.</p><p>It’s an interface that is visually striking, functionally rich, branded and persistent.</p><p>Second, and closely related, RBM by its nature can be <em>conversational</em>. Rather than a one-way notification, RBM messages invite consumers to ask questions, access information and take action. Users can have messaging conversations with businesses in the same fashion and in the same app that they have conversations with their friends.</p><p>Unlike an app or a link back to your website, consumers can use natural language to ask questions and get things done in a single interface.</p><h3>How businesses handle mass messaging</h3><p>RBM gives you a persistent presence on a user’s messaging app, which is what you want. And implementing RBM doesn’t mean you <em>have</em> to create a conversational experience.</p><p>But if you do, how will you deal with a huge increase in inbound messages? In simple terms, who is texting back?</p><p>You need automation to help deal with requests from this new channel. Unlike simple links or buttons on your website, RBM allows for conversational interactions. Automating these conversations requires both natural-language processing, conversational reasoning and a process editor that enables you to define user journeys for incoming messages.</p><p>Cognigy.AI is a <a href="https://www.cognigy.com/">Conversational AI platform</a> that plays a central role in your RBM implementation. As inputs flow from a user to their carrier, through Google’s RBM architecture and finally to your business, you need to process these inputs, access data in your Enterprise systems and formulate responses.</p><p>In cases where a human response <em>is </em>required, Cognigy forwards requests directly to your customer service operators, but the AI takes care of the mass of incoming texts by itself.</p><h3>This is all simpler than it sounds.</h3><p>Using Google’s RBM platform, you don’t have to worry about dealing with carriers or understanding the infrastructure of messaging. That’s all taken care of for you.</p><p>Once a message reaches your business, you need Cognigy to interpret and drive the conversation.</p><p>Cognigy.AI provides a single platform for natural-language processing, system integrations, and conversational reasoning. Even better, Cognigy.AI allows you to define conversational experiences and reuse them across RBM, Facebook Messenger, Web Chat, smart speaker devices, and other channels.</p><h3>Where are we now?</h3><p>Google has been working with carriers and device manufacturers to ensure the broadest potential adoption for RBM, and helping brands get started in sending more interactive messages to their customers. And they are doing so on a global basis.</p><p>For Q1 of 2019, work on a pilot initiative tied to a planned campaign. This allows you to gain experience with RBM projects and gather user feedback. It also lets you test conversion versus other channels like SMS, email and your website. This is a low-stakes way to get started with RBM and, if you haven’t already been implementing it, Conversational AI.</p><p>As we progress through the year, look for more progress with RCS Business Messaging. If now is the right time for a pilot, Q3 &amp; 4 of 2019 will be the right time to use RBM as a channel for some of your critical business processes and user experiences.</p><p>Cognigy and our network of implementation partners can help you get started with RBM as well as introducing Conversational AI to all of your messaging interfaces. <a href="https://www.cognigy.com/">Contact us today</a> to learn more about what a Conversational AI platform means for your business and how it fits into your Enterprise ecosystem.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=ebe2cc03b56d" width="1" height="1" alt=""><hr><p><a href="https://medium.com/cognigyai/the-most-important-app-on-your-phone-that-marketers-are-ignoring-ebe2cc03b56d">The Most Important App on Your Phone That Marketers are Ignoring</a> was originally published in <a href="https://medium.com/cognigyai">Cognigy.AI</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Hacking external Content into your Conversational AI]]></title>
            <link>https://medium.com/cognigyai/hacking-external-content-into-your-conversational-ai-51e130abfe58?source=rss----7843ffd8082a---4</link>
            <guid isPermaLink="false">https://medium.com/p/51e130abfe58</guid>
            <category><![CDATA[conversational-ui]]></category>
            <category><![CDATA[hacking]]></category>
            <category><![CDATA[chatbots]]></category>
            <category><![CDATA[conversational-ai]]></category>
            <category><![CDATA[google-sheets]]></category>
            <dc:creator><![CDATA[Christoph Bullmann]]></dc:creator>
            <pubDate>Fri, 15 Feb 2019 11:37:02 GMT</pubDate>
            <atom:updated>2019-02-15T11:34:59.712Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*y0tpzG9WDttIkQNU" /><figcaption>Photo by <a href="https://unsplash.com/@franckinjapan?utm_source=medium&amp;utm_medium=referral">Franck V.</a> on <a href="https://unsplash.com/?utm_source=medium&amp;utm_medium=referral">Unsplash</a></figcaption></figure><p>I am currently working with the <a href="https://www.cognigy.com/de/">Cognigy chatbot platform</a>. It provides a vast playground of possibilities for the hacky mindset and therefore will be used in the following example.</p><h3>Preamble</h3><p><em>Getting the mindset</em></p><p>Let’s take the common box analogy, say that we want to enlarge it and won’t care about best practices such as enlarging it with the same material that it is made of. You have to think outside the box to get the target dimensions, but there might be materials inside the box that you can use. If the box has a lid that you do not need, you can use it as material as well.</p><blockquote>Imagine that you want something to exist. You either do not have the resources or do not want to spend the resources to build it from scratch. However, you have a decent enough substitute for your needed resources, which you could form, mold and twist until you have created your desired outcome.</blockquote><p>Hacking software is usually a lot more forgiving than hacking hardware, since creating backups costs less time and effort, it is harder to create new boxes than copying files on a hard drive. If something breaks, you simply go back and try something else. When trial and error is such a viable option, you do not necessarily need to have a clear path, just a clear goal.</p><h3>The Goal</h3><p><em>Defining the box</em></p><p>When working with chatbot tools such as Amazon Alexa, Cognigy or Dialogflow you define “intents” (definitions of what the user wants with corresponding example utterances) and the chatbot tries to map <strong>one</strong> best matching intent to a single user input. I wanted a way to be able to map <strong>multiple</strong> intents to a single user input and it to be easily configurable.</p><p>So what does that mean? Usually you have intents such as “Where is the pizza I’ve ordered” or “I want to know the status of my Amazon package”, with corresponding answers such as “Your pizza is being delivered”, “You can track your parcel on …”. The problem we want to fix here is that if a user says “Where is the pizza I’ve ordered and what is the status of my Amazon package” <strong>either </strong>the pizza <strong>or</strong> the package intent and answer get triggered, instead we want <strong>both</strong> the pizza <strong>and</strong> the package intent to trigger and the user should receive the answers for both.</p><h3>Key-Phrase Intents</h3><p><em>Keeping it simple</em></p><p>Most NLP tools use example sentences to train their intents and build up a machine learning model from them to map user input to one of the intents. However, the example sentences can often be reduced to certain keywords and keyword combinations that are unique to that specific intent. If you think about it, “I want to order a pizza” and “I want to buy a car” are very similar sentences and the actual intent difference is only expressed by “pizza” and “car”. If you group “order” with “buy” together and have an opposite key-phrase “sell”, you can already distinguish between four intents:</p><ol><li>buy/order pizza</li><li>buy/order car</li><li>sell pizza</li><li>sell car</li></ol><p>Key-phrase intents excel in simple solutions for simple problems. However, they are ill-suited for “fuzzy” conversations such as small-talk. They are still used here as they represent an easy-to-understand starting point if you are new to conversational AI. They also allow us to outsource the intents to a table.</p><h3>Outsourcing the Intents</h3><p><em>Setting up the Google Sheets</em></p><p>The multiple intent mapping that we want needs to map the key-phrase intents to answers/output phrases and therefore be a two-dimensional matrix/table. Excel was the first thing to come to my mind, but I needed it to be accessible by the chatbot platform, so the <a href="https://developers.google.com/sheets/api/guides/concepts">Google Sheets API</a> was the cheapest thing that fulfilled the requirements.</p><p>The intents would be simple key-phrase triggers, this ensured that one column of a sheet was able to map one intent:</p><ul><li>The first line would contain the “intent name” or tag</li><li>All following lines would contain trigger key-phrases</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/674/1*d7TsA77gyS-BP1Qx-F5TIA.png" /><figcaption>The intent names and key-phrase triggers in the Google Sheet</figcaption></figure><p>The mapping sheet contains all the answers in the first column, the other columns all map the intents/tags:</p><ul><li>“t” means that tag needs to be triggered</li><li>“n” means that the tag is <strong>not</strong> allowed to be triggered</li><li>An empty cell means that it does not matter whether the tag is triggered or not</li></ul><p>This approach allows a lot of possibilities, generally speaking you want each line to have a unique combination of tags. If you have multiple lines with the same combination, all of them will be triggered by the same user input, in the same order they are in the sheet.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*ta83pcK13GS-yriMxmqMkg.png" /><figcaption>The answers and the intent mapping</figcaption></figure><p>In the example given, the answers from line 4 and 5 can be triggered with one user input, as they are not excluding each other. If none of the tags is triggered the default answer from line 6 is presented.</p><h3>Connecting the Chatbot</h3><p><em>Implementing the Cognigy connection</em></p><p>Cognigy has <a href="https://docs.cognigy.com/docs/http-request">HTTP-Nodes</a> that are able to retrieve the necessary sheets from the Google Sheets API and allows its <a href="https://docs.cognigy.com/docs/code">Code-Nodes</a> to create <a href="https://docs.cognigy.com/docs/lexicon">Lexicons</a> on the fly. With these tools it only required a bit of coding to get the logic into the project.</p><p>The final <a href="https://docs.cognigy.com/docs/flow">Flow</a> was very tiny, since nearly all of the conversational logic had been outsourced to the sheets file:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*kDeCnAebDYZLMOUskLPLKA.png" /><figcaption>The Cognigy Flow</figcaption></figure><p>All of the Nodes that are attached to the <a href="https://docs.cognigy.com/docs/once">Once-Node</a> import the Flow logic from the Google Sheets and store it in “<a href="https://docs.cognigy.com/docs/conversations#section-context-object">cc.answers</a>” at the first user interaction/the session start. The <a href="https://docs.cognigy.com/docs/think">Think-Node</a> allows the user input to be processed for <a href="https://docs.cognigy.com/docs/lexicons">Slots</a> by the generated Lexicon.</p><p>You can find the contents of the Code-Nodes on <a href="https://github.com/Cognigy/SheetsImporter">GitHub</a>, the HTTP-Nodes use the following structure:</p><pre>https://sheets.googleapis.com/v4/spreadsheets/[spreadsheetID]/values/[sheetName]?key=[yourAPIKey]</pre><h3>The End</h3><p><em>Thinking final thoughts</em></p><p>We have completely ignored Cognigy’s <a href="https://docs.cognigy.com/docs/intents">Intents</a>, which represent a large part of its core functionality, but achieved our goal in doing so. One thing to keep in mind is that the principles proposed here could actually be used together with Cognigy’s Intents if necessary.</p><p>I hope this article has given you a new perspective on chatbot tools and how to manipulate their inner workings to fit your specific needs. The best way to get a grasp on what is possible is to tinker around yourself.</p><p>Feel free to try it out on <a href="https://hello.cognigy.com/cognigy-community-cloud">Cognigy Community</a>!</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=51e130abfe58" width="1" height="1" alt=""><hr><p><a href="https://medium.com/cognigyai/hacking-external-content-into-your-conversational-ai-51e130abfe58">Hacking external Content into your Conversational AI</a> was originally published in <a href="https://medium.com/cognigyai">Cognigy.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 Interfaces and Content Reuse]]></title>
            <link>https://medium.com/cognigyai/conversational-interfaces-and-content-reuse-d2dfd9fc0112?source=rss----7843ffd8082a---4</link>
            <guid isPermaLink="false">https://medium.com/p/d2dfd9fc0112</guid>
            <category><![CDATA[enterprise-software]]></category>
            <category><![CDATA[cms]]></category>
            <category><![CDATA[chatbots]]></category>
            <dc:creator><![CDATA[Derek Roberti]]></dc:creator>
            <pubDate>Wed, 13 Feb 2019 17:12:16 GMT</pubDate>
            <atom:updated>2019-02-13T16:10:04.657Z</atom:updated>
            <content:encoded><![CDATA[<h3>How to publish Sitecore content to all your conversational channels</h3><p>In the video below, I show an example of content reuse between <a href="https://www.sitecore.com/">Sitecore</a> and <a href="https://www.cognigy.com/">Cognigy</a>. But after you watch, I want to talk about why it matters.</p><p>When we discuss integrations between conversational experiences and Enterprise systems, we often focus on systems of record like CRM, ticketing, order-management, and ERP systems. The idea is that those systems store information and perform some operational function like processing an order or updating customer attributes.</p><p>But it’s easy to forget that we’ve also made investments in content and marketing systems like Sitecore, and those play an important role when we are building out a Conversational AI.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*tRyG_dYOG4jzXz_aCUM39A.png" /></figure><p>How can we combine our single source of truth for content with the conversational experiences we want to create?</p><p>An automated conversation is filled with dialog, so it would seem to make sense to store that in Cognigy, your conversational platform. But what is dialog if not content? Does it make more sense for <em>all</em> content to be created and stored in your web content management system?</p><p>You should base your decision on what are purely conversational elements vs. what are re-usable blocks of content that you could find on your website, in an email campaign, or on a mobile app.</p><p><em>Conversational elements </em>are messages or questions that guide a conversation.</p><p><em>Reusable content blocks </em>are elements such as product descriptions, specials or marketing copy. This is content you’ve created, moved through workflow, potentially translated and published in your CMS or marketing platform.</p><p>Following this approach, you still have a single source of truth for content. Making changes in your web content management system propagates out to all your digital channels, including your conversational ones. Your conversational elements, on the other hand, are specific to the domain of the conversation and, as such, are stored in Cognigy.</p><p>Watch this video to see how this comes together in a conversational experience where Cognigy recognizes Sitecore as the source of truth for content and integrates it into the conversation:</p><iframe src="https://cdn.embedly.com/widgets/media.html?src=https%3A%2F%2Fwww.youtube.com%2Fembed%2FXPANwtMOW8g%3Ffeature%3Doembed&amp;url=http%3A%2F%2Fwww.youtube.com%2Fwatch%3Fv%3DXPANwtMOW8g&amp;image=https%3A%2F%2Fi.ytimg.com%2Fvi%2FXPANwtMOW8g%2Fhqdefault.jpg&amp;key=a19fcc184b9711e1b4764040d3dc5c07&amp;type=text%2Fhtml&amp;schema=youtube" width="854" height="480" frameborder="0" scrolling="no"><a href="https://medium.com/media/c2dd203feb809e937abc68b474cf4652/href">https://medium.com/media/c2dd203feb809e937abc68b474cf4652/href</a></iframe><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=d2dfd9fc0112" width="1" height="1" alt=""><hr><p><a href="https://medium.com/cognigyai/conversational-interfaces-and-content-reuse-d2dfd9fc0112">Conversational Interfaces and Content Reuse</a> was originally published in <a href="https://medium.com/cognigyai">Cognigy.AI</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Microservices—how they can help you to build software quicker and at a higher quality]]></title>
            <link>https://medium.com/cognigyai/microservices-how-they-can-help-you-to-build-software-quicker-and-at-a-higher-quality-8348271dfc04?source=rss----7843ffd8082a---4</link>
            <guid isPermaLink="false">https://medium.com/p/8348271dfc04</guid>
            <category><![CDATA[microservices]]></category>
            <category><![CDATA[monolithic]]></category>
            <category><![CDATA[docker]]></category>
            <dc:creator><![CDATA[Benjamin Mayr]]></dc:creator>
            <pubDate>Sun, 20 Jan 2019 17:40:39 GMT</pubDate>
            <atom:updated>2019-01-20T12:41:05.515Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*ejhEJs9o9zEAyLdNSemThg.jpeg" /><figcaption>Microservices — the basic building blocks of modern applications</figcaption></figure><p>Migrating to a microservices architecture for an existing application is a tough investment to make. Even if you understand the merits of microservices, how can you justify multiple months of reworking your software-stack without delivering any apparent feature improvements?</p><p>You as a developer might understand the potential of a new architecture, but you know you <em>could </em>continue on your current platform.</p><p>But I promise — invest now and you will see near-term results in form of faster development-cycles, higher quality releases, more motivated developers and satisfied executives.</p><p>Before we start to have a look at microservices, let‘s first review the more classical approach of how most organizations are building software: <em>The Monolith</em>.</p><h3>The Monolith</h3><p>A lot of software products start with a so-called <a href="https://en.wikipedia.org/wiki/Monolithic_system">monolithic architectur</a>e, in which the whole source-code lives within a single code repository and gets compiled and packaged as one executable for deployment.</p><p>A single code base can grow very large and individual developers usually specialize in certain parts of it. This approach makes sense, since not every developer is equally skilled and has all of the necessary knowledge about every component in the application. It is quite common that large development teams shape smaller feature-teams, who own certain parts of the application and work autonomously.</p><p>Another advantage of a monolithic application is that it is generally easier to debug since the whole code gets executed within a single process. Developers can use debugging tools and examine the whole state of the application. Performance-wise one of the benefits is that memory is shared amongst objects during execution and individual components can communicate with others in a very efficient way using function calls.</p><p>So what’s the issue? Why is everybody talking about service-oriented architectures? The two main pain points of monoliths are:</p><ul><li>individual release-cycles for distinct components</li><li>horizontal scalability of separate components</li></ul><p>Let’s now compare these attributes to microservices.</p><h3>The Microservice</h3><p>Have a look at my personal definition of the term microservice:</p><blockquote>A microservice is an encapsulated and loosely-coupled piece of software, that usually runs as a separate process, can be reached over a network interface and is deployable in an independent way.</blockquote><p>Although this definition is quite compact, it contains everything special about microservices:</p><ul><li>encapsulation</li><li>communication using network interfaces</li><li>deployments in an independent way</li></ul><p>At <a href="https://cognigy.com/">Cognigy</a>, the tech-startup I am working at, we ship our individual microservices in a fully-containerized way using <a href="https://www.docker.com/">Docker</a>. This allows us to pick the right technology for the right job. Some services are written in Python, others are based on NodeJS or GO — the strong encapsulation makes all of this possible at no real cost.</p><p>The communication between services is often based on network interfaces. We are utilizing the AMQP protocol and a central message-broker that all services connect to. There are other possibilities out there, such as making HTTP requests, using WebSockets or the binary GRPC protocol — in the end, the idea is always the same: <em>Connecting various services by some sort of message bus</em>. The caller has no clue about the inner structure or functionality of a service, which turns out to be quite handy if you want to apply changes to a service without breaking the whole application.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*7Q_EXfiN-XVKu20Vy6xEWQ.png" /><figcaption>Services can span over multiple physical machines. Everything is connected through overlay networks. Something you can obviously not do with a monolith.</figcaption></figure><p>Deployments often utilize a container registry, in which container images are stored on a per-service base. Developers can then ship updates to single services which can be transmitted to servers and get deployed in seconds.</p><h3>Why does it matter?</h3><p>Let’s have a closer look at how a microservices-based architecture impacted my work on the Conversational AI Platform COGNIGY.AI</p><p>COGNIGY.AI started as a monolithic application, with our NLU (=Natrual Language Understanding) stack being the only exception. As a startup, back in the early days, we were totally focused on building new features for our product, in order to be able to sell it to our first clients. Even though our software stack was already fully containerized, releasing this ‘huge boy’ was quite a nightmare. After a new release-candidate was finished, the testing hell started. We often spent multiple days testing the new version to be confident, that we did not break stuff. On the other hand, the pressure to release new things was quite high, considering that the first customers were asking for more and more features we did not have back then.</p><p>A close look at our release-notes shows, that <em>we shipped 19 versions</em> of our product within our <em>first year</em> in business. With the release of version 2.7.5, we started to think about a new architecture that should allow us to:</p><ul><li>ship new features faster</li><li>fix bugs without affecting the stability of our product</li><li>speed-up deployment times</li></ul><p>My team and I went back to the drawing board and we broke down our monolithic application to form individual, much smaller services with a central message broker that connects all components with each other.</p><p>After multiple months of work, we released version 3.0.0 of our product, which shipped with 20+ services — all individually updatable and ready for a bright future. In fact, we could optimize our development pipeline to release much more frequently and apply changes with higher confidence that nothing broke.</p><p>We’ve had this modern infrastructure <em>since June 2018</em> and have already <em>shipped 20+</em> versions of our software since then, on target for many more releases to come for the full year! Additionally, we realized that the number of support-tickets went down since we migrated to our new architecture — a clear indicator for a more stable product!</p><p>I can clearly say that it was an invaluable investment to make and has made us more effective as a company. If you are considering making the leap to a new architecture for your product, the business justification is clear.</p><p><strong>To be continued…</strong></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=8348271dfc04" width="1" height="1" alt=""><hr><p><a href="https://medium.com/cognigyai/microservices-how-they-can-help-you-to-build-software-quicker-and-at-a-higher-quality-8348271dfc04">Microservices—how they can help you to build software quicker and at a higher quality</a> was originally published in <a href="https://medium.com/cognigyai">Cognigy.AI</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Cortana the simple way]]></title>
            <link>https://medium.com/cognigyai/cortana-the-simple-way-859f907e8ad7?source=rss----7843ffd8082a---4</link>
            <guid isPermaLink="false">https://medium.com/p/859f907e8ad7</guid>
            <category><![CDATA[cortana]]></category>
            <category><![CDATA[amazon-alexa]]></category>
            <category><![CDATA[conversational-ai]]></category>
            <category><![CDATA[conversational-ui]]></category>
            <category><![CDATA[microsoft-cortana]]></category>
            <dc:creator><![CDATA[Sascha Wolter]]></dc:creator>
            <pubDate>Wed, 09 Jan 2019 16:12:47 GMT</pubDate>
            <atom:updated>2019-06-26T08:59:28.236Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/940/1*AYjCJoPxpXakuIo0mRQQKg.jpeg" /><figcaption>Image source <a href="https://news.xbox.com/en-us/2014/04/03/games-cortana-companion-blog-post/">Microsoft</a>.</figcaption></figure><p>There are a variety of virtual assistants like Amazon Alexa and Google Assistant that rely on different tools and technologies depending on the vendor. But they all agree on one thing: Each of these assistants sends user requests via JSON (JavaScript Object Notification) to an endpoint, i.e. a web address. The reply, which is also returned as JSON, is displayed or read out to the user. Microsoft takes the same approach, but the tools required are different and tend more towards Azure services.</p><p>Don’t worry, you can use any endpoint with little effort. Either directly by specifying the endpoint’s URL or indirectly with a small redirection — according to <a href="https://docs.microsoft.com/en-us/azure/bot-service/bot-service-quickstart">Microsoft’s instructions</a>.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*-KhLSWEK2T1D_ZREDpaHiQ.png" /><figcaption>Bot-Settings inside Microsoft Bot Framework Emulator.</figcaption></figure><p>Microsoft’s Bot Service manages the resources of a bot, including its endpoint to which the data of a conversation is sent. You can find the details in a <a href="https://github.com/Microsoft/botbuilder-tools/blob/master/packages/MSBot/docs/bot-file.md">bot file</a>. You can also see the endpoint in the Microsoft Bot Framework emulator (see figure).</p><h3>Create a bot</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*SQVk96GvpvnnXc-zg3y-pQ.png" /><figcaption>Microsoft Azure Bot Service as starting point.</figcaption></figure><p>The Microsoft Azure Bot Service is a good starting point as it provides the core components for creating bots and allows connecting to channels such as Cortana. Perform the following steps for your first bot:</p><ol><li>Log in to the <a href="https://portal.azure.com/">Azure Portal</a>.</li><li>Click the “Create a resource” link found on the upper left-hand corner of the Azure portal, then select “AI + Machine Learning” -&gt; “Web App Bot”. A new blade will open with information about the Web App Bot.</li><li>In the Web App Bot blade, provide the requested information about your bot including the Bot name and pricing tier. You can also select a template here: Our example uses the Node.JS based template “Echo Bot” for the SDK version 4.0.</li><li>Click “Create” to build the service and deploy the bot to the cloud. This process may take several minutes.</li><li>Select the bot resource created in the previous step, then select “Channels” and add Cortana as an additional channel.</li><li>Finally, in the “Configure Cortana” view, specify the “Invocation Name” for use with Cortana.</li></ol><figure><img alt="" src="https://cdn-images-1.medium.com/max/320/1*SBXIcJcjMGaQJAei0wQYbg.png" /><figcaption>Cortana in action on Windows 10.</figcaption></figure><p>Now the bot can be tested both as a webchat and as a Cortana skill. So far, however, it does nothing more than simply send the user input back.</p><h3>Create a redirection</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*M52pEcKBnNI33pSxkDcjrA.png" /><figcaption>Online code editor.</figcaption></figure><p>To enable the bot to have a complex conversation, a Conversational AI technology like <a href="http://cognigy.ai/">Cognigy.AI</a> is very useful: It processes user inputs, connects to third-party systems (e.g. databases) and generates system responses in a single intuitive interface. To control the bot using another technology such as Cognigy.AI, all that is required is a simple message redirection. This redirection has the advantage that it converts the JSON documents to a suitable format. For example, if a generic endpoint is provided which due to its generic nature is not fully compatible with Cortana. To achieve this, you can follow the steps below:</p><ul><li>Select the bot created in the previous step, then choose “Build” and change to the code editor via the “Open online code editor” link. Now, select the file “bot.js” to insert the program code for redirecting the messages.</li><li>Replace the onTurn-method with the following program code:</li></ul><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/ff68fce902a0c56a175ff602225156ca/href">https://medium.com/media/ff68fce902a0c56a175ff602225156ca/href</a></iframe><blockquote>Update: Depending on how exactly the function is created, the request module may still have to be included. Alternatively, you can also use another method for the HTTP request.</blockquote><ul><li>Add the following method to the program code to redirect user activity to an custom endpoint:</li></ul><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/197a880b069773f90726cc7ab0309456/href">https://medium.com/media/197a880b069773f90726cc7ab0309456/href</a></iframe><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*MKgmtpBQ92TxqjRfUcsTRQ.png" /><figcaption>REST based endpoint URL in Cognigy.AI.</figcaption></figure><p>For Cognigy.AI you only need to create a REST endpoint and enter its URL in the sendActivoty-Method (see above).</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Mi-LSUXAPTo5lPCsA-olDw.png" /><figcaption>Visual design of a conversation inside Cognigy.AI.</figcaption></figure><p>Once you have connected your bot to your Cognigy endpoint, you can visually design your Cortana conversations and easily connected to third-party systems without any further Azure or C# knowledge.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=859f907e8ad7" width="1" height="1" alt=""><hr><p><a href="https://medium.com/cognigyai/cortana-the-simple-way-859f907e8ad7">Cortana the simple way</a> was originally published in <a href="https://medium.com/cognigyai">Cognigy.AI</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
    </channel>
</rss>