/// <summary>
        /// This method will construct the card for SME team which will have the
        /// feedback details given by the user.
        /// </summary>
        /// <param name="data">User activity payload.</param>
        /// <param name="userDetails">User details.</param>
        /// <param name="localTimestamp">Local timestamp of the user activity.</param>
        /// <returns>Sme facing feedback notification card.</returns>
        public static Attachment GetCard(ShareFeedbackCardPayload data, TeamsChannelAccount userDetails, DateTimeOffset?localTimestamp)
        {
            // Constructing adaptive card that is sent to SME team.
            AdaptiveCard smeFeedbackCard = new AdaptiveCard(new AdaptiveSchemaVersion(1, 0))
            {
                Body = new List <AdaptiveElement>
                {
                    new AdaptiveTextBlock()
                    {
                        Text   = Strings.SMEFeedbackHeaderText,
                        Weight = AdaptiveTextWeight.Bolder,
                        Size   = AdaptiveTextSize.Large,
                    },
                },
                Actions = new List <AdaptiveAction>
                {
                    new AdaptiveOpenUrlAction
                    {
                        Title     = string.Format(CultureInfo.InvariantCulture, Strings.ChatTextButton, userDetails?.GivenName),
                        UrlString = $"https://teams.microsoft.com/l/chat/0/0?users={Uri.EscapeDataString(userDetails.UserPrincipalName)}",
                    },
                },
            };

            smeFeedbackCard.Body.Add(new AdaptiveFactSet
            {
                Facts = BuildFactSet(data, localTimestamp, userDetails?.Name),
            });

            // Question asked fact and view article show card is available when feedback is on QnA Maker response.
            if (!string.IsNullOrWhiteSpace(data.KnowledgeBaseAnswer) && !string.IsNullOrWhiteSpace(data.UserQuestion))
            {
                smeFeedbackCard.Actions.AddRange(new List <AdaptiveAction>
                {
                    new AdaptiveShowCardAction
                    {
                        Title = Strings.ViewArticleButtonText,
                        Card  = new AdaptiveCard(new AdaptiveSchemaVersion(1, 0))
                        {
                            Body = new List <AdaptiveElement>
                            {
                                new AdaptiveTextBlock
                                {
                                    Text = CardHelper.TruncateStringIfLonger(data.KnowledgeBaseAnswer, CardHelper.KnowledgeBaseAnswerMaxDisplayLength),
                                    Wrap = true,
                                },
                            },
                        },
                    },
                });
            }

            return(new Attachment
            {
                ContentType = AdaptiveCard.ContentType,
                Content = smeFeedbackCard,
            });
        }
