Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

RFC: Routing Forms #2781

Closed
hariombalhara opened this issue May 17, 2022 · 6 comments · Fixed by #2785
Closed

RFC: Routing Forms #2781

hariombalhara opened this issue May 17, 2022 · 6 comments · Fixed by #2785

Comments

@hariombalhara
Copy link
Member

hariombalhara commented May 17, 2022

Routing Forms

Demo of a Possible Flow

Why?

It would allow a booker to connect with the right person or choose the right event, faster. It would work by taking inputs from the booker and using that data to route to the correct booker/event as configured by Cal user

Types of Routing

  • Route to particular Cal Link.
  • Route to booking with a particular member of a team event that's the best match. It can be like a new addition to Scheduling Type options (Collective, Round Robin). Not a great idea.
  • Route to external URL e.g. if requirements for a meeting don’t meet
  • Route to a Page with a custom message

What all might be part of it

  • Support in both embed and direct Cal link.
  • Enrich using the data directly provided by the user or any plugin(e.g. in embed there can be a plugin that can use the data available to the website about the user) and then use the data to make routing decision.
  • Duplicate a Routing Form, to quickly build over previous routing and form
  • Export Results as there would be more data that can be useful for the organizer to learn about the booker before the meeting, this is important.
  • Questions can be marked required/optional
  • Do we use the private URL for it or make it work directly with the public Cal Link ?
  • It can allow the user to choose the route to a different next question based on previous answers
    • Software Engineer →Go to Question(To Learn Programming Language) → C++(answered) -> Book a meeting with a C++ Expert
    • Designer → Go to Question(Learn which Design tool) → Answered(Figma) -> Book meeting with a Figma expert

Type of Questions

- Short Text 
	- Operators
		- includes
		- not includes
		- ....
	  - Types of Validations and Inputs
		  - Phone
		  - Email
		  - min,max characters
  
  - Long Text
	  - Validation
		  - 	min,max characters
	  - Operators
		  - includes
		  - not includes
		  - ....
  - Radio 
	  - Operators
    	  - is 
    	  - is not
    	  - .....
  - Single Select
	  - Operators
		  - is 
		  - is not
    	  - .....
  - Multi Select
	  - Operators 	
		  - any of
		  - none of
		  - all of
    	  - .....
  - Checkbox
	  - Operators 	
		    - any of
		    - none of
		    - all of
       	    - .....

Useful Open Source Projects

  • A query builder that can export to JSON Logic https://github.com/ukrbublik/react-awesome-query-builder

    • Pros
      • Provides Drag and Drop of conditions
      • Many operators are supported based on data type
      • Grouping Support Group1 = A || B; Group2=C || D and Group1 && Group2
      • Declarative UI builder
      • Automation Tests
      • Exports to JSON logic
      • Can allow complex logic to be written and just copy pasted
    • Cons
      • Would need to work on UI.
      • Doesn't use tailwind.
      • Might not be actively maintained. We can just fork from it
      • Automation tests in Karma. A different framework.
  • JSON logic JS - Can evaluate JSON logic to true/false https://github.com/jwadhams/json-logic-js#readme

@zomars
Copy link
Member

zomars commented May 17, 2022

Should this live as an App in the App Store? I see this for very advanced users.

@PeerRich
Copy link
Member

great RFC!

@PeerRich
Copy link
Member

Should this live as an App in the App Store? I see this for very advanced users.

yes this should be an "Advanced Routing" app

@PeerRich
Copy link
Member

btw. I think we should offer this feature both with a simple UI and headless via API only. we could easily just provide the logic and then pass parameters into the URL to get the correct person for the booking

@PeerRich
Copy link
Member

because I imagine most people want to "bring their own form" and we're likely doing less of a good job with the form builder than other products that focus 100% on form building

@hariombalhara
Copy link
Member Author

hariombalhara commented May 18, 2022

because I imagine most people want to "bring their own form" and we're likely doing less of a good job with the form builder than other products that focus 100% on form building

@PeerRich Headless can be in the following 2 ways. I believe both of them makes sense.

  • User would post the form data to an HTTP endpoint and in turn, we would respond with a redirect that should happen. User still has an option to do something in between(update some UI e.g.) and then redirect to the URL provided.
  • User has a form on his website and Cal Link is also embedded. When a website visitor, fills up the form provided by website, the user would fire a new Embed API that would do the routing(using the above HTTP API endpoint itself) and open the link in embed. If it is an external link, it would open up in the top instead of embed(with an option to open in new tab)

@ciaranha ciaranha linked a pull request May 18, 2022 that will close this issue
1 task
@calcom calcom locked and limited conversation to collaborators Jul 10, 2022
@PeerRich PeerRich converted this issue into discussion #3291 Jul 10, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants