After setting up the Questions in the Question Tab, Setting up a Contact form in Contact Tab, Setting up custom messages in the Text Tab, and configuring the Quiz in the Options Tab. Now we will have a look into setting up Emails of the Quiz Results in the Emails Tab.
You may need to send emails to the users once they are done submitting the quiz mentioning the answers they gave to the questions asked or the points they scored, the number of answers that were correct, or just let them know that they have submitted/ have appeared for the quiz.
Not, just to the user that just gave the quiz, the emails can also be sent the site admin with a number of details.
This is possible with the “Emails” tab in the Quiz and Survey Master plugin.
With the help of Template Variables, we can make a function run. We have a number of Variables that are predefined and they are set to perform a particular task once requested. You can find the Insert Template Variables button that floats at the bottom-right of your screen when you open the Emails Tab.
Once you click on the button, a new window pops up with all the Template Variables you are allowed to use in sending the Emails. With these variables, a task can be fired up when they are made to use.
Just click on the Variable you need and it will automatically get copied and you can then paste the code into the email text area. By default %QUESTIONS_ANSWERS_EMAIL% variable is set; you can customize it and add more variables as per your need to enhance the email experience.
You can add extra content if you need by using the template variables in the Email Body by mentioning the User Name, Quiz Name, Correct Score, Amount Correct, Points Scored, Average Category Points, Average Category Score, Category Points, Category Average Points and much more.
When you create a new Quiz/Survey; by default, it comes with two predefined email formats one mentioning the User Email and the other mentioning the Quiz Admin Email id in “Who to send the email to? Put %USER_EMAIL% to send to user” text field; an email is sent to the user (if you already have asked the user to enter their email before/after quiz submission by configuring the Contact Form in Contact Tab) and the admin with the questions and answers submitted by the user.
Add Additional Condition
We can add conditions on when the emails should be sent. For Example, let’s say you have set up a Quiz and you only need to send an email to the user whose score percentage lies between 35% – 50% while mentioning “You just made it, still needs improvement” and for those scoring between 50% – 70% mentioned “Well Done! You Can do better next time” and for those scoring above 70% mentioning “Awesome! You’ve Earned it“
To make this type of configuration you need to add a condition; move to the section where it says “When…Set conditions for when this email should be sent. Leave empty to set this as an email that is always sent“. And click on “Add Additional Condition”
From the first drop-down select “Correct Score Percentage” and from the second drop-down select “is greater than or equal to” in the next text box mention “35“, again click on “Add Additional Condition” for the second condition to be set from the first drop-down select “Correct Score Percentage” and from the second drop-down select “is less than or equal to” in the next text box mention “50“.
Perform the same steps for other Scores by adding a new Email Template by pressing the “Add New Email” button.
While using the Template Variables like %CATEGORY_POINTS_X%, %CATEGORY_SCORE_X%, %AVERAGE_CATEGORY_POINTS_X%, and %CONTACT_X% do not add ‘_’ in the category name. For Example, If You already created a category named “History Quiz” and you need Category Points then mention the variable as %CATEGORY_POINTS_History Quiz% without any “_” in between the category name.