Exemple #2
0
        /// <summary>
        /// Return the appropriate set of card actions based on the state and information in the ticket.
        /// </summary>
        /// <returns>Adaptive card actions.</returns>
        protected virtual List <AdaptiveAction> BuildActions()
        {
            var textAlignment = CultureInfo.CurrentCulture.TextInfo.IsRightToLeft ? AdaptiveHorizontalAlignment.Right : AdaptiveHorizontalAlignment.Left;
            List <AdaptiveAction> actionsList = new List <AdaptiveAction>();

            actionsList.Add(this.CreateChatWithUserAction());

            actionsList.Add(new AdaptiveShowCardAction
            {
                Title = Strings.ChangeStatusButtonText,
                Card  = new AdaptiveCard(new AdaptiveSchemaVersion(1, 0))
                {
                    Body = new List <AdaptiveElement>
                    {
                        this.GetAdaptiveChoiceSetInput(),
                    },
                    Actions = new List <AdaptiveAction>
                    {
                        new AdaptiveSubmitAction
                        {
                            Title = Strings.SubmitButtonText,
                            Data  = new ChangeTicketStatusPayload {
                                TicketId = this.Ticket.TicketId
                            },
                        },
                    },
                },
            });

            if (!string.IsNullOrEmpty(this.Ticket.KnowledgeBaseAnswer))
            {
                actionsList.Add(new AdaptiveShowCardAction
                {
                    Title = Strings.ViewArticleButtonText,
                    Card  = new AdaptiveCard(new AdaptiveSchemaVersion(1, 0))
                    {
                        Body = new List <AdaptiveElement>
                        {
                            new AdaptiveTextBlock
                            {
                                Text = CardHelper.TruncateStringIfLonger(this.Ticket.KnowledgeBaseAnswer, CardHelper.KnowledgeBaseAnswerMaxDisplayLength),
                                Wrap = true,
                                HorizontalAlignment = textAlignment,
                            },
                        },
                    },
                });
            }

            return(actionsList);
        }
        /// <summary>
        /// Return the appropriate fact set based on the state and information in the ticket.
        /// </summary>
        /// <param name="data">User activity payload.</param>
        /// <param name="localTimestamp">The current timestamp.</param>
        /// <param name="userName">The user who sent the feeback.</param>
        /// <returns>The fact set showing the necessary details.</returns>
        private static List <AdaptiveFact> BuildFactSet(ShareFeedbackCardPayload data, DateTimeOffset?localTimestamp, string userName)
        {
            List <AdaptiveFact> factList = new List <AdaptiveFact>();

            if (string.IsNullOrEmpty(data.TicketId))
            {
                factList.Add(new AdaptiveFact
                {
                    Title = Strings.QuestionMessageFeedbackText,
                    Value = data.UserQuestion,
                });
            }
            else
            {
                factList.Add(new AdaptiveFact
                {
                    Title = Strings.QuestionMessageFeedbackText,
                    Value = string.Format(CultureInfo.InvariantCulture, Strings.SMEFeedbackTicketIDFact, data.TicketId, data.UserQuestion),
                });
            }

            factList.Add(new AdaptiveFact
            {
                Title = Strings.RatingTitle,
                Value = GetRatingDisplayText(data?.Rating),
            });

            // Description fact is available in the card only when user enters description text.
            if (!string.IsNullOrWhiteSpace(data.Description))
            {
                factList.Add(new AdaptiveFact
                {
                    Title = Strings.DescriptionText,
                    Value = CardHelper.TruncateStringIfLonger(data.Description, CardHelper.DescriptionMaxDisplayLength),
                });
            }

            factList.Add(new AdaptiveFact
            {
                Title = Strings.DateFactTitle,
                Value = CardHelper.GetFormattedDateInUserTimeZone(DateTime.Now, localTimestamp),
            });

            factList.Add(new AdaptiveFact
            {
                Title = Strings.ProvidedByFact,
                Value = userName,
            });

            return(factList);
        }
Exemple #4
0
        /// <summary>
        /// Return the appropriate set of card actions based on the state and information in the ticket.
        /// </summary>
        /// <returns>Adaptive card actions.</returns>
        protected virtual List <AdaptiveAction> BuildActions()
        {
            List <AdaptiveAction> actionsList = new List <AdaptiveAction>();

            if (string.IsNullOrEmpty(this.Ticket.RequesterGivenName))
            {
                actionsList.Add(this.CreateChatWithUserAction());
            }

            actionsList.Add(new AdaptiveShowCardAction
            {
                Title = Strings.ChangeStatusButtonText,
                Card  = new AdaptiveCard(new AdaptiveSchemaVersion(1, 0))
                {
                    Body = new List <AdaptiveElement>
                    {
                        this.GetAdaptiveChoiceSetInput(),
                    },
                    Actions = new List <AdaptiveAction>
                    {
                        new AdaptiveSubmitAction
                        {
                            Data = new ChangeTicketStatusPayload {
                                TicketId = this.Ticket.TicketId
                            },
                        },
                    },
                },
            });

            if (!string.IsNullOrEmpty(this.Ticket.KnowledgeBaseAnswer))
            {
                actionsList.Add(new AdaptiveShowCardAction
                {
                    Title = Strings.ViewArticleButtonText,
                    Card  = new AdaptiveCard(new AdaptiveSchemaVersion(1, 0))
                    {
                        Body = new List <AdaptiveElement>
                        {
                            new AdaptiveTextBlock
                            {
                                Text = CardHelper.TruncateStringIfLonger(this.Ticket.KnowledgeBaseAnswer, CardHelper.KnowledgeBaseAnswerMaxDisplayLength),
                                Wrap = true,
                            },
                        },
                    },
                });
            }

            return(actionsList);
        }
