<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
  <channel>
    <title>Aura – </title>
    <link>/docs/components/aura-bot-platform/aura-bot-processes/channel-data/</link>
    <description>Recent content on Aura</description>
    <generator>Hugo -- gohugo.io</generator>
    <language>en</language>
    
	  <atom:link href="/docs/components/aura-bot-platform/aura-bot-processes/channel-data/index.xml" rel="self" type="application/rss+xml" />
    
    
      
        
      
    
    
    <item>
      <title>Docs: </title>
      <link>/docs/components/aura-bot-platform/aura-bot-processes/channel-data/handle-channeldata-versions/</link>
      <pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate>
      
      <guid>/docs/components/aura-bot-platform/aura-bot-processes/channel-data/handle-channeldata-versions/</guid>
      <description>
        
        
        &lt;h1 id=&#34;handling-channeldata-versions&#34;&gt;Handling channelData versions&lt;/h1&gt;


&lt;div class=&#34;pageinfo pageinfo-primary&#34;&gt;
&lt;p&gt;Description of components that make Aura Bot capable of working with different &lt;code&gt;channelData&lt;/code&gt; versions.&lt;/p&gt;

&lt;/div&gt;

&lt;h2 id=&#34;uml-diagram&#34;&gt;UML diagram&lt;/h2&gt;
&lt;pre tabindex=&#34;0&#34;&gt;&lt;code class=&#34;language-plantuml&#34; data-lang=&#34;plantuml&#34;&gt;@startuml
title ChannelData handling diagram
actor User
participant AuraGroot
participant ChannelDataValidatorMiddleware #76bbe7
participant AuraBot #ebdff7
participant Routing #ebdff7
participant MainDialog #1add4d
participant Dialog #1c733b
participant OutgoingChannelDataNormalizerMiddleware #73c1c3
participant Adapter #1bcad5
participant AuraChannelDataHandler #ebba65
User -&amp;gt; AuraGroot: User request
AuraGroot -&amp;gt; ChannelDataValidatorMiddleware: request reaches validation middleware
alt AURA_CHANNELDATA_VALIDATION === true
    ChannelDataValidatorMiddleware -&amp;gt; AuraChannelDataHandler: isValidatableVersion checks if channelData request version is validatable
    AuraChannelDataHandler -&amp;gt; ChannelDataValidatorMiddleware: isValidatableVersion returns if version is valid
    alt isValidatableVersion === true
        ChannelDataValidatorMiddleware -&amp;gt; AuraChannelDataHandler: getRequestValidator validates channelData request
        AuraChannelDataHandler -&amp;gt; ChannelDataValidatorMiddleware: getRequestValidator returns validation
    end
end
ChannelDataValidatorMiddleware -&amp;gt; AuraBot
AuraBot -&amp;gt; MainDialog: Route to main dialog
MainDialog -&amp;gt; Routing: MainDialog routing step
alt channelDataRequest &amp;lt;= v3
    Routing -&amp;gt; Routing: Add information to triggerCondition
end
alt channelDataRequest &amp;gt;= v3
    Routing -&amp;gt; Routing: Add information to triggerCondition (intent.vX)
end
Routing -&amp;gt; MainDialog: checkLegacyDialogStep check if a conversion to legacy channel data is needed
alt channelDataRequest &amp;lt;= v3
    MainDialog -&amp;gt; AuraChannelDataHandler: getNormalized normalizes request to supported aura-bot channelData
end
MainDialog -&amp;gt; Dialog: Reach dialog by intent if exists
alt channelDataRequest === v3 &amp;amp;&amp;amp; channelDataVersion === v3
    Dialog -&amp;gt; AuraChannelDataHandler: formatChannelDataV3 formats response to be compatible with v3 version
    AuraChannelDataHandler -&amp;gt; Dialog: formatChannelDataV3 returns formatted v3 channelData
end
Dialog -&amp;gt; OutgoingChannelDataNormalizerMiddleware: Pass activity formed in dialog to outgoingMiddlewares
alt channelDataRequest &amp;lt;= v3
    OutgoingChannelDataNormalizerMiddleware -&amp;gt; AuraChannelDataHandler: getNormalized Normalizes activity (output) and request (input) to be compatible with supported aura-bot version
    AuraChannelDataHandler -&amp;gt; OutgoingChannelDataNormalizerMiddleware: getResponseChannelData Gets original response channel data
end
OutgoingChannelDataNormalizerMiddleware -&amp;gt; Adapter: Middleware&amp;#39;s pipeline is finished and result is received by the adapter
alt AURA_CHANNELDATA_RESPONSE_VALIDATION === true
    Adapter -&amp;gt; AuraChannelDataHandler: isValidatableVersion checks if channelData response version is validatable
    AuraChannelDataHandler -&amp;gt; Adapter: isValidatableVersion returns if version is valid
    alt isValidatableVersion === true
        Adapter -&amp;gt; AuraChannelDataHandler: getResponseValidator gets validation for the response version
    end
end
alt channelDataRequest &amp;gt;= v3
    Adapter -&amp;gt; Adapter: Add version parameter to response.
end
alt channelDataRequest &amp;lt; v3
    Adapter -&amp;gt; Adapter: getResponseChannelData gets transformed channel data from correct version (removes version field)
