Dynamic Form & Acceptance Criteria Hack for Zoho Creator
Estimated reading time: 1 hour
Estimated implementation time: 4 hours
Cool Ideas to use the Code
Suppose you’re dealing with a Creator Form that has complex requirements and acceptance criteria. On top of that, these requirements and criteria are subjected to periodic changes. To constantly hard-code these things into the script can be both tedious and unscalable.
This workaround establishes a dynamic link between Creator and CRM allowing users to simply set the criteria they desire on a record in a CRM custom module with 0 coding knowledge needed.
Fasten your seatbelts cause this will be a long ride.
To aid the illustration, we’re going to use a case study. Imagine you’re running a school for online courses where you have a Creator Form set up for enrollment. For every course, there is a standard set of questions as well as a few unique ones. Upon submission of the form, you want to either accept or reject the applicants based on unique criteria that are unique to each course.
Before we dive into the configuration and codes, let’s go through the breakdown of the idea.
First, we’re going to create a custom module in CRM. Then, we’ll create records in the module for each Course Type in which the questions and acceptance criteria will be configured via custom fields that mirror certain questions in the Creator Form.
Next, we’ll write an “on user input” script on Creator to dynamically populate picklist values for certain question fields from the CRM configuration based on selected Course Type. A “Submission” script will be written to fetch the acceptance criteria set in CRM, and execute the acceptance/rejection actions.
“Qualification Criteria” Module
Create a new module called “Qualification Criteria”, and in there, create records for each Course Type that you have.
“Course Type” Custom Field
This field will be used as a trigger to load certain course-specific picklist values on Creator, as well as for referencing the right course acceptance criteria.
Other Custom Fields
Create custom fields in CRM for each question in your Creator Form that is part of your acceptance criteria. These custom fields can be divided to three types:
- Yes/No Questions
- Multi-Select Questions
- Unique Qualifiers
Use a picklist field for this and set the options as “Yes”, “No” and “N/A”. The value that you set here will be referenced by the Creator script as the acceptance criteria. If this question is not applicable to the Course Type, select “N/A” for the value.
Multi-select is used for questions with multiple selections where as long as the applicant selects one of the required answers, he/she is accepted
- For example, in your online Management Course, you only want to accept applicants with management qualification in their current jobs. If the applicant selects “Manager”, “Director” or “Supervisor”, he/she is good to go. Anything else results in rejection.
This allows you to dynamically populate picklist values in Creator from CRM as well as set a more customizable acceptance criteria. It should be an entire section on the record with a parent field (where the criteria filter kicks in), followed by a few child fields (for dynamic picklist population).
Here, users can determine whether applicants are required to select All/ Any 1/ Any 2/ Any 3/ None of the child field values to be accepted. If it is “N/A”, the script will bypass this qualification criteria.
These fields will later be programmed to populate the picklist values on the Creator Form. In the example below, if the applicant select “Any 1” of the “Applicable to Me” child fields, they will be accepted to the course. The beauty of this is that, if the criteria/value needs to be changed at any point of time, anyone can do it by simply reconfiguring the fields.
Note: “TAG” is used here to add tags on the applicant records later based on value(s) input on Creator to assist sorting.
BONUS: Partner Field
This is arbitrary and may not be necessary for most but here it is in case you ever need it. The idea of a “Partner Field” is to account for situations where the standard acceptance criteria does not apply. For example, your school is working with several organizations that direct applicants to you . For these applicants, you would want to have a different set of criteria, or perhaps have some of them waived.
To account for these special cases, you can create separate records for the Course Type for specific Partners. For example, you have the general “Zoho Master Class” record that applies to all. Now, you can create a few customized records labelled “Zoho Master Class (Organization Name)” with the Partner Field filled with the Organization Name. In these records, you can have custom configurations set for different organizations.
Note: For this config, “Organization Name” should be a field on the Creator Form for applicants to input
Suggestion: You can even create a participation code field where students could obtain from the organizations. Upon input of the code, the “Organization Name” will be auto-populated as a hidden field.
Want to learn even more? Sign up for one of our Zoho courses!
Here’s where the magic happens!
Disclaimer: the script extracts below are made based on the case study. Please change the API names/modify the structure according to your application accordingly.
Dynamic Picklist Script
Create a workflow on Creator with “user input of a field” as the trigger.
On input of the Course Type, the script searches for the “Qualification Criteria” record on CRM based on the Course Type input in the Creator Form. It then iterates through all the “Applicable To Me” fields and populates the picklist values on Creator if the value is not null.
Some string manipulation is used within the loop to separate the values and the “tags” which are then used to create a map of “value : tags” stored in a hidden field called “TagInfo” on Creator (you can use to add tags later during submission).
Acceptance Criteria Script
Create another workflow on Creator with “successful form submission” as the trigger.
Find the Qualification Criteria record
Based on the Course Type selected, the script will find the Qualification Criteria record in CRM and check if it’s a general criteria or a custom organization criteria (this is done by matching the “Organization Name” field on Creator and the “Partner” field on CRM.
Set the Counters
- Before parsing through the criteria, the default value of the result is set as “Accepted”. At any point of time when an applicant selects the “wrong” answer, the result variable will be changed to “Rejected”. If the applicant goes through all the criteria and passes, the result variable will remain “Accepted”.
- Variable reason and reason_admin are used to build the fail message for the reference of both the applicants (via email) and the CRM users (via Notes in the Contact record) respectively.
Yes/No Field Criteria
If the Creator Form input to the question is not equivalent to the value selected in CRM, it will result in the applicant getting rejected. The reason for rejection is recorded in the respective variables.
Multi-Select Field Criteria
If the option(s) that the applicant select is/are not in the CRM multi-select field, it will result in rejection.
Unique Qualification Criteria
This script accounts for every possible criteria the user may have set in CRM (All, Any 1/2/3, None, Any, N/A). Applicants will be rejected if they do not meet the criteria set.
After iterating through all the criteria, you now have the final verdict of the application (pass/fail). From here, you can set the necessary acceptance/rejection actions.
More Free Resources
Learn to create a customized inventory report with Zoho Analytics. This tutorial contains a link to our GitHub page for SQL code that will help with your table creations.
Whether you work primarily out of CRM or the Zoho Finance Suite, you can use Analytics to build commissions dashboards. This involves some fairly simple SQL code.