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

                                                                                                  • 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
                                                                                                  • 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
                                                                                                  • Zoho One not working

                                                                                                    I'm having several issues accessing Zoho One. Some pages don't load (for example, Zoho Directory) and the labels are all messed-up (oz.account.directory.display.shorname, oz.settings...., etc.)
                                                                                                  • If I turn off the Task Prefix & ID in the Portal Configuration section, will it remove the dependencies in my projects?

                                                                                                    Hi all, basically the title, I am new to zoho projects and trying to get my head around some basic principles. Unfortunately I have not found this information via the search option and after deleting yesterday some Phases I had created in the Phases tab,
                                                                                                  • 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
                                                                                                  • Explication sur comment mettre en place des règles d'affichage ou "layout Rules"

                                                                                                    J'ai passé plus d'une heure hier avec le support et je n'ai rien compris !! Je suis lecteur assidu des guides (je "RTFM") qui ne sont absolument pas orienté "client" chez Zoho, et je tiens à le rappeler ici . Dans la documentation on m'indique un cas
                                                                                                  • 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.
                                                                                                  • Multiple Facebook Pages under Single Brand

                                                                                                    Hi everyone, I'd like to know if there is a possibility of connecting multiple Facebook pages under a single brand on Zoho? At the moment, there are different Facebook pages of a single brand and would want to keep under the same brand on Zoho as we
                                                                                                  • 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
                                                                                                  • Connect multiple Facebook ad accounts to Zoho Social

                                                                                                    Hi there. I'm doing the Facebook Ads and Zoho Social integration to automate the leads that come from Potential Customer campaigns on Facebook to Zoho CRM. I have a company (1 fanpage, 1 brand), but within the business or brand on Facebook, I manage several
                                                                                                  • Modules are continuously loading

                                                                                                    Hi! We are not able to open the task modules, it keeps continuously loading
                                                                                                  • Pushing Data from One CRM account to another.

                                                                                                    We have business partners that want to collaborate through the CRM. Other than pre-planned data migrations what are the options for Zoho Users to transfer data between the accounts. For instance, could I create a webhook that is sent from our CRM and then is picked up in the partner's Flow?
                                                                                                  • 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
                                                                                                  • 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
                                                                                                  • Free user licenses across all Portal user types

                                                                                                    Greetings everyone, We're here with some exciting and extensive changes to the availability of free user licenses in CRM Portals. This update provides users with access to all Portal user types for free to help them diversify their user licenses and explore
                                                                                                  • 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
                                                                                                  • Create Ticket from Chat with Rest API

                                                                                                    Hi to everyone, is possible to create a ticket from Chat with Rest API? In user interface is possible by clicking on the button "Convert chat as a ticket". Anyone know how to do that? Thanks
                                                                                                  • How to send binary data in invokeurl task?

                                                                                                    Hello, I am using Adobe's Protect PDF API. Source: https://developer.adobe.com/document-services/docs/overview/pdf-services-api/ Everything works fine in Postman. But for some reason after encrypting the file, it is empty after password protecting the
                                                                                                  • Address Grabber function for Zoho

                                                                                                    I converted from ACT to Zoho. With ACT, I used an add-on called AddressGrabber to scrape the contact information from leads that I buy and contact information contained on emails and websites and directly add it as a new lead or contact. Does anyone know
                                                                                                  • Set another Layout as Standard

                                                                                                    We created a few layouts and we want to set another one to standard:
                                                                                                  • Add blueprint buttons to listview and kanban

                                                                                                    Hello, just started to use the Blueprints feature - really useful. I have one suggestion to help this work even better - can there be transition buttons that appear on the top of listview & Kanban? Maybe an option as well - "Blueprint transitions appear
                                                                                                  • Zoho CRM search not working

                                                                                                    The search bar is not showing any results in our CRM installation. We have a lot of items and can not search them by using the navigation each time. Can someone please check this asap.
                                                                                                  • 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
                                                                                                  • How Can I Customize Sales Reports in Zoho CRM to Better Track Our Sales Team's Performance?

                                                                                                    Hello everyone, I'm new to using Zoho CRM and need some help with customizing our sales reports. We want to track our sales team's performance more effectively and visualize trends that can inform our strategy. What specific customizations or features
                                                                                                  • Marketing Automation : Adding to existing Lead Score

                                                                                                    I want to be able to add a score to an existing ZMA lead however I can't find the field in the "Fetch Lead" action that contains the existing score. There is an action for Add lead score, but that's not clear if it overwrites the existing value or adds
                                                                                                  • Items should display under specific warehouse

                                                                                                    I have configured the multi warehouse but it show all the items under all warehouse which is not correct according to our business logic, so i want that items should only display under that specific warehouse not under all the warehouses not even with zero quantity. Some items should be common but not all so is there any option for that purpose so i can specific the items to its warehouse. Regards
                                                                                                  • Package Dimensions

                                                                                                    Packages need to have dimensions that are sent to carriers in addition to just the weight. Without the package dimensions being transmitted to carriers, the correct dimensional weight is not calculated for the label price, which results in corrections
                                                                                                  • Theft Prevention Sensor Integration in Zoho Inventory

                                                                                                    Is there a way to integrate a theft prevention sensor with Zoho Inventory, so items cannot leave the store unless they've been scanned at checkout? Any insights or existing solutions would be greatly appreciated.
                                                                                                  • Zoho Workplace gets yet another security boost: The addition of Zoho Vault

                                                                                                    Hello Community, Passwords are often the first line of defense, yet they're also one of the most common weak points. We're thrilled to announce that Zoho Vault is now integrated with Zoho Workplace! Zoho Vault Standard is now included at no extra cost
                                                                                                  • Where is the customization and extendibility of zoho inventory?

                                                                                                    After delving into zoho one subscription to test out systems we need for our business, I'm really disappointed after working in Zoho Inventory. Its features and customizability are extremely lacking compared to the other tools like CRM. In our case we
                                                                                                  • Deleted message in SPAM

                                                                                                    In one of my gmail accounts (getnickifit@gmail.com) I had an email from PayPal in the SPAM folder. I thought I was moving the message to the inbox from the zoho mobile but it looks like it was deleted. It is no where to be found--inbox, trash, etc. Can it be restored?
                                                                                                  • "notes"-field in a task to full width?

                                                                                                    Hi, Is there someone that can tell me how to adjust the "notes"-field in a task, to full width? I already played around with 1 or 2 columns, but this has nu effect on the standard width. Thx in advance for your help. Cheers, Ralph.
                                                                                                  • Search function not working anymore

                                                                                                    Hi! The search function is not working anymore. How can we solve this problem?
                                                                                                  • How to download Job Sheets in Zoho FSM?

                                                                                                    Hello, I'd like to download copies of completed job sheets as PDF's for upload to a workdrive to keep an audit record of completed Job checkout sheets. I do not see download of this file type as an option - any help is appreciated!
                                                                                                  • Custom service report or Zoho forms integration

                                                                                                    Hello, So far the experience with Zoho FSM and the integration with Books has been good, however there are limitations with service reports. As with my business, many organisations send technicians to different types of jobs that call for a different
                                                                                                  • JOB Sheet can not send PDF as service rapports and more info needed other topic

                                                                                                    Goedendag, - Jullie hebben nu job sheet erin gedaan en dar is echt super goed, enkel kunnen we de werkbon ( JOB sheet) nu niet verzenden als PDF als een service rapport naar onze hoofdaannemer hoe we dat nu doen als bewijs van de levering van het werk
                                                                                                  • Dialing Microsoft Teams Phone Service via Zoho CRM

                                                                                                    I am using the VOIP option in Microsoft teams for my office phone system. I was hoping to have a way to dial numbers directly from Zoho CRM, but don't see anything in the Teams Integration or in the Telephony integration that will enable this. Does anyone
                                                                                                  • [Webinar] Zoho Writer for law firms and legal professionals

                                                                                                    Are manual processes slowing down your legal practice? Are you ready to simplify document management and free up more time for your team to focus on what truly matters? Join us on January 16, 2025, for an exclusive Zoho Writer webinar designed specifically
                                                                                                  • Next Page