end
Adapter -&amp;gt; AuraBot: Activity is processed and ready to be sent
AuraBot -&amp;gt; User: Bot response
@enduml
&lt;/code&gt;&lt;/pre&gt;&lt;h2 id=&#34;version-format&#34;&gt;Version Format&lt;/h2&gt;
&lt;p&gt;The version format will be a semantic versioning, (&lt;code&gt;MAJOR.MINOR.PATCH&lt;/code&gt;). However, &lt;em&gt;&lt;strong&gt;aura-bot&lt;/strong&gt;&lt;/em&gt; will work exclusively with the &lt;code&gt;MAJOR&lt;/code&gt; version:
If a customer sends the version &lt;code&gt;3.1.0&lt;/code&gt;, for Aura the version is &lt;code&gt;3&lt;/code&gt;.&lt;/p&gt;
&lt;p&gt;Aura will keep the original version from the request in the response. That is, if the client sends version &lt;code&gt;3.0.0&lt;/code&gt;, but Aura is currently working with version &lt;code&gt;3.5.1&lt;/code&gt; as Aura works with the older one, there is no problem and Aura will keep the version that the client sent, &lt;code&gt;3.0.0&lt;/code&gt;, in the response.&lt;/p&gt;
&lt;p&gt;For versions greater or equal to &lt;code&gt;3.0.0&lt;/code&gt;, &lt;em&gt;&lt;strong&gt;aura-bot&lt;/strong&gt;&lt;/em&gt; accepts either SemVer versioning (&lt;code&gt;3.0.0&lt;/code&gt;) or major versioning (&lt;code&gt;3&lt;/code&gt;) in &lt;code&gt;channelData.version&lt;/code&gt; property.&lt;/p&gt;
&lt;h2 id=&#34;request-channeldata-validation&#34;&gt;Request channelData validation&lt;/h2&gt;
&lt;p&gt;The &lt;a href=&#34;../../../../../docs/components/aura-groot/aura-groot-middlewares/channeldata-validator-middleware/&#34;&gt;&lt;em&gt;&lt;strong&gt;channeldata-validator-middleware&lt;/strong&gt;&lt;/em&gt;&lt;/a&gt; executes request &lt;code&gt;channelData&lt;/code&gt; validations. &lt;em&gt;&lt;strong&gt;aura-bot&lt;/strong&gt;&lt;/em&gt; receives the request which contains information about the &lt;code&gt;channelData&lt;/code&gt; version. With that information, different validations are made.&lt;/p&gt;
&lt;p&gt;More information regarding validations being made and utilities that used for this flow can be found in &lt;a href=&#34;../../../../../docs/components/aura-bot-platform/aura-bot-processes/channel-data/channeldata-validation/&#34;&gt;channelData validation&lt;/a&gt;.&lt;/p&gt;
&lt;h2 id=&#34;aura-bot-channeldata-versions-behavior&#34;&gt;Aura Bot channelData versions behavior&lt;/h2&gt;
&lt;ul&gt;
&lt;li&gt;&lt;em&gt;&lt;strong&gt;aura-bot&lt;/strong&gt;&lt;/em&gt; is able to work with channelData versions &lt;code&gt;v1&lt;/code&gt;, &lt;code&gt;v2&lt;/code&gt; and &lt;code&gt;v3&lt;/code&gt;.&lt;/li&gt;
&lt;li&gt;If a channel does not specify the version, it is assumed to be working with version &lt;code&gt;v1&lt;/code&gt;.&lt;/li&gt;
&lt;li&gt;Version &lt;code&gt;v2&lt;/code&gt; was specific for &lt;em&gt;&lt;strong&gt;living-apps&lt;/strong&gt;&lt;/em&gt;, and version &lt;code&gt;v3&lt;/code&gt; is the first version of the normalized &lt;code&gt;channelData&lt;/code&gt;model.&lt;/li&gt;
&lt;li&gt;Use cases created for &lt;code&gt;channelData&lt;/code&gt; version &lt;code&gt;v1&lt;/code&gt; will not be able to execute dialogs created with the &lt;code&gt;v3&lt;/code&gt; model and vice versa.&lt;/li&gt;
&lt;/ul&gt;
&lt;h2 id=&#34;intent-format-for-v3&#34;&gt;Intent format for v3&lt;/h2&gt;
&lt;p&gt;The format for intents in &lt;code&gt;channelData&lt;/code&gt; version &lt;code&gt;v3&lt;/code&gt; only changes internally.&lt;/p&gt;
&lt;p&gt;Therefore, when defining an intent, it is not necessary to specify its version, the dialog loading system will do it internally.&lt;/p&gt;
&lt;h2 id=&#34;dialog-configuration&#34;&gt;Dialog configuration&lt;/h2&gt;
&lt;p&gt;From &lt;code&gt;channelData&lt;/code&gt; &lt;code&gt;v3&lt;/code&gt; onwards, it is necessary to specify the version to be used in the &lt;code&gt;channelData&lt;/code&gt; dialogs.&lt;/p&gt;
&lt;p&gt;If no version is specified, it is understood that they work in &lt;code&gt;v1&lt;/code&gt; mode for classic use cases.&lt;/p&gt;
&lt;p&gt;If you want to work with the &lt;code&gt;channelData&lt;/code&gt; normalized version (&lt;code&gt;v3&lt;/code&gt;), specify it in the use case &lt;a href=&#34;../../../../../docs/experiences-builder/development-use-cases/bot-uc-development/build-dialog/library/#dialog-configjson&#34;&gt;dialog configuration file&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;Example:&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; style=&#34;background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4;&#34;&gt;&lt;code class=&#34;language-JSON&#34; data-lang=&#34;JSON&#34;&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#000;font-weight:bold&#34;&gt;{&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;  &lt;span style=&#34;color:#204a87;font-weight:bold&#34;&gt;&amp;#34;name&amp;#34;&lt;/span&gt;&lt;span style=&#34;color:#000;font-weight:bold&#34;&gt;:&lt;/span&gt; &lt;span style=&#34;color:#4e9a06&#34;&gt;&amp;#34;packageLibTest&amp;#34;&lt;/span&gt;&lt;span style=&#34;color:#000;font-weight:bold&#34;&gt;,&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;  &lt;span style=&#34;color:#204a87;font-weight:bold&#34;&gt;&amp;#34;dialogs&amp;#34;&lt;/span&gt;&lt;span style=&#34;color:#000;font-weight:bold&#34;&gt;:&lt;/span&gt; &lt;span style=&#34;color:#000;font-weight:bold&#34;&gt;[&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;    &lt;span style=&#34;color:#000;font-weight:bold&#34;&gt;{&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;      &lt;span style=&#34;color:#204a87;font-weight:bold&#34;&gt;&amp;#34;id&amp;#34;&lt;/span&gt;&lt;span style=&#34;color:#000;font-weight:bold&#34;&gt;:&lt;/span&gt; &lt;span style=&#34;color:#4e9a06&#34;&gt;&amp;#34;channel-data-V3-dialog-example&amp;#34;&lt;/span&gt;&lt;span style=&#34;color:#000;font-weight:bold&#34;&gt;,&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;      &lt;span style=&#34;color:#204a87;font-weight:bold&#34;&gt;&amp;#34;channelDataVersion&amp;#34;&lt;/span&gt;&lt;span style=&#34;color:#000;font-weight:bold&#34;&gt;:&lt;/span&gt; &lt;span style=&#34;color:#4e9a06&#34;&gt;&amp;#34;v3&amp;#34;&lt;/span&gt;&lt;span style=&#34;color:#000;font-weight:bold&#34;&gt;,&lt;/span&gt;   &lt;span style=&#34;color:#a40000&#34;&gt;&amp;lt;-&lt;/span&gt;  &lt;span style=&#34;color:#a40000&#34;&gt;It&amp;#39;s&lt;/span&gt; &lt;span style=&#34;color:#a40000&#34;&gt;mandatory&lt;/span&gt; &lt;span style=&#34;color:#a40000&#34;&gt;specific&lt;/span&gt; &lt;span style=&#34;color:#a40000&#34;&gt;version&lt;/span&gt; &lt;span style=&#34;color:#a40000&#34;&gt;for&lt;/span&gt; &lt;span style=&#34;color:#a40000&#34;&gt;ChannelData&lt;/span&gt; &lt;span style=&#34;color:#a40000&#34;&gt;v3&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;      &lt;span style=&#34;color:#204a87;font-weight:bold&#34;&gt;&amp;#34;triggerConditions&amp;#34;&lt;/span&gt;&lt;span style=&#34;color:#000;font-weight:bold&#34;&gt;:&lt;/span&gt; &lt;span style=&#34;color:#000;font-weight:bold&#34;&gt;[&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;        &lt;span style=&#34;color:#000;font-weight:bold&#34;&gt;{&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;          &lt;span style=&#34;color:#204a87;font-weight:bold&#34;&gt;&amp;#34;intent&amp;#34;&lt;/span&gt;&lt;span style=&#34;color:#000;font-weight:bold&#34;&gt;:&lt;/span&gt; &lt;span style=&#34;color:#4e9a06&#34;&gt;&amp;#34;intent.factotum-test.channel-data-model&amp;#34;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;        &lt;span style=&#34;color:#000;font-weight:bold&#34;&gt;}&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;      &lt;span style=&#34;color:#000;font-weight:bold&#34;&gt;]&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;    &lt;span style=&#34;color:#000;font-weight:bold&#34;&gt;}&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;  &lt;span style=&#34;color:#000;font-weight:bold&#34;&gt;]&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#000;font-weight:bold&#34;&gt;}&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;When a dialog has specified its &lt;code&gt;channelData&lt;/code&gt; version through the &lt;code&gt;channelDataVersion&lt;/code&gt; property, it can only be executed if the client has specified that version in the request. Otherwise, the system will return an &amp;ldquo;I don&amp;rsquo;t understand you&amp;rdquo;.&lt;/p&gt;
&lt;p&gt;A client can have two dialogs for the same use case with different versions, but &lt;strong&gt;it is mandatory that the names of the dialogs are different&lt;/strong&gt;. The intents must be called exactly the same for &lt;code&gt;v3&lt;/code&gt; and for others, as the format of the intents is set internally and it is not necessary to specify anything.&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; style=&#34;background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4;&#34;&gt;&lt;code class=&#34;language-JSON&#34; data-lang=&#34;JSON&#34;&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#000;font-weight:bold&#34;&gt;{&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;  &lt;span style=&#34;color:#204a87;font-weight:bold&#34;&gt;&amp;#34;name&amp;#34;&lt;/span&gt;&lt;span style=&#34;color:#000;font-weight:bold&#34;&gt;:&lt;/span&gt; &lt;span style=&#34;color:#4e9a06&#34;&gt;&amp;#34;packageLibTest&amp;#34;&lt;/span&gt;&lt;span style=&#34;color:#000;font-weight:bold&#34;&gt;,&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;  &lt;span style=&#34;color:#204a87;font-weight:bold&#34;&gt;&amp;#34;dialogs&amp;#34;&lt;/span&gt;&lt;span style=&#34;color:#000;font-weight:bold&#34;&gt;:&lt;/span&gt; &lt;span style=&#34;color:#000;font-weight:bold&#34;&gt;[&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;    &lt;span style=&#34;color:#000;font-weight:bold&#34;&gt;{&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;      &lt;span style=&#34;color:#204a87;font-weight:bold&#34;&gt;&amp;#34;id&amp;#34;&lt;/span&gt;&lt;span style=&#34;color:#000;font-weight:bold&#34;&gt;:&lt;/span&gt; &lt;span style=&#34;color:#4e9a06&#34;&gt;&amp;#34;channel-data-V1-dialog-example&amp;#34;&lt;/span&gt;&lt;span style=&#34;color:#000;font-weight:bold&#34;&gt;,&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;      &lt;span style=&#34;color:#204a87;font-weight:bold&#34;&gt;&amp;#34;triggerConditions&amp;#34;&lt;/span&gt;&lt;span style=&#34;color:#000;font-weight:bold&#34;&gt;:&lt;/span&gt; &lt;span style=&#34;color:#000;font-weight:bold&#34;&gt;[&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;        &lt;span style=&#34;color:#000;font-weight:bold&#34;&gt;{&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;          &lt;span style=&#34;color:#204a87;font-weight:bold&#34;&gt;&amp;#34;intent&amp;#34;&lt;/span&gt;&lt;span style=&#34;color:#000;font-weight:bold&#34;&gt;:&lt;/span&gt; &lt;span style=&#34;color:#4e9a06&#34;&gt;&amp;#34;intent.factotum-test.channel-data-model&amp;#34;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;        &lt;span style=&#34;color:#000;font-weight:bold&#34;&gt;}&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;      &lt;span style=&#34;color:#000;font-weight:bold&#34;&gt;]&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;    &lt;span style=&#34;color:#000;font-weight:bold&#34;&gt;}&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;  &lt;span style=&#34;color:#000;font-weight:bold&#34;&gt;]&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#000;font-weight:bold&#34;&gt;}&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;This configuration contains the same intent as the previous one, but the dialog is for &lt;code&gt;channelData&lt;/code&gt; version &lt;code&gt;v1&lt;/code&gt;, as its version has not been set. It should be noted that if you set a version &lt;code&gt;channelDataVersion: v1&lt;/code&gt; it will also work in &lt;code&gt;v1&lt;/code&gt; mode.&lt;/p&gt;
&lt;h2 id=&#34;routing-to-version-v3&#34;&gt;Routing to version v3&lt;/h2&gt;
&lt;h3 id=&#34;loading-dialogs-configuration&#34;&gt;Loading Dialogs configuration&lt;/h3&gt;
&lt;p&gt;The first step to set the intents to their proper version must be done during the dialogs loading. This is done inside the &lt;em&gt;&lt;strong&gt;aura-configuration&lt;/strong&gt;&lt;/em&gt; package in the document &lt;code&gt;channels-configuration-current.ts&lt;/code&gt;.&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; style=&#34;background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4;&#34;&gt;&lt;code class=&#34;language-Typescript&#34; data-lang=&#34;Typescript&#34;&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;    &lt;span style=&#34;color:#204a87;font-weight:bold&#34;&gt;private&lt;/span&gt; &lt;span style=&#34;color:#000&#34;&gt;buildAuraChannel&lt;/span&gt;&lt;span style=&#34;color:#000;font-weight:bold&#34;&gt;(&lt;/span&gt;&lt;span style=&#34;color:#000&#34;&gt;channelConfiguration&lt;/span&gt;: &lt;span style=&#34;color:#204a87;font-weight:bold&#34;&gt;ChannelConfiguration&lt;/span&gt;&lt;span style=&#34;color:#000;font-weight:bold&#34;&gt;)&lt;/span&gt;&lt;span style=&#34;color:#ce5c00;font-weight:bold&#34;&gt;:&lt;/span&gt; &lt;span style=&#34;color:#000&#34;&gt;ChannelConfiguration&lt;/span&gt; &lt;span style=&#34;color:#000;font-weight:bold&#34;&gt;{&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;        &lt;span style=&#34;color:#000;font-weight:bold&#34;&gt;........&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;        &lt;span style=&#34;color:#8f5902;font-style:italic&#34;&gt;// NORMALIZATION. Assign the intent to the channel Data Version
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#8f5902;font-style:italic&#34;&gt;&lt;/span&gt;        &lt;span style=&#34;color:#000&#34;&gt;channelConfiguration&lt;/span&gt;&lt;span style=&#34;color:#000;font-weight:bold&#34;&gt;.&lt;/span&gt;&lt;span style=&#34;color:#000&#34;&gt;dialogLibraries&lt;/span&gt;&lt;span style=&#34;color:#ce5c00;font-weight:bold&#34;&gt;?&lt;/span&gt;&lt;span style=&#34;color:#000;font-weight:bold&#34;&gt;.&lt;/span&gt;&lt;span style=&#34;color:#000&#34;&gt;forEach&lt;/span&gt;&lt;span style=&#34;color:#000;font-weight:bold&#34;&gt;((&lt;/span&gt;&lt;span style=&#34;color:#000&#34;&gt;library&lt;/span&gt;&lt;span style=&#34;color:#000;font-weight:bold&#34;&gt;)&lt;/span&gt; &lt;span style=&#34;color:#ce5c00;font-weight:bold&#34;&gt;=&amp;gt;&lt;/span&gt; &lt;span style=&#34;color:#000;font-weight:bold&#34;&gt;{&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;            &lt;span style=&#34;color:#000&#34;&gt;library&lt;/span&gt;&lt;span style=&#34;color:#000;font-weight:bold&#34;&gt;.&lt;/span&gt;&lt;span style=&#34;color:#000&#34;&gt;dialogs&lt;/span&gt;&lt;span style=&#34;color:#000;font-weight:bold&#34;&gt;.&lt;/span&gt;&lt;span style=&#34;color:#000&#34;&gt;forEach&lt;/span&gt;&lt;span style=&#34;color:#000;font-weight:bold&#34;&gt;((&lt;/span&gt;&lt;span style=&#34;color:#000&#34;&gt;dialog&lt;/span&gt;&lt;span style=&#34;color:#000;font-weight:bold&#34;&gt;)&lt;/span&gt; &lt;span style=&#34;color:#ce5c00;font-weight:bold&#34;&gt;=&amp;gt;&lt;/span&gt; &lt;span style=&#34;color:#000;font-weight:bold&#34;&gt;{&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;                &lt;span style=&#34;color:#204a87;font-weight:bold&#34;&gt;const&lt;/span&gt; &lt;span style=&#34;color:#000&#34;&gt;channelDataVersion&lt;/span&gt; &lt;span style=&#34;color:#ce5c00;font-weight:bold&#34;&gt;=&lt;/span&gt; &lt;span style=&#34;color:#204a87;font-weight:bold&#34;&gt;this&lt;/span&gt;&lt;span style=&#34;color:#000;font-weight:bold&#34;&gt;.&lt;/span&gt;&lt;span style=&#34;color:#000&#34;&gt;getChannelDataVersionMajor&lt;/span&gt;&lt;span style=&#34;color:#000;font-weight:bold&#34;&gt;(&lt;/span&gt;&lt;span style=&#34;color:#000&#34;&gt;dialog&lt;/span&gt;&lt;span style=&#34;color:#000;font-weight:bold&#34;&gt;.&lt;/span&gt;&lt;span style=&#34;color:#000&#34;&gt;channelDataVersion&lt;/span&gt;&lt;span style=&#34;color:#000;font-weight:bold&#34;&gt;);&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;                &lt;span style=&#34;color:#204a87;font-weight:bold&#34;&gt;if&lt;/span&gt; &lt;span style=&#34;color:#000;font-weight:bold&#34;&gt;(&lt;/span&gt;&lt;span style=&#34;color:#000&#34;&gt;channelDataVersion&lt;/span&gt; &lt;span style=&#34;color:#ce5c00;font-weight:bold&#34;&gt;&amp;gt;&lt;/span&gt; &lt;span style=&#34;color:#0000cf;font-weight:bold&#34;&gt;2&lt;/span&gt;&lt;span style=&#34;color:#000;font-weight:bold&#34;&gt;)&lt;/span&gt; &lt;span style=&#34;color:#000;font-weight:bold&#34;&gt;{&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;                    &lt;span style=&#34;color:#000&#34;&gt;dialog&lt;/span&gt;&lt;span style=&#34;color:#000;font-weight:bold&#34;&gt;.&lt;/span&gt;&lt;span style=&#34;color:#000&#34;&gt;triggerConditions&lt;/span&gt;&lt;span style=&#34;color:#000;font-weight:bold&#34;&gt;.&lt;/span&gt;&lt;span style=&#34;color:#000&#34;&gt;forEach&lt;/span&gt;&lt;span style=&#34;color:#000;font-weight:bold&#34;&gt;((&lt;/span&gt;&lt;span style=&#34;color:#000&#34;&gt;triggerCondition&lt;/span&gt;&lt;span style=&#34;color:#000;font-weight:bold&#34;&gt;)&lt;/span&gt; &lt;span style=&#34;color:#ce5c00;font-weight:bold&#34;&gt;=&amp;gt;&lt;/span&gt; &lt;span style=&#34;color:#000;font-weight:bold&#34;&gt;{&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;                        &lt;span style=&#34;color:#000&#34;&gt;triggerCondition&lt;/span&gt;&lt;span style=&#34;color:#000;font-weight:bold&#34;&gt;.&lt;/span&gt;&lt;span style=&#34;color:#000&#34;&gt;intent&lt;/span&gt; &lt;span style=&#34;color:#ce5c00;font-weight:bold&#34;&gt;=&lt;/span&gt; &lt;span style=&#34;color:#204a87;font-weight:bold&#34;&gt;this&lt;/span&gt;&lt;span style=&#34;color:#000;font-weight:bold&#34;&gt;.&lt;/span&gt;&lt;span style=&#34;color:#000&#34;&gt;getIntentByChannelDataVersion&lt;/span&gt;&lt;span style=&#34;color:#000;font-weight:bold&#34;&gt;(&lt;/span&gt;&lt;span style=&#34;color:#000&#34;&gt;triggerCondition&lt;/span&gt;&lt;span style=&#34;color:#000;font-weight:bold&#34;&gt;.&lt;/span&gt;&lt;span style=&#34;color:#000&#34;&gt;intent&lt;/span&gt;&lt;span style=&#34;color:#000;font-weight:bold&#34;&gt;,&lt;/span&gt; &lt;span style=&#34;color:#000&#34;&gt;dialog&lt;/span&gt;&lt;span style=&#34;color:#000;font-weight:bold&#34;&gt;.&lt;/span&gt;&lt;span style=&#34;color:#000&#34;&gt;channelDataVersion&lt;/span&gt;&lt;span style=&#34;color:#000;font-weight:bold&#34;&gt;);&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;                    &lt;span style=&#34;color:#000;font-weight:bold&#34;&gt;});&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;                &lt;span style=&#34;color:#000;font-weight:bold&#34;&gt;}&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;            &lt;span style=&#34;color:#000;font-weight:bold&#34;&gt;});&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;        &lt;span style=&#34;color:#000;font-weight:bold&#34;&gt;});&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;        &lt;span style=&#34;color:#000;font-weight:bold&#34;&gt;.......&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;h3 id=&#34;routing-configuration&#34;&gt;Routing configuration&lt;/h3&gt;
&lt;p&gt;Intents whose dialogs have the property &lt;code&gt;channelDataVersion&lt;/code&gt; with a value greater than or equal to &lt;code&gt;v3&lt;/code&gt; will name their intents with the corresponding version.&lt;/p&gt;
&lt;p&gt;Example:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;&amp;ldquo;channelDataVersion&amp;rdquo;: &amp;ldquo;v3&amp;rdquo; -&amp;gt; &lt;code&gt;intent.[intent_name].v3&lt;/code&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&amp;ldquo;channelDataVersion&amp;rdquo;: &amp;ldquo;v2&amp;rdquo; -&amp;gt; &lt;code&gt;intent.[intent_name]&lt;/code&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&amp;ldquo;channelDataVersion&amp;rdquo;: &amp;ldquo;v1&amp;rdquo; -&amp;gt; &lt;code&gt;intent.[intent_name]&lt;/code&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&amp;ldquo;No channelDataVersion&amp;rdquo; -&amp;gt; &lt;code&gt;intent.[intent_name]&lt;/code&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;For the previous example, the dialog routing would be as follows:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;&amp;ldquo;intent.factotum-test.channel-data-model.v3&amp;rdquo; -&amp;gt; Routing -&amp;gt; &amp;ldquo;channel-data-V3-dialog-example&amp;rdquo;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&amp;ldquo;intent.factotum-test.channel-data-model&amp;rdquo; -&amp;gt; Routing -&amp;gt; &amp;ldquo;channel-data-V1-dialog-example&amp;rdquo;&lt;/p&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;h3 id=&#34;establishment-of-intent-versioning-in-recognizers&#34;&gt;Establishment of intent versioning in recognizers&lt;/h3&gt;
&lt;p&gt;When a channel sets a version of the &lt;code&gt;channelData&lt;/code&gt; greater or equal to &lt;code&gt;v3&lt;/code&gt;, the routing step will set intent format in &lt;code&gt;getIntentByChannelDataVersion()&lt;/code&gt;, which can be found in &lt;code&gt;aura-configuration&lt;/code&gt;.&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; style=&#34;background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4;&#34;&gt;&lt;code class=&#34;language-Typescript&#34; data-lang=&#34;Typescript&#34;&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;  &lt;span style=&#34;color:#204a87;font-weight:bold&#34;&gt;public&lt;/span&gt; &lt;span style=&#34;color:#204a87;font-weight:bold&#34;&gt;static&lt;/span&gt; &lt;span style=&#34;color:#000&#34;&gt;setIntentResult&lt;/span&gt;&lt;span style=&#34;color:#000;font-weight:bold&#34;&gt;(&lt;/span&gt;&lt;span style=&#34;color:#000&#34;&gt;context&lt;/span&gt;: &lt;span style=&#34;color:#204a87;font-weight:bold&#34;&gt;TurnContext&lt;/span&gt;&lt;span style=&#34;color:#000;font-weight:bold&#34;&gt;,&lt;/span&gt; &lt;span style=&#34;color:#000&#34;&gt;intentResult&lt;/span&gt;: &lt;span style=&#34;color:#204a87;font-weight:bold&#34;&gt;any&lt;/span&gt;&lt;span style=&#34;color:#000;font-weight:bold&#34;&gt;,&lt;/span&gt; &lt;span style=&#34;color:#000&#34;&gt;utterance&lt;/span&gt;: &lt;span style=&#34;color:#204a87;font-weight:bold&#34;&gt;string&lt;/span&gt;&lt;span style=&#34;color:#000;font-weight:bold&#34;&gt;,&lt;/span&gt; &lt;span style=&#34;color:#000&#34;&gt;promptCheck&lt;/span&gt;: &lt;span style=&#34;color:#204a87;font-weight:bold&#34;&gt;boolean&lt;/span&gt;&lt;span style=&#34;color:#000;font-weight:bold&#34;&gt;,&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;        &lt;span style=&#34;color:#000;font-weight:bold&#34;&gt;......&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;        &lt;span style=&#34;color:#000&#34;&gt;intentResult&lt;/span&gt;&lt;span style=&#34;color:#000;font-weight:bold&#34;&gt;.&lt;/span&gt;&lt;span style=&#34;color:#000&#34;&gt;intent&lt;/span&gt; &lt;span style=&#34;color:#ce5c00;font-weight:bold&#34;&gt;=&lt;/span&gt; &lt;span style=&#34;color:#000&#34;&gt;AuraChannelsConfiguration&lt;/span&gt;&lt;span style=&#34;color:#000;font-weight:bold&#34;&gt;.&lt;/span&gt;&lt;span style=&#34;color:#000&#34;&gt;instance&lt;/span&gt;&lt;span style=&#34;color:#000;font-weight:bold&#34;&gt;.&lt;/span&gt;&lt;span style=&#34;color:#000&#34;&gt;getIntentByChannelDataVersion&lt;/span&gt;&lt;span style=&#34;color:#000;font-weight:bold&#34;&gt;(&lt;/span&gt;&lt;span style=&#34;color:#000&#34;&gt;intentResult&lt;/span&gt;&lt;span style=&#34;color:#000;font-weight:bold&#34;&gt;.&lt;/span&gt;&lt;span style=&#34;color:#000&#34;&gt;intent&lt;/span&gt;&lt;span style=&#34;color:#000;font-weight:bold&#34;&gt;,&lt;/span&gt; &lt;span style=&#34;color:#000&#34;&gt;ChannelDataUtils&lt;/span&gt;&lt;span style=&#34;color:#000;font-weight:bold&#34;&gt;.&lt;/span&gt;&lt;span style=&#34;color:#000&#34;&gt;getChannelDataVersion&lt;/span&gt;&lt;span style=&#34;color:#000;font-weight:bold&#34;&gt;(&lt;/span&gt;&lt;span style=&#34;color:#000&#34;&gt;context&lt;/span&gt;&lt;span style=&#34;color:#000;font-weight:bold&#34;&gt;));&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;        &lt;span style=&#34;color:#000;font-weight:bold&#34;&gt;......&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;    &lt;span style=&#34;color:#000;font-weight:bold&#34;&gt;}&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;h3 id=&#34;routing-to-v3-dialog&#34;&gt;Routing to v3 dialog&lt;/h3&gt;
&lt;p&gt;Once the routing and the recognizers steps are executed, based of the result obtained, it will be routed to a &lt;code&gt;v3&lt;/code&gt; dialog if &lt;code&gt;channelDataVersion: &amp;quot;v3&amp;quot;&lt;/code&gt; and there is match in the recognized intent.&lt;/p&gt;
&lt;h2 id=&#34;dialogs-in-v3&#34;&gt;Dialogs in v3&lt;/h2&gt;
&lt;p&gt;Currently, only certain dialogs have been migrated to channelData &lt;code&gt;v3&lt;/code&gt; version,as specified in the following sections.&lt;/p&gt;
&lt;h3 id=&#34;greetings-v3-dialog&#34;&gt;Greetings v3 dialog&lt;/h3&gt;
&lt;p&gt;&lt;a href=&#34;https://github.com/Telefonica/aura-bot-libraries/tree/master/packages/common/src/v3&#34;&gt;Greetings dialog&lt;/a&gt;, which is included in &lt;code&gt;common&lt;/code&gt; library, has been migrated to &lt;code&gt;v3&lt;/code&gt;.&lt;/p&gt;
&lt;p&gt;For more information about this implementation, check &lt;a href=&#34;../../../../../docs/experiences-builder/development-use-cases/bot-uc-development/build-dialog/dialog-channelmodelv3/&#34;&gt;Create/migrate a dialog to channelData v3&lt;/a&gt;.&lt;/p&gt;
&lt;h3 id=&#34;didntunderstand-special-case&#34;&gt;didntUnderstand special case&lt;/h3&gt;
&lt;p&gt;There is a particular case: a request needs a V3 dialog and this is not implemented. In this case, &lt;code&gt;None&lt;/code&gt; dialog should be triggered.&lt;/p&gt;
&lt;p&gt;At the moment, &lt;code&gt;None&lt;/code&gt; has not being migrated to &lt;code&gt;v3&lt;/code&gt; so this type of requests are redirected to bot&amp;rsquo;s fallback case &lt;a href=&#34;https://github.com/Telefonica/aura-bot-platform/blob/master/src/dialogs/main.ts#L235&#34;&gt;didntUnderstand&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;This occurs due to routing appending &lt;code&gt;v3&lt;/code&gt; to &lt;code&gt;None&lt;/code&gt; intent and not finding a match. This case returns an activity with the resource &lt;code&gt;core:core.cancel&lt;/code&gt;&lt;/p&gt;
&lt;h3 id=&#34;prompt-case&#34;&gt;Prompt case&lt;/h3&gt;
&lt;p&gt;In this particular case, the last message processed by the dialog must have the &lt;code&gt;channelData&lt;/code&gt; correct version.&lt;/p&gt;
&lt;p&gt;Firstly, the prompt is displayed to the user going through the &lt;code&gt;mainDialog&lt;/code&gt;, but user&amp;rsquo;s response to that prompt does not follow the same path.&lt;/p&gt;
&lt;p&gt;During this stage, &lt;code&gt;channelData&lt;/code&gt; is converted into &lt;code&gt;v3&lt;/code&gt; for compatibility with &lt;em&gt;&lt;strong&gt;aura-bot&lt;/strong&gt;&lt;/em&gt; core.&lt;/p&gt;
&lt;p&gt;If the dialog is in version &lt;code&gt;v1&lt;/code&gt;, &lt;code&gt;channelData&lt;/code&gt; will not need to be modified, so the &lt;a href=&#34;../../../../../docs/components/aura-groot/aura-groot-middlewares/channeldata-validator-middleware/&#34;&gt;&lt;em&gt;&lt;strong&gt;channeldata-validator-middleware&lt;/strong&gt;&lt;/em&gt;&lt;/a&gt; will check if the dialog is legacy and will convert its response &lt;code&gt;channelData&lt;/code&gt; to &lt;code&gt;v1&lt;/code&gt;.&lt;/p&gt;
&lt;h2 id=&#34;outgoing-middlewares&#34;&gt;Outgoing middlewares&lt;/h2&gt;
&lt;p&gt;Once &lt;em&gt;&lt;strong&gt;aura-bot&lt;/strong&gt;&lt;/em&gt; responds, this response is being processed by certain middlewares that work in &lt;code&gt;v3&lt;/code&gt; version. Hence, there are two possible flows:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;&lt;strong&gt;User is requesting a v1 dialog&lt;/strong&gt;
In this case, the response from the &lt;code&gt;v1&lt;/code&gt; dialog is converted into &lt;code&gt;v3&lt;/code&gt; immediately after the activity is created.&lt;/p&gt;
&lt;p&gt;Once the activity is being processed by the middleware&amp;rsquo;s pipeline, it is converted from &lt;code&gt;v3&lt;/code&gt; to &lt;code&gt;v1&lt;/code&gt; by the &lt;a href=&#34;../../../../../docs/components/aura-bot-platform/aura-bot-components/middlewares/outgoing-channeldata-normalizer-middleware/&#34;&gt;&lt;em&gt;&lt;strong&gt;outgoingchannelDataNormalizer&lt;/strong&gt;&lt;/em&gt; middleware&lt;/a&gt;, that performs the same actions in reverse order than &lt;em&gt;&lt;strong&gt;incomingchannelDataNormalizer&lt;/strong&gt;&lt;/em&gt; middleware.&lt;/p&gt;
&lt;p&gt;Once the activity is being processed by the middleware&amp;rsquo;s pipeline, it is converted from &lt;code&gt;v3&lt;/code&gt; to &lt;code&gt;v1&lt;/code&gt; in the &lt;a href=&#34;../../../../../docs/components/aura-bot-platform/aura-bot-components/#aura-botframework-adapter&#34;&gt;&lt;em&gt;&lt;strong&gt;Aura BotFramework adapter&lt;/strong&gt;&lt;/em&gt;&lt;/a&gt;.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;strong&gt;User is requesting a v3 dialog&lt;/strong&gt;
In this case, the response from the &lt;code&gt;v3&lt;/code&gt; dialog is already in the current supported version, so there is no need to merge to other version.&lt;/p&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;h2 id=&#34;adapter&#34;&gt;Adapter&lt;/h2&gt;
&lt;p&gt;Before sending the response to the user, there are a number of extra steps which are performed inside the  &lt;a href=&#34;../../../../../docs/components/aura-bot-platform/aura-bot-components/#aura-botframework-adapter&#34;&gt;&lt;em&gt;&lt;strong&gt;Aura BotFramework adapter&lt;/strong&gt;&lt;/em&gt;&lt;/a&gt;.&lt;/p&gt;
&lt;h2 id=&#34;channeldata-validation&#34;&gt;channelData validation&lt;/h2&gt;
&lt;p&gt;As done in the request stage, there is another validation in the response, before sending the resulting activity to the user, checking if the sent schema is valid for the activity version.&lt;/p&gt;
&lt;p&gt;Find more information about which validations are made and utilities used for this flow in &lt;a href=&#34;../../../../../docs/components/aura-bot-platform/aura-bot-processes/channel-data/channeldata-validation/&#34;&gt;channelData validations&lt;/a&gt;.&lt;/p&gt;
&lt;h3 id=&#34;activity-merging&#34;&gt;Activity merging&lt;/h3&gt;
&lt;p&gt;For more information about how &lt;code&gt;channelData&lt;/code&gt; merges are processed, check &lt;a href=&#34;../../../../../docs/components/aura-bot-platform/aura-bot-processes/channel-data/channeldata-mapping/&#34;&gt;channelData mapping&lt;/a&gt;.&lt;/p&gt;

      </description>
    </item>
    
    <item>
      <title>Docs: </title>
      <link>/docs/components/aura-bot-platform/aura-bot-processes/channel-data/channeldata-mapping/</link>
      <pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate>
      
      <guid>/docs/components/aura-bot-platform/aura-bot-processes/channel-data/channeldata-mapping/</guid>
      <description>
        
        
        &lt;h1 id=&#34;channeldata-mapping&#34;&gt;channelData mapping&lt;/h1&gt;


