Tip 28 : How to auto-assign profiles to portal users

Tip 28 : How to auto-assign profiles to portal users

Hello everyone! 

This tip will talk about our most popular feature—Customer Portals and how you can auto-assign profiles to your portal users.

But before we deep dive into this tip, let's run through some basics:

About Customer Portals

Portals are web pages or applications that serve as gateways designed to provide customers, vendors, and partners with a single point of access to a company's products, services, and knowledge base. 

Portal users are people external to an organization—customers, vendors, business partners, and others—who need to be given access to the organization's applications (like the aforementioned products, services, and knowledge base).

To help you understand this tip better, let's take a scenario from a college.

In the last decade, the education sector has witnessed a massive technological transformation that impacted the teaching-learning process, and changed student's lives. Today, parents are more involved than ever before in their child's academics, and would like to actively track their progress. They prefer real-time information and updates over conventional methods of quarterly grade sheets and parent-teacher conferences.

With the Customer Portal feature in Zoho Creator, one can easily set up standard portals for students, teachers, and parents and assign permissions to automatically let them view a specific set of data based on the user role. In that way, they can log in into their individual profiles and see data relevant to them. 

For example, let’s take a simple scenario where we need to enable parents to check their children's performance throughout the academic year via portal published by the institution. 

Steps:

  1. Create a Student Information form to collect details for the students.
  2. Create a Course form for the academic year.
  3. Create a Student Marks form to record the marks of students.
  4. Create a page called Dashboard for parents to view the student's overall performance for the academic year.
  5. Create a portal Sign-In form where one can log in their credentials to view a student's performance.

Step 1: Create a Student Information form to collect student details.

We'll need the following fields: 

  • Student Name (Name)
  • Student Email (Email )
  • Phone Number (Phone)
  • Date Of Birth (Date)
  • Department (Drop Down)
  • Roll Number (Single Line)




Step 2: Create a Subject form for the academic year.

We'll need the following fields: 
  • Academic Year (Drop Down)
  • Course Name (Single Line)





Step 3: Create a Student Marks form.

We'll need the following fields: 
  • Name of Student (Lookup from Student form )
  • Roll Number (Single Line)
  • Academic Year (Drop Down)
  • Course Name (Drop Down)
  • Marks (Number)




Now let's take a look at how to set up the workflow for the Student Marks form.

1. As we need to validate the course based on the academic year, we need to write a workflow in the On User Input action to auto populate the list of course names for the respective year/semester. Please refer to the below script:

  1. fet = Subjects_for_Academic_Year[Academic_Year == input.Academic_year].Course_Name.getAll();
  2. input.Course_Name:ui.add(fet);

2. Create another workflow to auto populate the roll number when the name of the person is selected from the form:

  1. fet = Student_Information[ID == input.Name_of_the_Student];
  2. input.Roll_Number = fet.Roll_Number;
  3. disable Roll_Number;





3. Create a dashboard to view the student's overall performance for the academic year.

Below are the components used while creating the page (dashboard):

HTML snippets to display the student's basic information
Panels to show the Marks report for the different academic years
A
button to exit from the profile




Here's the HTML code that you need to use to display the student's information based on their login.

HTML snippet to display the student's basic information:

  1. <%{  fet=Student_Information[Email=zoho.loginuserid];
  2. %>
  3. <html>
  4. <head>
  5. <style>
  6. h1 {text-align: center;}
  7. </style>
  8. </head>
  9. <body>
  10. <h1>Name | <%=fet.Student_Name%></h1>
  11. <h1>Department | <%=fet.Department%></h1>
  12. <h1>Roll Number | <%=fet.Roll_Number%></h1>
  13. </body>
  14. </html>
  15. <%
  16. }%>

2. Three panels to show the marks obtained by students for the respective year/semester:



3. A button that parents can use to exit from the student's performance dashboard.

