Support/FeedbackSystem2PRD

From MozillaWiki
Jump to: navigation, search

Feedback is the new name for the system formerly known as CSAT.

We are reimplementing the feedback system in Django, with some changes to functionality. This document should be read in conjunction with the original CSAT specification

Definitions

  • A support item is either a wiki article, a forum thread, or a live chat session.

Requirements

Question configuration

  • Feedback questions should be configured globally, that is, each support item will serve the same set of feedback questions
  • Feedback questions may be overriden for an individual support item
  • Overridden feedback questions should be easily able to be reset to the global questions ("reset defaults")

Question types

  • The system should support the following question types:
    • Yes/No
    • Rate on 1 - 5 scale
    • Free text

Question nesting

  • Questions should be able to be nested (e.g. if answer to Q1 is 'Yes' show Q2). Only one level of nesting is required.
    • Example: "Was this information helpful? [Yes/No]" -> IF Yes, THEN -> "Rate your experience [1-5]" AND "Any other feedback? [Text]"

Feedback for wiki articles

  • Questions should be shown at the bottom of a wiki article, as they are presently.
  • Questions should be shown to all users.
  • Initial global questions should be as they are at present.

Feedback for forum threads

  • The forums are currently [under redesign]
  • Forum threads can presently be marked as solved, and users are then presented with feedback form.
  • Open questions:
    • Should the proposed upvote/downvote mechanism be part of the feedback system?
    • What about comments on threads? How do we distinguish between commenting on thread quality and providing feedback for other users to see (e.g. caveats such as "this solution will only work on Windows")?

Feedback for live chat

Not sure how this currently works. Do we need Java work to integrate with Kitsune?

Reporting

Currently reported as part of metrics - what is needed here?

Implementation notes

Questions

In order to serve feedback questionnaires from Django, we will serve them:

  • on wiki pages and forum threads, in an iframe
  • if serving questions after a live chat, it can be an independent page (since this is new functionality)

Database Schema

Old TikiWiki schema

We subverted the TikiWiki poll mechanism to implement feedback. The existing data and schema is as follows.

mysql> describe tiki_polls;
+-----------------------+--------------+------+-----+---------+----------------+
| Field                 | Type         | Null | Key | Default | Extra          |
+-----------------------+--------------+------+-----+---------+----------------+
| pollId                | int(8)       |      | PRI | NULL    | auto_increment |
| title                 | varchar(200) | YES  |     | NULL    |                |
| votes                 | int(8)       | YES  |     | NULL    |                |
| active                | char(1)      | YES  |     | NULL    |                |
| publishDate           | int(14)      | YES  |     | NULL    |                |
| voteConsiderationSpan | int(4)       |      |     | 60      |                |
| pollQuestionId        | int(8)       |      |     | 0       |                |
| is_feedback           | tinyint(2)   |      |     | 0       |                |
+-----------------------+--------------+------+-----+---------+----------------+

If is_feedback is set to 1, then this is a feedback question.

mysql> describe tiki_poll_questions; 
+-------------------+--------------+------+-----+---------+----------------+
| Field             | Type         | Null | Key | Default | Extra          |
+-------------------+--------------+------+-----+---------+----------------+
| pollQuestionId    | int(8)       |      | PRI | NULL    | auto_increment |
| pollQuestionName  | varchar(200) | YES  |     | NULL    |                |
| pollQuestionTitle | varchar(200) | YES  |     | NULL    |                |
| position          | int(4)       |      |     | 0       |                |
| layoutType        | char(1)      | YES  |     |         |                |
+-------------------+--------------+------+-----+---------+----------------+

Each tuple represents a question, e.g.:

mysql> select * from tiki_poll_questions;        
 
+----------------+-------------------------+-------------------------------------------------------------------------------------------------------------------------------+----------+------------+
| pollQuestionId | pollQuestionName        | pollQuestionTitle                                                                                                             | position | layoutType |
+----------------+-------------------------+-------------------------------------------------------------------------------------------------------------------------------+----------+------------+
|              1 | kb_solve_or_not         | Did this article solve a problem you had with Firefox?                                                                        |       10 | b          |
|              2 | kb_easy_to_understand   | Was this article easy to understand?                                                                                          |       20 | b          |
|              3 | kb_ease_of_solving      | Please rate your experience with solving your problem on support.mozilla.com from 1 (very unsatisfied) to 5 (very satisfied). |        5 | r          |
|              4 | chat_solve_or_not       | Did this live chat session solve a problem you had with Firefox?                                                              |       10 | b          |
|              5 | chat_problem_not_solved | Why were you unable to resolve your problem?                                                                                  |        5 | r          |
+----------------+-------------------------+-------------------------------------------------------------------------------------------------------------------------------+----------+------------+

tiki_poll_objects linked polls to items within TikiWiki:

mysql> describe tiki_poll_objects;
+-------------+--------------+------+-----+---------+-------+
| Field       | Type         | Null | Key | Default | Extra |
+-------------+--------------+------+-----+---------+-------+
| catObjectId | int(11)      |      | PRI | 0       |       |
| pollId      | int(11)      |      | PRI | 0       |       |
| title       | varchar(255) | YES  |     | NULL    |       |
+-------------+--------------+------+-----+---------+-------+

tiki_poll_options gave possible question answers:

mysql> describe tiki_poll_options;
+----------+--------------+------+-----+---------+----------------+
| Field    | Type         | Null | Key | Default | Extra          |
+----------+--------------+------+-----+---------+----------------+
| pollId   | int(8)       |      | MUL | 0       |                |
| optionId | int(8)       |      | PRI | NULL    | auto_increment |
| title    | varchar(200) | YES  |     | NULL    |                |
| position | int(4)       |      |     | 0       |                |
| votes    | int(8)       | YES  |     | NULL    |                |
+----------+--------------+------+-----+---------+----------------+

Finally, tiki_poll_votes recorded responses: mysql> describe tiki_poll_votes;

+-----------+---------+------+-----+------------+-------+
| Field     | Type    | Null | Key | Default    | Extra |
+-----------+---------+------+-----+------------+-------+
| optionId  | int(8)  |      | PRI | 0          |       |
| voteDate  | date    |      | PRI | 0000-00-00 |       |
| voteCount | int(10) |      |     | 0          |       |
+-----------+---------+------+-----+------------+-------+

New schema

The basic schema above works reasonably well, so we can base what we will do on these. We will need:

  • new tables outside the tiki structure, for cleanliness
  • question type field should probably be an enum (tiki_poll_question.layout_type)
  • questions need two extra fields: depends_on_question (FK to question id) and depends_on_option (FK to option id)
  • as few fields as possible should be nullable