&lt;div class=&#34;pageinfo pageinfo-primary&#34;&gt;
&lt;p&gt;channelData mapping in Aura response&lt;/p&gt;

&lt;/div&gt;

&lt;h2 id=&#34;introduction&#34;&gt;Introduction&lt;/h2&gt;
&lt;p&gt;Currently, Aura supports &lt;strong&gt;dialogs&lt;/strong&gt; able to provide responses in &lt;a href=&#34;../../../../../docs/components/request-response-model/#versioning&#34;&gt;v1, v2 and v3 channelData versions&lt;/a&gt;. These responses are mapped to be handled by the bot output middlewares as &lt;code&gt;v3&lt;/code&gt;, but after that, dialogs are mapped again to the original response version to be returned to the client.&lt;/p&gt;
&lt;p&gt;However, &lt;strong&gt;incoming middlewares&lt;/strong&gt; are able to work with different request channelData versions &lt;code&gt;v1&lt;/code&gt;, &lt;code&gt;v2&lt;/code&gt; and &lt;code&gt;v3&lt;/code&gt;, indistinctly.&lt;/p&gt;
&lt;p&gt;&lt;img src=&#34;../../../../../images/normalization-flow.png&#34; alt=&#34;Normalization Flow&#34; title=&#34;Normalization Flow&#34;&gt;&lt;/p&gt;
&lt;h2 id=&#34;request&#34;&gt;Request&lt;/h2&gt;
&lt;p&gt;The request is currently not transformed and is accessed using &lt;a href=&#34;../../../../../docs/developers-workspace/develop-features/aura-utilities/aura-bot-utilities/aura-bot-common/channel-data-utils/&#34;&gt;channelData utils&lt;/a&gt; from the &lt;em&gt;&lt;strong&gt;aura-bot-common&lt;/strong&gt;&lt;/em&gt; library.&lt;/p&gt;
&lt;p&gt;These utils make transparent the access to all &lt;code&gt;channelData&lt;/code&gt; properties needed in &lt;code&gt;v1&lt;/code&gt; or &lt;code&gt;v3&lt;/code&gt;.&lt;/p&gt;
&lt;h2 id=&#34;response&#34;&gt;Response&lt;/h2&gt;
&lt;p&gt;The response returned by the dialog is normalized in the &lt;a href=&#34;../../../../../docs/components/aura-bot-platform/aura-bot-components/middlewares//outgoing-channeldata-normalizer-middleware/&#34;&gt;&lt;em&gt;&lt;strong&gt;outgoingchannelDataNormalizer&lt;/strong&gt;&lt;/em&gt; middleware&lt;/a&gt;, the first outgoing middleware executed after the dialog.&lt;/p&gt;
&lt;p&gt;This normalization is done if the &lt;code&gt;channelData&lt;/code&gt; version returned is lower than the current version.&lt;/p&gt;
&lt;p&gt;The middleware calls &lt;a href=&#34;https://github.com/Telefonica/aura-common-utilities/blob/master/packages/aura-utilities/src/aura-channel-data-handler/response/response-mapper.ts&#34;&gt;ChannelDataResponseMapper.getResponseChannelData&lt;/a&gt; with:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;The normalized version (currently, &lt;code&gt;v3&lt;/code&gt;) as first parameter.&lt;/li&gt;
&lt;li&gt;The channelData in the old version as second parameter.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;This mapper function will return a normalized version of the &lt;code&gt;channelData&lt;/code&gt;.&lt;/p&gt;
&lt;p&gt;After all the middlewares are executed, in the &lt;a href=&#34;https://github.com/Telefonica/aura-bot-platform/blob/master/src/adapters/aura-bot-adapter.ts#L54&#34;&gt;adapter&lt;/a&gt;, the response should be transformed to the version returned by dialog again.&lt;/p&gt;
&lt;p&gt;To do this, &lt;a href=&#34;https://github.com/Telefonica/aura-common-utilities/blob/master/packages/aura-utilities/src/aura-channel-data-handler/response/response-mapper.ts&#34;&gt;ChannelDataResponseMapper.getResponseChannelData&lt;/a&gt;
is called again with:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;The version originally returned by the dialog as first parameter.&lt;/li&gt;
&lt;li&gt;The &lt;code&gt;channelData&lt;/code&gt; as second parameter.&lt;/li&gt;
&lt;li&gt;The original &lt;code&gt;channelData&lt;/code&gt; returned by the dialog as third parameter. This third parameter is needed because in the conversion from old versions to the normalized version certain fields may disappear, so we need to merge the normalized &lt;code&gt;channelData&lt;/code&gt; (maybe modified by the outgoing middlewares) with the original returned by the dialog.&lt;/li&gt;
&lt;/ul&gt;
&lt;h2 id=&#34;channels-using-a-botservice-adapter&#34;&gt;Channels using a BotService adapter&lt;/h2&gt;
&lt;p&gt;Channels such as &lt;strong&gt;Facebook&lt;/strong&gt; that use a BotService Adapter will always use a &lt;code&gt;channelData&lt;/code&gt; without version, which internally is translated to &lt;code&gt;v1&lt;/code&gt;.&lt;/p&gt;
&lt;p&gt;This means that the request will have to be mapped for good. The major implication is that &lt;code&gt;channelData&lt;/code&gt; version &lt;code&gt;v3&lt;/code&gt; must take into account the fields needed by these adapters, so the communication and the user&amp;rsquo;s experience are kept the same.&lt;/p&gt;
&lt;p&gt;Currently, &lt;em&gt;&lt;strong&gt;aura-bot&lt;/strong&gt;&lt;/em&gt; is only validated to be accessed through the Facebook Messenger adapter. In this case, the protocol allows the exchange of &lt;code&gt;HeroCards&lt;/code&gt;, but the way they are sent to the channel is a bit different than in Direct Line channels: they are sent as &lt;code&gt;attachments&lt;/code&gt; of the &lt;code&gt;channelData&lt;/code&gt; instead of &lt;code&gt;attachments&lt;/code&gt; of the &lt;code&gt;activity&lt;/code&gt;.&lt;/p&gt;
&lt;p&gt;So, in order to allow &lt;strong&gt;Aura&lt;/strong&gt; use cases to send buttons or a complete &lt;code&gt;HeroCard&lt;/code&gt; to a user, the &lt;code&gt;attachments&lt;/code&gt; field of the &lt;code&gt;channelData&lt;/code&gt; must be kept during the version mapping.&lt;/p&gt;

      </description>
    </item>
    
    <item>
      <title>Docs: </title>
      <link>/docs/components/aura-bot-platform/aura-bot-processes/channel-data/channeldata-validation/</link>
      <pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate>
      
      <guid>/docs/components/aura-bot-platform/aura-bot-processes/channel-data/channeldata-validation/</guid>
      <description>
        
        
        &lt;h1 id=&#34;channeldata-validations&#34;&gt;channelData validations&lt;/h1&gt;


