Skip to content

Data Stores

Avinash Roy edited this page Dec 30, 2022 · 5 revisions

The app uses the following data stores:

  1. Azure Storage Account

    • [Table] Storage for bot related configurations (welcome message, KbId, TeamId, and static tab text).
    • [Table] For tracking all of the requests and the necessary actions that impact a request - i.e. request is assigned to an expert.
    • [Table] For maintaining card conversation state which is used to refresh cards when edited or deleted.
    • [Blob] Storage for knowledge base QnA pairs with metadata information in JSON format.
  2. Azure Search service list item index, created and maintained by the Question Answering cognitive service.

All these resources are created in your Azure subscription. None are hosted directly by Microsoft.

Storage account

ConfigurationInfo Table

The ConfigurationInfo table stores data about the necessary configurations that are required for the bot. Each row in the table has the following columns:

Attribute Comment
KnowledgeBaseId This is the Project name for which the bot can return answers from the Question Answering service.
MSTeamId The team Id which the bot can be able to post messages whenever the end-user asks for an expert's assistance with a query.
StaticTabText The static tab text, would be the standard text that is displayed in the help tab which will be installed along with the bot in a personal scope. The static tab text will be configured by the configurator application, and is publically accessible with no authentication.
WelcomeMessage The welcome message is a configurable text that the bot would send to the end-user the very first time that end-user installs the bot in a personal scope.
LastModifiedByUPN The user principal name (UPN) of the Admin who modified the setting.
LastModifiedByObjectId The Azure Active Directory Object Id of the Admin who modified the setting.
LastModifiedOn The date/time on which the Admin modified the setting.

TicketInfo Table

The TicketInfo table stores data about tickets (or requests) that are posted to the expert team by the bot on behalf of end-user. Each row in the table has the following columns:

Attribute Comment
TicketId The ticket ID.
Status An integer value.
Title The title provided by the end-user.
DateCreated The date when a new ticket is created.
Description The description text that is written by the end-user.
RequesterName The name of the end-user when a new ticket is created.
RequesterUserPrincipalName The email address of the end-user.
RequesterGivenName The first name of the end-user
RequesterConversationId The conversationId of the 1:1 chat between the end-user and the FAQPlus bot.
SmeCardActivityId The activityId when the new ticket adaptive card is posted in the General channel of the experts team.
SmeThreadConversationId The conversationId in the experts team General channel at the time a new ticket is created.
DateAssigned The date when a expert self-assigns a ticket.
AssignedToName The name of the expert who self-assigns a ticket.
AssignedToObjectId The AAD Object ID of the expert who self-assigns a ticket.
DateClosed The date when a ticket is updated to the closed status.
LastModifiedByName The name of the expert who recently updated the ticket.
LastModifiedByObjectId The AAD Object ID of the expert who recently updated the ticket.
LastModifiedOn The date/time on which the expert has updated the ticket.
UserQuestion The original question that has been asked by the end-user.
KbEntryAnswer The answer that is stored in the knowledge base.

ActivityEntity Table

The ActivityEntity table is used to maintain card state which is further used to refresh cards when edited or deleted. Each row in the table has the following columns:

Attribute Comment
TimeStamp The date and time when the card gets posted.
ActivityID The ID of the card that gets posted in the channel when the question is added for the first time.

Blob Storage

The Blob Storage stores knowledge base with QnA and metadata in JSON format. The same JSON is used by messaging extension search results for knowledge base tab.

[ 
   { 
      "id":"<<Id of QnA pair generated by knowledge base.>>",
      "answer":"<<Answer text added/updated by user.>>",
      "source":"Bot",
      "questions":[ 
         "<<Question text added/updated by user.>>"
      ],
      "metadata": { 
            "createdby""<<AAD Object Id>>",
            "conversationid""<<Conversation Id>>",
            "updatedby""<<AAD Object Id>>",
         },
      "createddate":"<<Question creation date.>>",
      "updateddate":"<<Question or answer updation date.>>"
   }
]