Exemple #5
0
        /// <summary>
        /// Building the fact set to render out the user facing details.
        /// </summary>
        /// <param name="ticket">The current ticket information.</param>
        /// <param name="activityLocalTimestamp">The local timestamp.</param>
        /// <returns>The adaptive facts.</returns>
        private List <AdaptiveFact> BuildFactSet(TicketEntity ticket, DateTimeOffset?activityLocalTimestamp)
        {
            List <AdaptiveFact> factList = new List <AdaptiveFact>();

            factList.Add(new AdaptiveFact
            {
                Title = Strings.StatusFactTitle,
                Value = CardHelper.GetUserTicketDisplayStatus(this.ticket),
            });

            factList.Add(new AdaptiveFact
            {
                Title = Strings.TitleFact,
                Value = CardHelper.TruncateStringIfLonger(this.ticket.Title, CardHelper.TitleMaxDisplayLength),
            });

            if (!string.IsNullOrEmpty(ticket.Description))
            {
                factList.Add(new AdaptiveFact
                {
                    Title = Strings.DescriptionFact,
                    Value = CardHelper.TruncateStringIfLonger(this.ticket.Description, CardHelper.DescriptionMaxDisplayLength),
                });
            }

            factList.Add(new AdaptiveFact
            {
                Title = Strings.DateCreatedDisplayFactTitle,
                Value = CardHelper.GetFormattedDateInUserTimeZone(this.ticket.DateCreated, activityLocalTimestamp),
            });

            if (ticket.Status == (int)TicketState.Closed)
            {
                factList.Add(new AdaptiveFact
                {
                    Title = Strings.ClosedFactTitle,
                    Value = CardHelper.GetFormattedDateInUserTimeZone(this.ticket.DateClosed.Value, activityLocalTimestamp),
                });
            }

            return(factList);
        }
Exemple #6
0
        /// <summary>
        /// Building the fact set to render out the user facing details.
        /// </summary>
        /// <returns>The adaptive facts.</returns>
        private List <AdaptiveFact> BuildFactSet()
        {
            List <AdaptiveFact> factList = new List <AdaptiveFact>();

            factList.Add(new AdaptiveFact
            {
                Title = Strings.StatusFactTitle,
                Value = CardHelper.GetUserTicketDisplayStatus(this.ticket),
            });

            factList.Add(new AdaptiveFact
            {
                Title = Strings.TitleFact,
                Value = CardHelper.TruncateStringIfLonger(this.ticket.Title, CardHelper.TitleMaxDisplayLength),
            });

            if (!string.IsNullOrEmpty(this.ticket.Description))
            {
                factList.Add(new AdaptiveFact
                {
                    Title = Strings.DescriptionFact,
                    Value = CardHelper.TruncateStringIfLonger(this.ticket.Description, CardHelper.DescriptionMaxDisplayLength),
                });
            }

            factList.Add(new AdaptiveFact
            {
                Title = Strings.DateCreatedDisplayFactTitle,
                Value = CardHelper.GetFormattedDateForAdaptiveCard(this.ticket.DateCreated),
            });

            if (this.ticket.Status == (int)TicketState.Closed)
            {
                factList.Add(new AdaptiveFact
                {
                    Title = Strings.ClosedFactTitle,
                    Value = CardHelper.GetFormattedDateForAdaptiveCard(this.ticket.DateClosed.Value),
                });
            }

            return(factList);
        }
Exemple #7
0
        /// <summary>
        /// Return the appropriate set of card actions based on the state and information in the ticket.
        /// </summary>
        /// <param name="appBaseUri">The base URI where the app is hosted.</param>
        /// <returns>Adaptive card actions.</returns>
        protected virtual List <AdaptiveAction> BuildActions(string appBaseUri)
        {
            List <AdaptiveAction> actionsList = new List <AdaptiveAction>();

            actionsList.Add(this.CreateChatWithUserAction(appBaseUri));

            actionsList.Add(new AdaptiveShowCardAction
            {
                Title = Strings.ChangeStatusButtonText,
                Card  = new AdaptiveCard(new AdaptiveSchemaVersion(1, 0))
                {
                    Actions = this.BuildChangeStatesActions(),
                },
                IconUrl = appBaseUri + "/content/change.png",
            });

            if (!string.IsNullOrEmpty(this.Ticket.KnowledgeBaseAnswer))
            {
                actionsList.Add(new AdaptiveShowCardAction
                {
                    Title = Strings.ViewArticleButtonText,
                    Card  = new AdaptiveCard(new AdaptiveSchemaVersion(1, 0))
                    {
                        Body = new List <AdaptiveElement>
                        {
                            new AdaptiveTextBlock
                            {
                                Text = CardHelper.TruncateStringIfLonger(this.Ticket.KnowledgeBaseAnswer, CardHelper.KnowledgeBaseAnswerMaxDisplayLength),
                                Wrap = true,
                            },
                        },
                    },
                    IconUrl = appBaseUri + "/content/article.png",
                });
            }

            return(actionsList);
        }
