calcom / cal.com

Scheduling infrastructure for absolutely everyone.
https://cal.com
Other
29.82k stars 6.99k forks source link

Conditional Questions on Event Types #11900

Open moilejter opened 8 months ago

moilejter commented 8 months ago

Is your proposal related to a problem?

We would like to have the ability to ask "follow-up questions" based on the answers to previous questions in the booking request. For example, we could have a mandatory question that asks "how did you hear about us?" with possible answers "web", "print", "social media", "personal reference" - and If they choose "web", we'd like to ask "source web site" (a text field), or if they choose "social media", we'd like to ask "social media site" (a drop down with entries for X/tweeter, Mastodon, Facebook, other).

Describe the solution you'd like

Add an option question type, which in addition to the existing question template, asks for the parent question identifier, and a value (or a list of values) that would make this question appear below the parent question.

Describe alternatives you've considered

We haven't come up with an alternative we liked.

Additional context

Did not find this already suggested in either "Issues" or "Pull Requests"

Requirement/Document

We haven't written one up.

github-actions[bot] commented 8 months ago

Thank you for opening your first issue, one of our team members will review it as soon as it possible. ❤️🎉

hubsMIT1 commented 8 months ago

After reviewing, if this feature is needed, please assign it to me, and I will work on it.

partik03 commented 8 months ago

can I take up this one?

jimjoice2804 commented 8 months ago

could you give a little more detail please, thank you

LalitDeore commented 8 months ago

Hey, have you assigned this task to anyone? If not, then I would like to go with this task. Let me give you some details about how I can create this feature. Basically, you want to create the feature of a follow-up question based on the previous question. we can create context for each question; if the user clicks on any of the questions, we can show them a specific list of questions, and so on.

moilejter commented 8 months ago

Just so I know how this works - I am assuming that we have to wait for someone senior to approve this ticket, and then they would assign it to someone to work on? (I've gotten these notices - see above - about people who'd like to work on this, bu I figured it wouldn't be my place to ask anyone to work on this, right?)

LalitDeore commented 8 months ago

Ok, I am new to open source, and I thought you were someone who was managing this repository and raising this issue. That's why I asked you to work on this. Thanks for clearing.

v-a14 commented 8 months ago

Hi, is there any update on this issue ?

mkos11 commented 7 months ago

Proposed Solution:

Introduce a new question type, referred to as "Conditional Question," to the booking request form. This question type would have the following attributes:

  1. Parent Question Identifier:

    • A field where the form creator can specify the identifier of the parent question. This identifier links the conditional question to its parent question.
  2. Trigger Values:

    • A field or set of fields where the form creator can define the trigger values that, when selected in the parent question, activate the conditional question.
  3. Question Template:

    • Similar to existing question types, this field allows the form creator to set the text or prompt for the conditional question.
  4. Question Type:

    • Various question types (text field, drop-down, radio buttons, etc.) that can be selected for the conditional question.

Example Scenario:

  1. Parent Question:

    • "How did you hear about us?"
      • Options: "web," "print," "social media," "personal reference"
  2. Conditional Question 1:

    • Type: Conditional Question
    • Parent Question Identifier: [Identifier of "How did you hear about us?"]
    • Trigger Values: "web"
    • Question Template: "Source web site"
    • Question Type: Text field
  3. Conditional Question 2:

    • Type: Conditional Question
    • Parent Question Identifier: [Identifier of "How did you hear about us?"]
    • Trigger Values: "social media"
    • Question Template: "Social media site"
    • Question Type: Drop-down with options for X/tweeter, Mastodon, Facebook, other

This way, when a user selects "web" in the "How did you hear about us?" question, the "Source web site" question appears dynamically. Similarly, if they choose "social media," the "Social media site" question becomes visible.

Implementation Considerations:

  1. User Interface:

    • Ensure a user-friendly interface that allows form creators to easily set up conditional questions during the form creation process.
  2. Validation:

    • Implement proper validation to handle cases where conditional questions may depend on multiple trigger values or complex conditions.
  3. Flexibility:

    • Design the feature to be flexible, accommodating various question types for both parent and conditional questions.
  4. Backend Logic:

    • Develop the backend logic to dynamically render and process conditional questions based on user responses to parent questions.

By introducing this "Conditional Question" feature, the booking request form gains enhanced flexibility, enabling more personalized and context-aware data collection.

Adarshjain1338 commented 5 months ago

Hi, Is this issue is approved ? and if yes, Is it assigned to anyone ?

ahsanfarooq210 commented 3 months ago

I would like to work on this issue. please assign it to me

Maazchogle commented 3 months ago

Proposed Solution:

                        AI-Driven Conditional Question Generation with Reinforcement Learning

1 Intent Recognition using NLP :

2 Reinforcement Learning (RL) Agent :

3 State Representation :

4 Action Space :

5 Reward Function :

6 Training Process :

7 Dynamic Question Generation:

8 User Feedback Loop :

Benefits of RL-Based Approach :

Example :

Cal.com Event Registration Form :

Parent Question: How did you discover our upcoming event?

1 User Response: Via Email Newsletter

2 User Response: "Through Social Media Ads"

3 User Response: "Word of Mouth"

4 User Response: "Website Banner"

5 User Response: "Event Listing on Community Forum"

Conclusion: Offering a smooth and customized user experience building an intelligent system that dynamically produces conditional questions by integrating reinforcement learning.

tanyasnu09 commented 2 months ago

For this do we have to suggest through a writeup or a proper code should be posted here?

keithwillcode commented 2 weeks ago

@tanyasnu09 Feel free to submit a PR and we'll review!