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

                                                                                                  • 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
                                                                                                  • 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
                                                                                                  • 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
                                                                                                  • 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
                                                                                                  • "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.
                                                                                                  • 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!
                                                                                                  • [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
                                                                                                  • Introducing Bin Locations In Zoho Inventory

                                                                                                    Hello users, We are excited to let you know that your wait for the Bin Locations feature has now come to an end! Yes, you heard us right! We are here to introduce the much-awaited Bin Locations now in Zoho Inventory. But before we dive into the feature
                                                                                                  • How to send mail with js SDK

                                                                                                    Hell o I'm using https://live.zwidgets.com/js-sdk/1.2/ZohoEmbededAppSDK.min.js, for my widget in CRM (built with sigma) Is it possible to send email from js file, I try ti use that ZOHO.CRM.API.sendMail({ "Entity": "Accounts", "RecordID": sharedVariableEntityId,
                                                                                                  • Cannot add Zoho Forms link to LinkedIn

                                                                                                    Hello, We have encountered a problem where we are unable to share a Zoho Forms link on LinkedIn. This is what we got from LinkedIN, but we have not heard back from Zoho Support as yet, and we are meanwhile stuck... "It seems the URL does not scrape the
                                                                                                  • Feature request - pin or flag note

                                                                                                    Hi, It would be great if you could either pin or flag one or more notes so that they remain visible when there are a bunch of notes and some get hidden in the list. Sometimes you are looking for a particular name that gets lost in a bunch of less important
                                                                                                  • i keep see there is a connetion issue connecting 3rd party api on zoho when using zia

                                                                                                    hi there , i have set up open ai api to zoho zia (copied and pasted to zoho zia) but I keep getting notificaiton "there is a connetion issue connecting 3rd party api on zoho" when using zia on top when click zia and try to type in word there
                                                                                                  • SendMail in CRM Deluge function rejects a validated email address

                                                                                                    In a CRM Deluge function, the email address is considered invalid. Is there another method by which it can be validated? It's unacceptable in my current situation to use either the zoho.loginuserid or adminuserid as the From address.
                                                                                                  • how do i remove a specific Zoho Service from my account

                                                                                                    I no longer need Zoho CRM, ZRM Assist nor ZRM BugTracker. How do I remove them from the list of apps for my account?
                                                                                                  • Build custom AI solutions with Catalyst’s QuickML capabilities in CRM

                                                                                                    Hello everyone, We’re thrilled to announce an improvement for our Zoho CRM Enterprise users: the ability to create custom AI solutions using Catalyst’s QuickML directly from Zoho CRM. As you may already know, Zia, Zoho CRM’s AI-powered assistant, offers
                                                                                                  • Unveiling Cadences: Redefining CRM interactions with automated sequential follow-ups

                                                                                                    Last modified on 01/04/2024: Cadences is now available for all Zoho CRM users in all data centres (DCs). Note that it was previously an early access feature, available only upon request, and was also known as Cadences Studio. As of April 1, 2024, it's
                                                                                                  • Pay Contractor Timesheets

                                                                                                    I have contractors that fill out a timesheet. Each hour must be assigned to a current client. I need the easiest way to get the contracts paid. They are paid on an hourly bases. How can this be done?
                                                                                                  • Set up slack alert based on a field changing from one option to any other

                                                                                                    Hi, I'm trying to set-up a workflow to send a slack alert if a field changes from one option to any other. I've set-up a workflow to trigger on Edit and when a specific field gets modified but the only option I have 'is modified to' when really it should
                                                                                                  • Better UI more user friendly

                                                                                                    Hello everyone, I think all finance apps, especially Zoho Books, would benefit from the following suggestions/ notes: 1. Grouping Fields in Zoho Books: Unlike Zoho CRM, Zoho Books does not seem to have an option to create sections or group fields. This
                                                                                                  • Chronicles of 2024: The Year in Retrospect

                                                                                                    As we close out 2024, let’s take a moment to highlight the new features and updates that have enhanced Zoho Invoice in 2024. Among the exciting enhancements, we have launched a new AI-powered chatbot designed to assist you in understanding the app's features
                                                                                                  • Power of Automation :: Automatically archive your inactive Projects

                                                                                                    Hello Everyone, A custom function is a software code that can be used to automate a process and this allows you to automate a notification, call a webhook, or perform logic immediately after a workflow rule is triggered. This feature helps to automate
                                                                                                  • 554 5.1.8 Email Outgoing Blocked

                                                                                                    HELP!!!!! My e-mail marymariya@zoho.com is blocked. Error: 554 5.1.8 Email Outgoing Blocked The third day I am writing to the forum, but zohosupport is not responding. Why? What is the problem? I ask to help solve the problem, because I can not communicate with my customer base.
                                                                                                  • Zoho Inventory: Rewinding 2024

                                                                                                  • Custom Modules Now available for Standard and Professional Editions with Expanded Limits across all editions

                                                                                                    #CRM25Q1 Hello Everyone, We are here with an exciting update to Custom Modules in Zoho CRM. Custom modules will now be available to Standard and Professional Edition users, with expanded support across all editions. The standard modules offered in Zoho
                                                                                                  • Assistance with Custom Attendance Report in Zoho People

                                                                                                    Hi, I created a custom report in Zoho People 5.0 to track employee attendance according to our specific needs, as the existing reports do not include all the required details. However, I’ve noticed that the report doesn’t update continuously or on a daily
                                                                                                  • Zoho analyticsでのタブを跨いだ集計

                                                                                                    Zoho analyticsまたはCRMレポートなどを用いて、 見込み客タブと商談タブで共通するユニークキー(リード管理番号)を軸に、「共通選択リスト」で設定した項目別の集計を行うことは可能でしょうか? ・要望 ①リード管理番号をキーに、見込み客テーブルと商談テーブルを結合したRAWデータを作成したい ②具体的には下記表のように「共通選択リスト」項目(サービス)別のマーケ数値を一表にしたい  ※リード=見込み客タブ 商談・成約=商談タブ      リード数 商談数 成約数 サービスA   10   5   2
                                                                                                  • Key Highlights of 2024: Recalling a Year of Progress and Advancements!

                                                                                                    As we step into 2025, we’re excited to share the progress and developments we’ve made to simplify and streamline your travel and expense management in the past year. Let’s take a look back at some of the key updates and enhancements that have helped us
                                                                                                  • Next Page