&lt;div class=&#34;pageinfo pageinfo-primary&#34;&gt;
&lt;p&gt;&lt;code&gt;channelData&lt;/code&gt; validations done both in the request and the response, according to a certain configuration&lt;/p&gt;

&lt;/div&gt;

&lt;h2 id=&#34;validations-in-request-channeldata&#34;&gt;Validations in request channelData&lt;/h2&gt;
&lt;p&gt;Request &lt;code&gt;channelData&lt;/code&gt; will be validated if its version is greater than or equal to &lt;code&gt;AURA_CHANNELDATA_VALIDATION_MIN_VERSION&lt;/code&gt;, that is always &lt;code&gt;v3&lt;/code&gt; (prior versions will never validate and will get all the &lt;code&gt;channelData&lt;/code&gt; &amp;ldquo;as they are&amp;rdquo;).&lt;/p&gt;
&lt;p&gt;That means, that any version from &lt;code&gt;v3&lt;/code&gt; onwards will be validated (even non existing versions, such as &lt;code&gt;99&lt;/code&gt;, will try to be validated).&lt;/p&gt;
&lt;p&gt;Versions from &lt;code&gt;v3&lt;/code&gt; onwards will only use the major as a string (e.g., &lt;code&gt;3&lt;/code&gt;), but also semver is understood (e.g., &lt;code&gt;3.0.0&lt;/code&gt;), but note that minor and patch will be ignored (e.g., &lt;code&gt;3.2.1&lt;/code&gt; === &lt;code&gt;3.0.0&lt;/code&gt;) when looking for a validator.&lt;/p&gt;
&lt;h3 id=&#34;logic-location&#34;&gt;Logic location&lt;/h3&gt;
&lt;p&gt;The validation is done in the &lt;a href=&#34;../../../../../docs/components/aura-groot/aura-groot-middlewares/channeldata-validator-middleware/&#34;&gt;&lt;em&gt;&lt;strong&gt;channeldata-validator-middleware&lt;/strong&gt;&lt;/em&gt;&lt;/a&gt;, that must be one of the first middlewares, to ensure that no other logic is fetching data from &lt;code&gt;channelData&lt;/code&gt; before validating it.&lt;/p&gt;
&lt;h3 id=&#34;errors&#34;&gt;Errors&lt;/h3&gt;
&lt;p&gt;There are two types of errors on request validation:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;Validation error&lt;/strong&gt;: the request &lt;code&gt;channelData&lt;/code&gt; does not comply the schema for that version. The error is stored in &lt;code&gt;requestValidationErrors&lt;/code&gt; property within the thrown error.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Missing validator error&lt;/strong&gt;: the specified version does not have a matching validator, so &lt;code&gt;channelData&lt;/code&gt; is invalid.&lt;/li&gt;
&lt;/ul&gt;
&lt;h2 id=&#34;validations-in-response-channeldata&#34;&gt;Validations in response channelData&lt;/h2&gt;
&lt;p&gt;Response &lt;code&gt;channelData&lt;/code&gt; will be validated if &lt;code&gt;AURA_CHANNELDATA_RESPONSE_VALIDATION&lt;/code&gt; environment variable is set to &lt;code&gt;true&lt;/code&gt;.&lt;/p&gt;
&lt;p&gt;In that case, all outgoing activities will have their &lt;code&gt;channelData&lt;/code&gt; validated, even the error messages, before sending to the user.&lt;/p&gt;
&lt;p&gt;The validation must be done after the &lt;code&gt;channelData&lt;/code&gt; is transformed into the final version (that could be or not the &amp;ldquo;internal&amp;rdquo; version).&lt;/p&gt;
&lt;h3 id=&#34;logic-location-1&#34;&gt;Logic location&lt;/h3&gt;
&lt;p&gt;The response validation is done in &lt;a href=&#34;../../../../../docs/components/aura-groot/&#34;&gt;&lt;em&gt;&lt;strong&gt;Aura Groot&lt;/strong&gt;&lt;/em&gt;&lt;/a&gt;, in &lt;code&gt;AuraCloudAdapter&lt;/code&gt; class.&lt;/p&gt;
&lt;h3 id=&#34;errors-1&#34;&gt;Errors&lt;/h3&gt;
&lt;p&gt;There are two types of errors on response validation:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;Validation error&lt;/strong&gt;: the response &lt;code&gt;channelData&lt;/code&gt; does not comply the schema for that version and the error is stored in &lt;code&gt;responseValidationErrors&lt;/code&gt; property within the thrown error.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Missing validator error&lt;/strong&gt;: the specified version does not have a matching validator, so the &lt;code&gt;channelData&lt;/code&gt; is invalid.&lt;/li&gt;
&lt;/ul&gt;

      </description>
    </item>
    
  </channel>
</rss>
