Feedback Workflow Component

A versatile interface for user communication, offering options to report issues, provide feedback, request features, or contact support, ensuring user engagement and problem-solving.

Component Visuals

To unlock early access to the component Get Access

In this video, you'll learn:

  1. How to set up the QuestProvider with your API credentials.

  2. Configuration of the Feedback Workflow component with required props.

  3. Customization options for the Feedback Workflowcomponent.

  4. Integration of the component into your React application.


Installation

To install the Quest react-sdk into your project, follow these steps:

  • Open your terminal/command prompt.

  • Navigate to your project's root directory using the cd command if you're not already there.

  • Run the following command to install the quest-sdk package using npm:

npm install @questlabs/react-sdk

This command will download and install the package and its dependencies into your project.

Make sure your project has npm and Node.js installed, and that you have the necessary permissions to install packages in your project directory.


Props of Feedback Workflow Component

The Feedback Workflow component accepts the following props

You can customize the UI with type of styleConfig would be

 styleConfig?: {
    Form?: React.CSSProperties;
    Heading?: React.CSSProperties;
    Description?: React.CSSProperties;
    Input?: React.CSSProperties;
    Label?: React.CSSProperties;
    TextArea?: React.CSSProperties;
    PrimaryButton?: React.CSSProperties;
    SecondaryButton?: React.CSSProperties;
    Modal?: React.CSSProperties;
    Footer?: React.CSSProperties;
    listHeading?: React.CSSProperties;
    listDescription?: React.CSSProperties;
    listHover?: {
      background?: string;
      iconBackground?: string;
      iconColor?: string;
      Heading?: string;
      Description?: string;
  }

Usage

To integrate the Feedback Workflow component into your React application, follow these steps

  • Import the Feedback Workflow Component: Import the Feedback Workflowcomponent from the @questlabs/react-sdk package.

  • Import the QuestProvider Component: Import the QuestProvider component from the @questlabs/react-sdk package.

import { QuestProvider }, FeedbackWorkflow from '@questlabs/react-sdk';
import '@questlabs/react-sdk/dist/style.css';
  • Pass the Required Props: Pass the required props to the QuestProvider. The required props are apiKey, apiSecret, and entityId. and required props for the Feedback Workflowcomponent are userId, questIds, and token

<QuestProvider
   apiKey="your api key"
   entityId="your entityid"
   featureFlags={{}}
   themeConfig={{
      primaryColor: '',
      secondaryColor: '',
      borderColor: '',
      buttonColor: '',
      backgroundColor: 'white',
      fontFamily: '',
   }}
   >
   <FeedbackWorkflow
      contactUrl="your contect link"
      isOpen={true}
      questIds={[
         'q-general-feedback',
         'q-report-a-bug',
         'q-request-a-feature',
         'q-contact-us',
      ]}
      userId="your user id"
      token="your jwt token"
      GeneralFeedback={{
         heading: 'General Feedback',
         description: 'Give general feedback on this page',
         formHeading: 'General Feedback',
         formDescription: 'Give general feedback on this page',
      }}
      ReportBug={{
         heading: 'Report a bug',
         description: "Let us know what's broken",
         formHeading: 'Report a bug',
         formDescription: 'Describe the bug'
      }}
      RequestFeature={{
         heading: 'Request a feature',
         description: 'Tell us how we can imporve',
         formHeading: 'Request a Feature',
         formDescription: 'Please share your feature'
      }}
      ContactUs={{
         heading: 'Contact us',
         description: 'Tell us how we can help',
      }}
      PrimaryButtonText = {"Submit"}
      SecondaryButtonText = {"Go to home!"}
      Headers={[{
        heading: "General Feedback",
        subHeading: "Welcome back, Please complete your details",
      },
      {
        heading: "Report a bug",
        subHeading: "Welcome back, Please complete your details",
      },
      {
        heading: "Request a feature",
        subHeading: "Welcome back, Please complete your details",
      },
      {
        heading: "Contact us",
        subHeading: "Welcome back, Please complete your details",
}]}
      styleConfig= {{
         Form: {},
         Heading: {},
         Description: {},
         Input: {},
         Label: {},
         TextArea: {},
         PrimaryButton: {},
         SecondaryButton: {},
         Modal: {},
         Topbar: {},
         Card: {},
         ThanksPopup: {
            Style: {},
            Heading: "",
            Description: "",
            ShowFooter: true,
            Icon: {}
         },
         Star: {
            Style: {},
            PrimaryColor: "",
            SecondaryColor: "",
            Size: ""
         },
         listHeading: {},
         listDescription: {},
         listHover: {
            background: "",
            iconBackground: "",
            iconColor: "",
            Heading: "",
            Description: "",
            IconSize: "",
            Icon: {}
         },
         Footer: {
            FooterStyle: {},
            FooterText: {},
            FooterIcon: {}
         }
      }}
      // showFooter={false}
      // enableVariation={false}
      // onClose={() => { }}
   />
</QuestProvider>


Replace "your-api-key", "your-api-secret", and "your-entity-id" with your actual Quest API credentials

Replace "your-token", "userid", "custom-questid" with your actual configuration details.


Example Usage

Here's an example of how to use the FeedbackWorkflow component within your React application

import { QuestProvider, FeedbackWorkflow } from '@questlabs/react-sdk';
import '@questlabs/react-sdk/dist/style.css';

function App() {
  return (
    <div>
      <QuestProvider
         apiKey="your api key"
         entityId="your entityid"
         featureFlags={{}}
         themeConfig={{
            primaryColor: '',
            secondaryColor: '',
            borderColor: '',
            buttonColor: '',
            backgroundColor: 'white',
            fontFamily: '',
         }}
         >
         <FeedbackWorkflow
            contactUrl="https://calendly.com/shubham-quest/chat"
            isOpen={true}
            questIds={[
               'q-general-feedback',
               'q-report-a-bug',
               'q-request-a-feature',
               'q-contact-us',
            ]}
            userId="your user id"
            token="your jwt token"
            GeneralFeedback={{
               heading: 'General Feedback',
               description: 'Give general feedback on this page',
               formHeading: 'General Feedback',
               formDescription: 'Give general feedback on this page',
            }}
            ReportBug={{
               heading: 'Report a bug',
               description: "Let us know what's broken",
               formHeading: 'Report a bug',
               formDescription: 'Describe the bug'
            }}
            RequestFeature={{
               heading: 'Request a feature',
               description: 'Tell us how we can imporve',
               formHeading: 'Request a Feature',
               formDescription: 'Please share your feature'
            }}
            ContactUs={{
               heading: 'Contact us',
               description: 'Tell us how we can help',
            }}
            PrimaryButtonText = {"Submit"}
            SecondaryButtonText = {"Go to home!"}
            Headers={[{
              heading: "General Feedback",
              subHeading: "Welcome back, Please complete your details",
            },
            {
              heading: "Report a bug",
              subHeading: "Welcome back, Please complete your details",
            },
            {
              heading: "Request a feature",
              subHeading: "Welcome back, Please complete your details",
            },
            {
              heading: "Contact us",
              subHeading: "Welcome back, Please complete your details",
         }]}
            styleConfig= {{
               Form: {},
               Heading: {},
               Description: {},
               Input: {},
               Label: {},
               TextArea: {},
               PrimaryButton: {},
               SecondaryButton: {},
               Modal: {},
               Topbar: {},
               Card: {},
               ThanksPopup: {
                  Style: {},
                  Heading: "",
                  Description: "",
                  ShowFooter: true,
                  Icon: {}
               },
               Star: {
                  Style: {},
                  PrimaryColor: "",
                  SecondaryColor: "",
                  Size: ""
               },
               listHeading: {},
               listDescription: {},
               listHover: {
                  background: "",
                  iconBackground: "",
                  iconColor: "",
                  Heading: "",
                  Description: "",
                  IconSize: "",
                  Icon: {}
               },
               Footer: {
                  FooterStyle: {},
                  FooterText: {},
                  FooterIcon: {}
               }
            }}
            // showFooter={false}
            // enableVariation={false}
            // onClose={() => { }}
         />
      </QuestProvider>



    </div>
  );
}

export default App;

The above example uses all the props.

Demo

In this video, you'll learn:

  1. How to set up the QuestProvider with your API credentials.

  2. Configuration of the Feedback Workflow component with required props.

  3. Customization options for the Feedback Workflowcomponent.

  4. Integration of the component into your React application.

Last updated