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

                                                                                                  • Emailing lookup field but placing this as an ID or number rather than text

                                                                                                    Hi there, First time poster and have been a user of Zoho Creator for approx 6weeks so forgive my ignorance as I learn to code. We have a need to send an email to a specific email address with some of the fields triggered by the submission of a form. In
                                                                                                  • 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
                                                                                                  • Tax Deduction at Source (TDS)

                                                                                                    I issued a sale invoice outside UAE , the customer apply TDS on the invoice , i checked my Zoho ( professional version ) i couldn't find the option of Enable TDS to let it appear while posting the incoming payment , please how to make it and how to configure
                                                                                                  • UNAPPROVED record management

                                                                                                    When the unapproved list of duplicates is long, one needs the some tools to manage them - when this list has over 1500 records, we cannot manage it without some tools, such as: 1. The ability to apply a filter - ie similar to creating a CREATE a NEW VIEW
                                                                                                  • Zoho mail filter Add to WorkDrive doesnt't work

                                                                                                    Hello, We have a problem with using the filter in the email. So, we want that when a bulk payment confirmation from the online store arrives, this email is automatically saved in HTML format on the drive using the action 'Add to Zoho WorkDrive -> Email
                                                                                                  • Introducing Zia GenAI: Zoho's Native Generative AI for Zoho Desk

                                                                                                    Hello everyone, Zia GenAI is available on Early Access for Zoho Desk Enterprise subscribers. Kindly fill out this Registration Form to request early access. We are excited to announce the Beta release of Zia GenAI in Zoho Desk, now available through our
                                                                                                  • 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
                                                                                                  • 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?
                                                                                                  • CRM x WorkDrive: File storage for new CRM signups is now powered by WorkDrive

                                                                                                    Availability Editions: All DCs: All Release plan: Released for new signups in all DCs. It will be enabled for existing users in a phased manner in the upcoming months. Help documentation: Documents in Zoho CRM Manage folders in Documents tab Manage files
                                                                                                  • 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
                                                                                                  • Zoho Books Estimate to Zoho CRM quote?

                                                                                                    I'm not sure why this isnt automatic, but maybe I'm missing something. When we create a quote in zoho books we have a custom function that pushes the contact into a deal within the CRM. I can not for the life of me figure out how to push an estimate from
                                                                                                  • Zoho Developer Hangout (ZDH) – Episode 17 | Optimizing Organizational Processes through Automation

                                                                                                    Hey developers! Running a business can get quite overwhelming especially when juggling multiple tools like those in the Zoho ecosystem. Although integrating most of them is a piece of cake, manual intervention is needed at times. Being able to automate
                                                                                                  • User Emails Blocked

                                                                                                    Community: I keep running into issues where our users stop receiving notifications from CRM because their email addresses get blocked in on the backend some how. I reach out to support, they confirm, they fix, and we carry on, but then it happens again.
                                                                                                  • Organization Variables - Restrict Access

                                                                                                    Currently, there is no way to restrict the access to organization variables. This leads to a problem when storing API related values that should be kept secret as anyone with access to create and edit email templates, workflow rules, or inventory templates
                                                                                                  • Apple Messages for Business in Omnichannel communications?

                                                                                                    Hello, Apple launched "Apple Messages for Business" but Zoho CRM or Zoho Desk don't appear in the list of possible integrators. Zoho already promotes https://www.zoho.com/crm/omnichannel.html Omni Channel integration, but Apple Messages does not yet appear.
                                                                                                  • Kaizen #140 - Integrating Blog feed scraping service into Zoho CRM Dashboard

                                                                                                    Howdy Tech Wizards! Welcome to a fresh week of kaizen. This week, we will look at how to create a dashboard widget that displays the most recent blog post of your preferred products/services, updated daily at a specific time. We will leverage the potential
                                                                                                  • Schedule meeting monthly on a particular day

                                                                                                    Suppose I wanted to schedule HR meeting every month on the first Tuesday with each employee separately for 20 minutes each. How could I automate these type of meetings? And if Sunday occurs on the first Tuesday I would like to shift that meeting on next
                                                                                                  • In ZohoCRM Dashboards - Editing Shown Columns on Drilldown of Components

                                                                                                    Hello! I'm working with some Dashboards inside of ZohoCRM. When creating a component (In this case, specifically a KPI Ranking Component), I'd like to customize which fields show when trying to drilldown. For example, when I click on one of the sales
                                                                                                  • Multibrand Help Center - Share knowledge base catgories between multiple departments

                                                                                                    Hello, I would like to know if it is possible to share categories between multiple departments when the multi brand feature is enabled. So that then one portal exists per department, but certain categories are visible in multiple portals. After all, we
                                                                                                  • Added Domain but SSL is not being set properly

                                                                                                    We added a Domain for our landing page and it pushed an SSL cert to it. The Cert is generated by LetsEncrypt, but it doesn't match our subdomain (i.e., it's just pointing to zohosites.com). How do we get the cert properly setup there?
                                                                                                  • 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,
                                                                                                  • Sharing Knowledge Base articles across multiple departments

                                                                                                    It would be useful to share some Knowledge Base articles across multiple departments where they are applicable, rather than having to go into other departments to find the article you're looking for. For example. Our reception uses the 'Admin' desk whereas our IT guys use the 'Support' desk, however both divisions would find KB articles about our company intranet useful. Reception does not have access to the support desk, so cannot see articles created in the Support KB. Perhaps you could install
                                                                                                  • Iteration through a list - Coming up against a "Failure to update function" error

                                                                                                    Hi there! I've been attempting to get a deluge script working and am running into an error that I have been unable to resolve. The error I am getting is Failed to update function Error at line :18. Improper Statement. Error might be due to missing ';'
                                                                                                  • KPI widget with percentage

                                                                                                    I'm trying to create a KPM widget that displays current performance as a percentage - something like the picture below. I've tried following the instructions at https://www.zoho.com/analytics/help/dashboard/kpi-widgets.html#chart but nothing ends up being
                                                                                                  • Canvas List View Not Saving

                                                                                                    Hi, I am trying to edit a list view to look different depending on the tags. Everything worked well and saved well with multiple views, but when I have gone back in to make some small changes like moving one of the icons it comes up with the error message
                                                                                                  • Team Inbox is not working AGAIN

                                                                                                    I like Team Inbox in general. It makes using a collaborative inbox easy - when it works. The problem is that it doesn't work at times - and it seems to not work, a lot. It's not catastrophic failure, it's little things. Unable to send messages Unable
                                                                                                  • QR code image is not exported in PDFs

                                                                                                    The new QR code field works fine when I include it in a report template and I choose the print option: https://creatorapp.zoho.com/<username>/<app_link_name>/record-print/<report_link_name>/<record_ID>/ But when I try to save the document to a .pdf file
                                                                                                  • QR codes in templates

                                                                                                    I'm excited about the new QR code generator. I have included a QR code that contains the record ID setting "${ID}" as input data. In the report detail it works perfectly but when printing it in a template the code is not shown.
                                                                                                  • This mobile number has been marked spam. Please contact support.

                                                                                                    Hi Support, Can you tell me why number was marked as spam. I have having difficult to add my number as you keep requesting i must use it. My number is +63....163 Or is Zoho company excluding Philippines from their services?
                                                                                                  • geographic search filter in map view

                                                                                                    Hi, I have a recruiting and timesheet system built in Creator. The client wants to enhance the search for candidates based on their location and filter by job skills - currently they look on the Map View which uses the geo location or post code of the
                                                                                                  • Real Estate CRM

                                                                                                    How can I tailor my CRM for real estate? I had seen an image where the CRM included property tabs.
                                                                                                  • 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.
                                                                                                  • Reload page with widget

                                                                                                    Hi all, I hope I can find some help here. I developed a small widget for Creator that is integrated into a page as a component. The page contains other content as well. When the widget is sent, the entire page should be reloaded to apply the changes to
                                                                                                  • Tip of the week #37 - Manage all your Telegram business conversations directly from your shared inboxes.

                                                                                                    Tired of switching between multiple apps to manage your business conversations? With Zoho TeamInbox's multichannel inboxes, connect your Telegram channel to a shared inbox. This way, your teams can easily handle c View, reply, and collaborate on them
                                                                                                  • Tags on notes aren't syncing correctly on Android

                                                                                                    I've created notes on the desktop version that have several tags assigned, but on both my Android devices those notes only have ONE of those tags instead of all of them, despite the actual content of the note being correctly synced, and I'm also starting
                                                                                                  • Reports - custom layout - duplicate report

                                                                                                    Do you also have this problem and what is the possible solution? I duplicate a report that has a "custom layout". Unfortunately the custom layout is not duplicated. To be improved for a future release by Zoho. I export the custom layout and import it...
                                                                                                  • "Copy Field Values from one Module to another" how to use?

                                                                                                    Hi everyone! I'm sorry if this question was already asked, I didn't find it! So let me explain:  In my Tickets module, we have the custome field "customer type" where we indicate if it's a lead, user, etc... In the Contact module I used the "type" field with exactely the same entries. I would like when in the tickets module an operator choose an option that it automatically update it in the contact module. I found the "Copy Field Values from one Module to another" custom function which seems perfect
                                                                                                  • How to map a global picklist from one module to another

                                                                                                    Hi there, i currently have a new field that is called sales office which we use for permission settings between our different offices located in different countries. It is a global set picklist with three different options: MY, SG and VN. I want to be
                                                                                                  • Pageless mode needed to modernise Writer

                                                                                                    When we switched from GSuite to Zoho, one of the easiest apps I found to give up, was Docs. In many ways, Writer has always been more powerful than Docs, especially in terms of workflows/fillable forms/etc. However, I went back into Docs because I notice
                                                                                                  • Changing the Logo Size on Zoho Sites

                                                                                                    My company logo incorporates both an image and text, and I would like it to be much more prominent on the page than is currently allowed by the small logo box in the template.  Is there any way to hide the page name and then make the logo box much bigger since my company name and logo are connected / are all in one file?  Thank you. 
                                                                                                  • Next Page