FeedbackPRO

f10.dev
Search Results for

    Feedback Data

    FeedbackPRO architecture is based on two main pillars: Integrations and Data. This section will cover how to convert feedback forms into FeedbackData, and how to send it to configured integrations.

    Creating Data

    After the project collects user data (either using the included form, a custom form or anything and everything in-between) it needs to be funnelled into a new FeedbackData instance to be sent through an integration.

    FeedbackData includes many constructors to be extremely easy to use, but for more information on what types of data are allowed, check the Scripting API section.

    The following example converts hardcoded data into a FeedbackData object:

    var data = new FeedbackData("Title", "Summary");
    

    This simple data object will just contain the given title and summary, plus the exact date and time of when the data was generated.

    Though, normally feedback should contain a bit more information to help identify the user behind it, in what part of the game it was sent, etc. Using Data Extensions allows to include non-user driven data (system information, game status, etc.) into feedback reports:

    var data = new FeedbackData(
      "Title",
      "Summary",
      new IFeedbackDataSection[] {
        new AppInfoExtension(),
        new SystemInfoExtension(),
        new PlayTimeExtension()
      },
      new IFeedbackDataFile[] {
        new ScreenshotExtension()
      });
    

    Now, the data object not only contains user-driven information, like the title and summary, but also system information, app information, play time and even a screenshot of the game. For more information on included extensions and how to create custom extensions, check Data Extensions.

    The FeedbackData class is very flexible, and can contain all or none of this information while still being able to be understood by integrations without issues.

    Sending Data

    Now that we have all data stored inside a FeedbackData instance, we can send it to one or many integrations. For more information on integrations and general configuration refer to Configuration & Settings and Integrations.

    Sending data to active integrations is extremely easy:

    Feedback.Send(data);
    

    Calling this method will send the given data to all active and configured integrations. If multiple integrations are active, all of them will receive the same data in parallel.

    In more advanced scenarios, your project may require multiple feedback forms with different targeted integrations, or it may even change dynamically depending on the build type, or the game's progress. In these cases, instead of sending data to all active integrations by default, we may need to send data to a specific integration:

    Feedback.Send<ExampleConfig>(data);
    

    By defining the exact IFeedbackConfig type of the integration we want to send the data to (in this example, the "Example API" is used) we can isolate specific data to specific integrations. The targeted integration does not need to be active in settings, as long as it's correctly configured for the previous example to work.

    Note

    As a rule of thumb, if there is only a single feedback form in the entire project, and/or a single integration configured, using Feedback.Send() should be enough and easier to maintain. For any more advanced setups, Feedback.Send<T>() will allow for an unrestricted amount of forms and integration configurations.

    In This Article
    Back to top

    FeedbackPRO v1.0.2 rev 5

    Generated by DocFX