This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{% fetchxml KB_Query %} | |
<fetch version="1.0" mapping="logical"> | |
<entity name="knowledgearticle"> | |
<attribute name="knowledgearticleid" /> | |
<attribute name="title" /> | |
<attribute name="content" /> | |
<order attribute="title" descending="false" /> | |
<filter type="and"> | |
<condition attribute="isrootarticle" operator="eq" value="0" /> | |
</filter> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
user=Joe | |
bot=LulaBot | |
bot: Hi! | |
user: yo! | |
bot: [Typing][Delay=3000] | |
Greetings! | |
What would you like to do? | |
* update - You can update your account | |
* List - You can list your data |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public class BotMessage | |
{ | |
public string Message { get; set; } | |
} | |
public static BotMessage Run(string queueMessage, out BotMessage botMessage, TraceWriter log) | |
{ | |
botMessage = new BotMessage | |
{ | |
Message = queueMessage |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public class QueueMessage | |
{ | |
public string ChannelID { get; set; } | |
public string FromID { get; set; } | |
public string FromName { get; set; } | |
public string RecipientID { get; set; } | |
public string RecipientName { get; set; } | |
public string ConversationID { get; set; } | |
public string ServiceURL { get; set; } | |
public string Alert { get; set; } |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/// <summary> | |
/// The bot is obviously stateless. When we get the message from D365, we need to parse the data to find out which citizen should receive what message on which channel. | |
/// </summary> | |
/// <param name="activity"></param> | |
private void CommunicateMessageToUser(Activity activity) | |
{ | |
var message = JsonConvert.DeserializeObject<QueueMessage>(((JObject)activity.Value).GetValue("Message").ToString()); | |
//Conversation ID is generally the key in order to reply to the same conversation in the channel. | |
if(!string.IsNullOrEmpty(message.ConversationID)) |
NewerOlder