We can us the function below for our button. This function will set back the logged-in portal user's permission to "Get Started" so that they'll be navigated to the login form page again.


  1. void Log_out()
  2. {
  3.      emailList = thisapp.portal.loginUserProfile();
  4.      if(emailList == "Student")
  5.         {
  6.        x = thisapp.portal.assignUserInProfile(zoho.loginuserid,"Get Started");
  7.         }
  8. }

So once we're all set, we need to create a Self Portal Sign-In form to see the student's performance by entering their login information.

Please Note: The Self Portal Sign-In form can be a stateless form here, because stateless forms provide a way to navigate or change the permission set without storing the login information for all the portal users who log in to their portal every time. This will avoid consuming unwanted data.

Step 5: Create a Self Portal Sign-In form to show the student's performance after entering their credentials.

Form fields:
  • Enter Your Registration Number (Single Line)
  • Date of Birth (Date field)





Now, we need to create a validation workflow to change the profile if the entered information matches the existing student data. The workflow has to be set in On Submit of the stateless form's button.

  1. fet = Student_Information[Roll_Number == input.Register_Number && Date_of_Birth == input.Date_of_Birth];
  2. if(fet.count() > 0)
  3. {
  4. x=thisapp.portal.assignUserInProfile(zoho.loginuserid,"Student");
  5. openUrl(<Portal/app URL>,"new window");
  6. }
  7. else
  8. {
  9. alert "Please enter the valid details";
  10. }

Customer portal settings

Now, let's modify or set the permissions using the customer portal settings:

As the college cannot set permissions for each individual student in the college, we're initially setting each student's permission as "Get Started". This way, when the portal user is added, the default permission will be "Get Started", which will have access only to the form Self Login. Using Self Login, students and parents can enter their child's credentials to change the permission set based on the credentials we validated under On Button Click of the form.

1. Get Started - Set this up as the default permission when adding a new portal user in the application. Here, we can only give access to the form Self Login so that when the student/parents log in for the first time, they can see only the Self Login form.




2. Student - In this permission set, we can give access to the view Student Mark Details and the Student Performance dashboard to view the marks of the respective student for each academic year.



Please Note : We can set filters for the report All Student Mark Details based on the logged in user's email address, to make sure the portal students can view only their respective academic marks.




Now, let's add a student as a portal user.

1. Here's what it looks like when a student is added into the customer portal for the first time.




2. When the portal users accept the invitation and log in to the application, they'll be directed to the Self Login form where they'll need to enter their login details.






3. Once the student details are entered, the On Click workflow of the Self Login form triggers and changes the portal permission from Get Started to Student, and will display the relevant data in the dashboard where students and parents can see the related data for the academic year.



4. Once the Exit button is clicked, the permission for the respective student will again change from Student to Get Started, and will display the Self Login form. This action is triggered, as we are calling the function in the button action.

And there you have it!

We hope this tip is useful for you. If you have any questions, please add them as comments below and we'll be happy to assist you. 

