How to create a Typeform quiz to match users
Learn how to create a quiz in Typeform using Typeform custom variables that intelligently recommends quiz-takers users in your Tangram app.
At A Glance
- Create a new Typeform quiz for the questions you want to match users based on
- Assign Tangram input option_ids to Typeform custom variables for each potential answer in “Advanced Logic”
- Use “Branching & Calculations” in the “Logic” tab to add the option_id to the variable you just created.
- Redirect the Typeform on completion to your pre-filtered Tangram directory by passing the Typeform variables into the directory URL.
Step #1: Decided On Typeform Quiz Matching Questions
The first step of this Typeform quiz tutorial is to decide what questions you want to match users who fill out your Typeform quiz on. For example, a local services marketplace may want to match based on the questions “What type of service professional do you need? (e.g. plumber, electrician, cleaner, etc.)” and “What is your zip code?”. Once you have decided what questions will determine which users the quiz-taker will get recommended you can build your Typeform as shown below:
Step #2: Create a Typeform Variable for Each Matching Question
Now that you have built and designed your quiz in Typeform and decided which of the questions should determine the match you will need to create Typeform custom variables for each of the matching questions.
To create a variable in Typeform navigate to “Logic” > “Advanced Logic” > ”Variables” > “Add Custom Variable”.
For the question, “What type of service professional do you need?” I will create a variable for each potential answer and name it something clear like “@profession1” and "@profession2" and make sure that it is a “Number” type variable so we can pass in an option_id from Tangram in the next step.
You do NOT need to create a variable for each answer if you want the quiz-taker to only be able to select one answer to a given question. For example, in the case above if you want to force the quiz-taker to specify whether they want a carpenter OR an electrician (not both), then you only need to create a single variable called @profession for this question.
Note: If you only want the quiz-taker to select ONE option (not multiple) for a given question in Typeform make sure to have "multiple selection" toggled OFF.
You’ll want to create variable(s) for every matching question you decided on in step #1 (one variable for every potential answer selected).
Step #3: Assign Tangram Values To Each Typeform Variable
Now that you have Typeform custom variables for every matching question, you’ll need to update the value of the variable by adding the correct option_id to it depending on which answers the quiz-taker selects.
In your Tangram admin account you can find the option_id for each matching question answer by navigating to “Settings” > “Roles” > Select the role you are matching > “Inputs” > Select the input you are matching the question to
Search for the input option in Tangram that matches up with the question option in Typeform.
Add the Tangram option_id for the corresponding answer in Typeform in “Logic” > “Simple” > “Branching & Calculations”
Repeat the previous step to add the option_id value from Tangram into Typeform for every possible answer and hit “Save”. For single-select questions you will add the option_id to the same Typeform custom variable (e.g. @profession). For multiple-select questions you will add the option_id to different custom variables (e.g. @profession1, @profession2) as shown below:
If you want to filter by a service provider’s location with Typeform, the location question has to currently be a multiple choice question (not text input) due to a limitation on Typeform’s end. You can make the location multiple choice answers for cities, zip codes, neighborhoods, or exact addresses.
Once you have turned your location matching question into a multiple choice question you will need to replace the next category variable text with the text of each answer in “Logic” > “Simple” > “Branching & Calculations”. Click “Save”.
Step #4: Redirect Typeform Quiz To Tangram Directory On Completion
Once you have Typeform variables and values setup for all your matching questions and their answers you are ready to use them to redirect the quiz-taker to a pre-filtered version of the Tangram directory. To do so, you will need to set the “Redirect On Completion” link in your Typeform quiz settings to:
The example above treats the "What type of service professional do you need?" question as a single-select question (same with location). Currently you can only match on a single location (unless you treat location as a listing-level input in Tangram where listing creators manually tag their listings to belong to multiple locations).
The example above treats the "What type of service professional do you need?" question as a multiple-select question
Note: Location and ListingType are special fields that do not follow the category 1,2,3,etc pattern.
How to filter a directory based on whether a keyword is found anywhere on a user’s profile (not just if the user has it added as an input/tag):
You can also use the search bar in Tangram to pre-filter not just by the user’s inputs, but by whether or not keywords appear in the name of the user, bio, or anywhere on their profile. For example, if I search for “Carpenter” in the search bar of my Tangram user directory it will give me all the user accounts that have the keyword “Carpenter” anywhere on their profile (not just as an input/tag). See that Aarco Contracting does not have “Carpentry” added as an input/tag yet it still shows in the search page because it contains the keyword “Carpenter” in their bio.
To pre-filter the directory by a specific search/keyword like “Carpenter” you can tack on &search=carpenter to the end of your “Redirect On Completion” URL. If you want to search by multiple words in the search bar tack on &search=carpenter+nyc which will search for user profiles with both the keyword "carpenter" AND "nyc" anywhere in their profile.
If you would rather the search result in any user profile with either "carpenter" OR "nyc" anywhere in their profile tack on &search=carpenter|nyc