Exemple #8
0
        /// <summary>
        /// This method will construct the card for SME team which will have the
        /// feedback details given by the user.
        /// </summary>
        /// <param name="data">User activity payload.</param>
        /// <param name="userDetails">User details.</param>
        /// <returns>Sme facing feedback notification card.</returns>
        public static Attachment GetCard(ShareFeedbackCardPayload data, TeamsChannelAccount userDetails)
        {
            var textAlignment = CultureInfo.CurrentCulture.TextInfo.IsRightToLeft ? AdaptiveHorizontalAlignment.Right : AdaptiveHorizontalAlignment.Left;

            // Constructing adaptive card that is sent to SME team.
            AdaptiveCard smeFeedbackCard = new AdaptiveCard(new AdaptiveSchemaVersion(1, 0))
            {
                Body = new List <AdaptiveElement>
                {
                    new AdaptiveTextBlock()
                    {
                        Text   = Strings.SMEFeedbackHeaderText,
                        Weight = AdaptiveTextWeight.Bolder,
                        Size   = AdaptiveTextSize.Medium,
                        HorizontalAlignment = textAlignment,
                    },
                    new AdaptiveTextBlock()
                    {
                        Text = string.Format(CultureInfo.InvariantCulture, Strings.FeedbackAlertText, userDetails?.Name),
                        Wrap = true,
                        HorizontalAlignment = textAlignment,
                    },
                    new AdaptiveTextBlock()
                    {
                        Text   = Strings.RatingTitle,
                        Weight = AdaptiveTextWeight.Bolder,
                        Wrap   = true,
                        HorizontalAlignment = textAlignment,
                    },
                    new AdaptiveTextBlock()
                    {
                        Text                = GetRatingDisplayText(data?.Rating),
                        Spacing             = AdaptiveSpacing.None,
                        Wrap                = true,
                        HorizontalAlignment = textAlignment,
                    },
                },
                Actions = new List <AdaptiveAction>
                {
                    new AdaptiveOpenUrlAction
                    {
                        Title     = string.Format(CultureInfo.InvariantCulture, Strings.ChatTextButton, userDetails?.GivenName),
                        UrlString = $"https://teams.microsoft.com/l/chat/0/0?users={Uri.EscapeDataString(userDetails.UserPrincipalName)}",
                    },
                },
            };

            // Description fact is available in the card only when user enters description text.
            if (!string.IsNullOrWhiteSpace(data.Description))
            {
                smeFeedbackCard.Body.Add(new AdaptiveTextBlock()
                {
                    Text   = Strings.DescriptionText,
                    Weight = AdaptiveTextWeight.Bolder,
                    Wrap   = true,
                    HorizontalAlignment = textAlignment,
                });

                smeFeedbackCard.Body.Add(new AdaptiveTextBlock()
                {
                    Text                = CardHelper.TruncateStringIfLonger(data.Description, CardHelper.DescriptionMaxDisplayLength),
                    Spacing             = AdaptiveSpacing.None,
                    Wrap                = true,
                    HorizontalAlignment = textAlignment,
                });
            }

            // Question asked fact and view article show card is available when feedback is on QnA Maker response.
            if (!string.IsNullOrWhiteSpace(data.KnowledgeBaseAnswer) && !string.IsNullOrWhiteSpace(data.UserQuestion))
            {
                smeFeedbackCard.Body.Add(new AdaptiveFactSet
                {
                    Facts = new List <AdaptiveFact>
                    {
                        new AdaptiveFact()
                        {
                            Title = Strings.QuestionAskedFactTitle,
                            Value = data.UserQuestion,
                        },
                    },
                });

                smeFeedbackCard.Actions.AddRange(new List <AdaptiveAction>
                {
                    new AdaptiveShowCardAction
                    {
                        Title = Strings.ViewArticleButtonText,
                        Card  = new AdaptiveCard(new AdaptiveSchemaVersion(1, 0))
                        {
                            Body = new List <AdaptiveElement>
                            {
                                new AdaptiveTextBlock
                                {
                                    Text = CardHelper.TruncateStringIfLonger(data.KnowledgeBaseAnswer, CardHelper.KnowledgeBaseAnswerMaxDisplayLength),
                                    Wrap = true,
                                    HorizontalAlignment = textAlignment,
                                },
                            },
                        },
                    },
                });
            }

            return(new Attachment
            {
                ContentType = AdaptiveCard.ContentType,
                Content = smeFeedbackCard,
            });
        }
        /// <summary>
        /// Building the fact set to render out the user facing details.
        /// </summary>
        /// <param name="ticket">The current ticket information.</param>
        /// <param name="activityLocalTimestamp">The local timestamp.</param>
        /// <returns>The adaptive facts.</returns>
        private List <AdaptiveFact> BuildFactSet(TicketEntity ticket, DateTimeOffset?activityLocalTimestamp)
        {
            List <AdaptiveFact> factList = new List <AdaptiveFact>();

            if (!string.IsNullOrEmpty(ticket.TicketId))
            {
                factList.Add(new AdaptiveFact
                {
                    Title = Strings.TicketIDFact,
                    Value = ticket.TicketId.Substring(0, 8),
                });
            }

            factList.Add(new AdaptiveFact
            {
                Title = Strings.StatusFactTitle,
                Value = CardHelper.GetUserTicketDisplayStatus(this.ticket),
            });

            if (ticket.Status != (int)TicketState.UnAssigned)
            {
                factList.Add(new AdaptiveFact
                {
                    Title = Strings.ExpertFact,
                    Value = ticket.AssignedToName,
                });
            }

            if (!string.IsNullOrEmpty(ticket.Subject))
            {
                factList.Add(new AdaptiveFact
                {
                    Title = Strings.SubjectFact,
                    Value = ticket.Subject,
                });
            }

            factList.Add(new AdaptiveFact
            {
                Title = Strings.TitleFact,
                Value = CardHelper.TruncateStringIfLonger(this.ticket.Title, CardHelper.TitleMaxDisplayLength),
            });

            if (!string.IsNullOrEmpty(ticket.Description))
            {
                factList.Add(new AdaptiveFact
                {
                    Title = Strings.DescriptionFact,
                    Value = CardHelper.TruncateStringIfLonger(this.ticket.Description, CardHelper.DescriptionMaxDisplayLength),
                });
            }

            factList.Add(new AdaptiveFact
            {
                Title = Strings.DateCreatedDisplayFactTitle,
                Value = CardHelper.GetFormattedDateInUserTimeZone(this.ticket.DateCreated, activityLocalTimestamp),
            });
            if (ticket.Status == (int)TicketState.Pending && this.ticket.PendingComment != null)
            {
                factList.Add(new AdaptiveFact
                {
                    Title = Strings.CommentText,
                    Value = CardHelper.TruncateStringIfLonger(this.ticket.PendingComment, CardHelper.DescriptionMaxDisplayLength),
                });
            }

            if (ticket.Status == (int)TicketState.Resolved)
            {
                factList.Add(new AdaptiveFact
                {
                    Title = Strings.ClosedFactTitle,
                    Value = CardHelper.GetFormattedDateInUserTimeZone(this.ticket.DateClosed.Value, activityLocalTimestamp),
                });
                if (this.ticket.ResolveComment != null)
                {
                    factList.Add(new AdaptiveFact
                    {
                        Title = Strings.CommentText,
                        Value = CardHelper.TruncateStringIfLonger(this.ticket.ResolveComment, CardHelper.DescriptionMaxDisplayLength),
                    });
                }
            }

            return(factList);
        }
        /// <summary>
        /// This method will construct the card for SME team which will have the
        /// feedback details given by the user.
        /// </summary>
        /// <param name="data">User activity payload.</param>
        /// <param name="appBaseUri">The base URI where the app is hosted.</param>
        /// <returns>Sme facing feedback notification card.</returns>
        public static Attachment GetCard(FeedbackEntity data, string appBaseUri)
        {
            // Constructing adaptive card that is sent to SME team.
            AdaptiveCard smeFeedbackCard = new AdaptiveCard(new AdaptiveSchemaVersion(1, 0))
            {
                Body = new List <AdaptiveElement>
                {
                    new AdaptiveColumnSet
                    {
                        Columns = new List <AdaptiveColumn>
                        {
                            new AdaptiveColumn
                            {
                                Items = new List <AdaptiveElement>
                                {
                                    new AdaptiveImage
                                    {
                                        Style = AdaptiveImageStyle.Default,
                                        Size  = AdaptiveImageSize.Medium,
                                        Url   = new Uri(appBaseUri + "/content/feedback_channel.png"),
                                    },
                                },
                                Width = "auto",
                            },
                            new AdaptiveColumn
                            {
                                Items = new List <AdaptiveElement>
                                {
                                    new AdaptiveTextBlock()
                                    {
                                        Text   = Strings.SMEFeedbackHeaderText,
                                        Weight = AdaptiveTextWeight.Bolder,
                                        Wrap   = true,
                                    },
                                    new AdaptiveTextBlock()
                                    {
                                        Text     = string.Format(CultureInfo.InvariantCulture, Strings.FeedbackAlertText, data.UserName),
                                        Spacing  = AdaptiveSpacing.None,
                                        IsSubtle = true,
                                        Wrap     = true,
                                    },
                                },
                                Width = "stretch",
                            },
                        },
                    },
                    new AdaptiveTextBlock()
                    {
                        Text   = Strings.RatingTitle,
                        Weight = AdaptiveTextWeight.Bolder,
                        Wrap   = true,
                    },
                    new AdaptiveTextBlock()
                    {
                        Text    = GetRatingDisplayText(data?.Rating),
                        Spacing = AdaptiveSpacing.None,
                        Wrap    = true,
                    },
                },
                Actions = new List <AdaptiveAction>
                {
                    new AdaptiveOpenUrlAction
                    {
                        Title     = string.Format(CultureInfo.InvariantCulture, Strings.ChatTextButton, data.UserGivenName),
                        UrlString = $"https://teams.microsoft.com/l/chat/0/0?users={Uri.EscapeDataString(data.UserPrincipalName)}",
                    },
                },
            };

            // Description fact is available in the card only when user enters description text.
            if (!string.IsNullOrWhiteSpace(data.Subject))
            {
                smeFeedbackCard.Body.Insert(3, new AdaptiveTextBlock()
                {
                    Text   = Strings.SubjectFact,
                    Weight = AdaptiveTextWeight.Bolder,
                    Wrap   = true,
                });

                smeFeedbackCard.Body.Insert(4, new AdaptiveTextBlock()
                {
                    Text    = data.Subject,
                    Spacing = AdaptiveSpacing.None,
                    Wrap    = true,
                });
            }

            // Description fact is available in the card only when user enters description text.
            if (!string.IsNullOrWhiteSpace(data.Description))
            {
                smeFeedbackCard.Body.Add(new AdaptiveTextBlock()
                {
                    Text   = Strings.DescriptionText,
                    Weight = AdaptiveTextWeight.Bolder,
                    Wrap   = true,
                });

                smeFeedbackCard.Body.Add(new AdaptiveTextBlock()
                {
                    Text    = CardHelper.TruncateStringIfLonger(data.Description, CardHelper.DescriptionMaxDisplayLength),
                    Spacing = AdaptiveSpacing.None,
                    Wrap    = true,
                });
            }

            // Question asked fact and view article show card is available when feedback is on QnA Maker response.
            if (!string.IsNullOrWhiteSpace(data.KnowledgeBaseAnswer) && !string.IsNullOrWhiteSpace(data.UserQuestion))
            {
                smeFeedbackCard.Body.Add(new AdaptiveFactSet
                {
                    Facts = new List <AdaptiveFact>
                    {
                        new AdaptiveFact()
                        {
                            Title = Strings.QuestionAskedFactTitle,
                            Value = data.UserQuestion,
                        },
                    },
                });

                smeFeedbackCard.Actions.AddRange(new List <AdaptiveAction>
                {
                    new AdaptiveShowCardAction
                    {
                        Title = Strings.ViewArticleButtonText,
                        Card  = new AdaptiveCard(new AdaptiveSchemaVersion(1, 0))
                        {
                            Body = new List <AdaptiveElement>
                            {
                                new AdaptiveTextBlock
                                {
                                    Text = CardHelper.TruncateStringIfLonger(data.KnowledgeBaseAnswer, CardHelper.KnowledgeBaseAnswerMaxDisplayLength),
                                    Wrap = true,
                                },
                            },
                        },
                    },
                });
            }

            return(new Attachment
            {
                ContentType = AdaptiveCard.ContentType,
                Content = smeFeedbackCard,
            });
        }