Also, if you'd like us to write a tip on anything specific for the customer portal, please let us know. We'd be happy to handle it in upcoming tips!


    Access your files securely from anywhere


            Zoho Developer Community




                                      Zoho Desk Resources

                                      • Desk Community Learning Series


                                      • Digest


                                      • Functions


                                      • Meetups


                                      • Kbase


                                      • Resources


                                      • Glossary


                                      • Desk Marketplace


                                      • MVP Corner


                                      • Word of the Day



                                          Zoho Marketing Automation


                                                  Manage your brands on social media



                                                        Zoho TeamInbox Resources

                                                          Zoho DataPrep Resources



                                                            Zoho CRM Plus Resources

                                                              Zoho Books Resources


                                                                Zoho Subscriptions Resources

                                                                  Zoho Projects Resources


                                                                    Zoho Sprints Resources


                                                                      Qntrl Resources


                                                                        Zoho Creator Resources



                                                                            Zoho CRM Resources

                                                                            • CRM Community Learning Series

                                                                              CRM Community Learning Series


                                                                            • Kaizen

                                                                              Kaizen

                                                                            • Functions

                                                                              Functions

                                                                            • Meetups

                                                                              Meetups

                                                                            • Kbase

                                                                              Kbase

                                                                            • Resources

                                                                              Resources

                                                                            • Digest

                                                                              Digest

                                                                            • CRM Marketplace

                                                                              CRM Marketplace

                                                                            • MVP Corner

                                                                              MVP Corner





                                                                                Design. Discuss. Deliver.

                                                                                Create visually engaging stories with Zoho Show.

                                                                                Get Started Now


                                                                                  Zoho Show Resources


                                                                                    Zoho Writer Writer

                                                                                    Get Started. Write Away!

                                                                                    Writer is a powerful online word processor, designed for collaborative work.

                                                                                      Zoho CRM コンテンツ






                                                                                        Nederlandse Hulpbronnen


                                                                                            ご検討中の方





                                                                                                  • Recent Topics

                                                                                                  • Is it possible to Select Item Serial Numbers from a Sales Order?

                                                                                                    Our accepted estimates are converted to Sales orders for our warehouse staff to pick.  How can my warehouse staff select the serial numbers for an item when editing a Sales Order?  Logically when staff pull an item and have the serial in front of them they update the Sales Order and select the serial. I understand a serial can be added when creating an invoice but how can accounts team know the serial if the warehouse staff can't select it! A basic flaw!
                                                                                                  • MORE BUGS: Client Script, Deluge and Widget JS SDK don't work as expected when trying to retrieve a record that has been "rejected" as part of an approval process.

                                                                                                    Client Script $Page.record is null when accessing a record that has been "rejected" as part of an approval process. Deluge zoho.crm.getRecordById(moduleName, recordId) returns {"status":"failure"} when recordId is a valid, but rejected record. OK... I
                                                                                                  • Zoho CRM Widget not displaying 2 related lists (JS)

                                                                                                    Okay so I basically have 2 relatedLists that I want to get and render: ZOHO.CRM.API.getRelatedRecords({ Entity: data.Entity, RecordID: data.EntityId, RelatedList: "Notes", page: 1, per_page: 200, }) ZOHO.CRM.API.getRelatedRecords({ Entity: data.Entity,
                                                                                                  • Zoho Books and Zoho Projects Task Status Update

                                                                                                    How can we create an automation using custom functions for the following scenario. When our zoho books invoice status changes to paid. I want a task in Zoho projects to change to completed.
                                                                                                  • Default Sort Order in Project Tasks View

                                                                                                    It should be possible to specify a default sort order (or have the last explicit sort order restored upon reload) for the tasks in the project tasks view. Currently the sort order must be manually re-selected for each sub-group whenever any changes are
                                                                                                  • Assigning Tasks and Requests to Groups... how do I?

                                                                                                    Guys, I've spent many hours exploring Zoho Support and we are generally satisfied with the system.  I'm trying to understand how a system that has so much to offer can be missing GROUP assignment and queue functionality.  I am hoping that there is a way
                                                                                                  • Parsing of SQL query failed. Please check the SQL syntax.

                                                                                                    I am trying to have Zoho Analytics recognize that if the a Deal is in Stage "Need Docs" it should also be counted as a Deal in the Stage "New Lead" /*New Lead*/ SELECT "ID" 'New Lead' AS "Stage" From "Deals" Where "Stage" = 'Need Docs' Union All Error
                                                                                                  • Where is the setting to enable/disable 2FA?

                                                                                                    The following links show where enable/disable 2FA is supposed to appear, but neither appear for me: https://help.zoho.com/portal/en/kb/zohosites/faq/account/articles/how-do-i-enable-or-disable-two-factor-authentication-for-my-account shows Security >
                                                                                                  • How to Assign Record Ownership in a Custom Form via API?

                                                                                                    Hello everyone, I’ve created a custom form in Zoho People and I’m using the API to manage its records. I would like to know how I can assign ownership of these records to specific users via the API. Is there a specific parameter or field in the API request
                                                                                                  • Customer Statement Template not matching when sending

                                                                                                    Hi everyone! So when I send statements to our customers via Zoho Books, the message that appears by default does not match what I have written on the template Under settings -> email notifications -> sales -> customer statement We have a single default
                                                                                                  • Working with keywords

                                                                                                    Hello everyone, first time here so I will try to be brief. I am working on my company's data set. I have a table with all the images we have on line. For each image we hava a cell tha contains all keywords related to that image. I would like to explore
                                                                                                  • Peppol Malaysia API

                                                                                                    Hi Zoho Books, my country Malaysia will going to implement "Peppol" (E-Invoicing), starting 1 Jul 2025 for all businesses. The government intends to provide API for accounting app. The workflow involves creating an invoice from accounting app, triggers
                                                                                                  • Re-emitir facturas con nueva dirección de facturación

                                                                                                    Hola, necesito saber si es posible que las facturas ya emitidas, pueden ser re-emitidas con el cambio de dirección de facturación, realizado el día de hoy 02-01-2025, para efectos contables. Espero su ayuda, Gracias
                                                                                                  • Zoho Learn vs. Trainer Central

                                                                                                    Hi, I'm currently using Zoho One with a WordPress-based website and WooCommerce to manage my online courses. I would like to know what is the difference between Zoho Learn and Trainer Central and if it's possible for these two platforms to replace WP
                                                                                                  • Map Plan to Different Income Account for Some Subscriptions via API

                                                                                                    We have a plan that has a default Plan Account of "Sales". Can we override the account for a specific subscription via API? In some instances the same exact plan should map to a different income account. When we create stand-alone invoices in Zoho Books,
                                                                                                  • Flow with CRM

                                                                                                    Hello, I have a simple flow that uses a web hook to enter data into a Sales Order. I have the web hook sending Flow data which has a PO field. If the PO has a special character like - or / or \ the task fails. How can I get the flow to be okay with the
                                                                                                  • Chrome browser issues. Anyone else?

                                                                                                    I am suddenly having multiple issues with Chrome browser interpreting the Zoho Mail interface.  Anyone else?  Any known problems? Thanks, Todd
                                                                                                  • Zoho Payroll US?

                                                                                                    Good morning, just reaching out today to see if there's any timeline, or if there's progress being made to bring Zoho Payroll out to be available to all states within the USA. Currently we're going through testing with zoho, and are having issues when
                                                                                                  • Set up multiple IMAP email addresses

                                                                                                    Hi, I just started using CRM and its great, but I just found out I can only add one imap email address for incoming mail in the included salesinbox ...this is ridiculous. All companies have different email such as sales@domain, info@domain , personal@domain
                                                                                                  • Function 58: Custom calculation in item table of invoices (2 fields)

                                                                                                    Hello everyone, and welcome back to our series! In Zoho Books, the Item Amount in invoices is calculated by multiplying the Quantity and Rate fields. Previously, we shared a function to include a custom field in this calculation. Today, we are taking
                                                                                                  • Tracking new lead response time

                                                                                                    Hi, I have a team of Sales Development Reps, who have a KPI of responding to a lead within 20 mins or less once it hits the system.  I seem to recall that Zoho CRM had the capability to track this in a previous version, but don't see it anywhere.   It's
                                                                                                  • Search function not working anymore

                                                                                                    Hi! The search function is not working anymore. How can we solve this problem?
                                                                                                  • When converting a lead to an account, the custom mandatory fields in the account are not treated by zoho as mandatory

                                                                                                    In my Account module I have a number of custom fields that I have set as mandatory. When I enter a new customer as a new account they work, I can't save the record without populating them. However when I convert a lead, my CRM users are able to save the
                                                                                                  • Expand Zia's Language Support and AI Capabilities

                                                                                                    Dear Zoho Desk Support, I would like to submit a feature request to improve Zia, the AI-driven support assistant in Zoho Desk. Currently, Zia only supports the English language, while other AI agents such as Gemini, ChatGPT, and Claude can work with a
                                                                                                  • get gettting the days number between two dates with deluge

                                                                                                    I am trying to calculate the days number between 2 specific dates but its not working. PLease help me.
                                                                                                  • Limit excceding issue in zoho creator

                                                                                                    I am transferring data from Zoho Books to Zoho Creator using a Deluge script. However, I am frequently encountering a "limit exceeding error," which seems to be related to the Deluge statements limit. I reached out to Zoho Support, and they informed me
                                                                                                  • How do I add more schedules to Zoho Creator?

                                                                                                    At the moment, the number of schedule calls we have in Zoho Creator are 1800 per month and I was wondering if it was possible to upgrade that amount to something higher. I'd like to know my options as well as the pricing.
                                                                                                  • Conexion CREATOR x CRM

                                                                                                    Buenas tardes, Tengo un problema con un código que crea un registro en CRM. Revisé el CRM para eliminar los campos obligatorios, pero cuando ejecuto el programa, aparece el siguiente mensaje de error: {"code":"MANDATORY_NOT_FOUND","details":{"api_name":"data"},"message":"required
                                                                                                  • Invoices with billable time and expenses

                                                                                                    I cannot seem to get a straight answer. We are looking to create an invoice to send to our clients, but it needs to have the following on it: 1. Billable hours for each employee. All hours for the pay period on one line, by employee. 2. Expenses for each
                                                                                                  • Search Bar Improvement for Zoho Commerce

                                                                                                    Hey everyone, I've been using Zoho Commerce for a bit now, and I think the search bar could really use an upgrade. Right now, it doesn't show products in a dropdown as you type, which would make finding items a lot faster. On Shopify, for example, you
                                                                                                  • Send Whatsapp with API including custom placeholders

                                                                                                    Is is possible to initiate a session on whatsapp IM channel with a template that includes params (placeholders) that are passed on the API call? This is very usefull to send a Utility message for a transactional notification including an order number
                                                                                                  • Can't get form response to populate custom PDF template

                                                                                                    I've created a template and set it to default but can't figure out how to get the response to populate that template. It keeps giving me the default summary.
                                                                                                  • Zoho Sheets not compatible with Excel/Google Sheets

                                                                                                    In order to share a copy of a Zoho sheet with someone that does not use Zoho, it must be downloaded as MS Excel format and then added to an email.  This is a labor intensive, and frankly confusing process.  I have forgotten to do this before, only to
                                                                                                  • Add Ability to Designate Decision Branches as "Error Branches"

                                                                                                    Zoho Flow gives the ability to track down, troubleshoot, and fix errors with the Status and Filter dropdowns in the History tab. This works well for when a "normal" Flow action registers with an error. However, there are other times where it would be
                                                                                                  • Visitors sending message via Whatsapp are not saving on contacts

                                                                                                    Visitors who sends me messages from Whatsapp when i finish the chat do not populate on contacts, how can I add them as contacts?
                                                                                                  • ChatGPT only summarize in English

                                                                                                    Hello i' v enabled chatgpt in salesIQ, it works great inside conversation (revise, Rephrase etc) add tags works well with another language than English. But when I want to summarize it render only in English, despite sales IQ is set to another language.
                                                                                                  • Brand with multiple facebooks pages

                                                                                                    HI, We are a small publisher that has different FaceBook pages for each of our product lines. All are within the same FB account.   Is it possible to add all of these pages to our one brand in zoho social so I orchestrate the posts between the different products?    Cheers, Joe
                                                                                                  • How do I connect Sales IQ to Shopify

                                                                                                    How do I connect Sales IQ to Shopify.    
                                                                                                  • DORA compliance

                                                                                                    For DORA (Digital Operational Resilience Act) compliance, I’ll want to check if Zoho provides specific features or policies aligned with DORA requirements, particularly for managing ICT risk, incident reporting, and ensuring operational resilience in
                                                                                                  • Stock Count - Does it really work?

                                                                                                    We have been trying to use the new Zoho Inventory stock count feature. It seems great at first glance.. ..but what we can't get our heads around is if a count doesn't match you can't simply set up a recount of those that are unmatched, which just seems
                                                                                                  • Next Page