Fetch customized user inputs, store them globally at the app leve | Community | Zoho Projects

Fetch customized user inputs, store them globally at the app leve | Community | Zoho Projects

This data storage concept enables you to store data related to your extension for both entity properties and extension properties.

In our previous piece, we looked at how to store data for entities using entity properties. In this post, we'll look at an example of using extension properties effectively. Extension properties enable you to record data for an app in its entirety. Refer to this article on the limitations of extension properties for additional details.

Scenario

Let's say that as a developer you want to gather feedback/reviews through your extension. In general, reviews and feedback help you gain insights into users' perspectives.

When designing a review/feedback template, using a standard question with predefined options will restrict the feedback/review process to certain specific standards/requirements. However, your clients may use Zoho Projects to manage a variety of businesses, each with its own set of processes tailored to the needs of that company.

What can you do to standardize and streamline this process for all clients?
It would be beneficial to create a standard feedback/review template for your customers and then enable them to customize the question and its options to meet their own company feedback requirements.

Goal: Create a generic feedback/review template that enables clients to provide their personalized inputs to customize the review/feedback question per their company needs.

Solution

To accomplish this goal, we'll incorporate both entity and app data storage—as well as a few other capabilities—into our extension. Let's look at the features and steps we'll be taking to develop this example.
  • First, we must gather the question and options that the user wants for their feedback/review form. To accomplish this, we can create a bottom navigation bar widget called "Feedback or Review template settings" that enables the user to provide their personalized feedback/review question along with its options as input. We can accomplish this using the widgets approach explained earlier in this post.
  • Next, we must save the values the user provides for the question and options. We can accomplish this by using the data storage extension properties, which will store the data and make it available across the app/extension. (Now that we have the values stored for the entire extension/app, we can retrieve the data and access it across the necessary entities.)
  • In our example, we want to collect feedback/reviews from users for the tasks and issues entities. For this, we can create a widget called "Feedback or Review" in the details page of the task and issue entities, respectively.
  • In this widget, we must populate the question with the options the user previously provided as part of the "Feedback or Review template settings" widget. We can accomplish this by retrieving the previously saved details and displaying them in the relevant entities (tasks and issues, in our example).
  • Once we've displayed the question and options to the user, they can select an option to provide feedback or a review for the entity they're working on.
  • Furthermore, we can save the user's option selection and associate it with the entity. This will enable us to display the previously selected option for that question each time the user accesses the "Feedback or Review" widget, which we can accomplish using the data storage-entity properties concept.
Required components
  • An extension configuration process includes the following:
    • Creating an extension.
    • Configuring the plugin manifest.
    • Setting up the widget code.
  • Bottom navigation bar widget (top_band): Enables the user to input their customized values for the feedback/review template's question and its options.
  • Task details tab widget (task_tab)/Issue details tab (issue_tab): Enables us to fetch and display the value the user enters for the feedback/review template in the respective entities.
Let's explore these components now.

Extension configuration

Extension creation: We've created a new extension for Zoho Projects. Learn more about the steps to create an extension.
                                                                  

Plugin-manifest.json configuration: Once we created the extension, we configured the plugin-manifest.json file to include the widgets. For a more detailed understanding of how to configure the plugin-manifest.json file, refer to our earlier post.

For our extension use case, the plugin-manifest.json file is configured as shown in the screenshot below.

Note: We'll have to set the storage key to true in order for storage space to be allocated in the Zoho Projects product for this extension. By default, the value will be false.
                                                

Setting up the widget code

Now that we've set up the other components, let's move on to writing our widget code and incorporating the data storage feature.

Feedback or Review template settings widget (Bottom navigation bar - top_band) - Enables us to gather personalized user input for the feedback/review template. Please find the index.html code snippet attached in the post.
  • In the code snippet above for the bottom navigation bar widget, the user is presented with two text boxes: one for entering their customized question for feedback/review and the other for entering their customized options, each separated by a comma.
➤ The app.store method in the extension properties is used to store this data against the extension in the form of key-value pairs.
➤ The values for the question and options are constructed as a JSON object and then stored against the key "storedappvalue" using the app.store method.
Note: For user-entered options separated by a comma, these options are converted to an array using the split() method, with the comma serving as the criteria, and then stored against the key.
➤ Finally, when the values are successfully stored after clicking the Add button, the zohoprojects.invoke method is used, and the user is notified with the alert "Data added".
  • Additionally, every time this widget loads, the data stored at the app level in the key "storedappvalue" is obtained using the app.retrieve method.
  • From this retrieved value, any previously stored data against the key "storedappvalue" is removed using the app.remove method.
  • This is done because whenever a user wishes to change their feedback/review question and options, the new data will be added and stored against the key as well. Since we require the newly entered values to be displayed as part of our "Feedback or Review" widget in the tasks and issues entities, the previously stored data is removed, and the new values entered are stored against the key upon clicking on the Add button.

Feedback or Review widget (task details tab - task_tab) - Displays the feedback question and options and enables the user to provide feedback for the entity they're working on. Please find the Taskfeedback.html code snippet attached in the post.
  • In the code snippet above—for task/issue details tab—we're first retrieving the value stored against the extension (in the bottom-band navigation bar) by invoking the app.retrieve method using the key "storedappvalue".
  • From this retrieved value, we fetch the question and its options. The options for the question are displayed in the widget in radio button format, which enables the user to choose one option for the feedback/review question.
  • Once the user chooses an option and clicks the Save button, the data is saved using the entity properties in data storage feature.
➤ Here, the selected review option (selectedreview) value and its index position (selectedoptionnumber) in the radio button element are stored using the entity.store method. We use entity storage here since this value chosen is specific to the entity the user is working on.
  • Every time the widget loads, the chosen value stored using the entity.store method is retrieved using the entity.retrieve method and checked against the radio element options. This allows the chosen value to be enabled and displayed to the user every time the widget loads.
We can use the same snippet across the issue entity as well.

Now that we've completed the setup for both the widgets and have all the extension components ready, let's go ahead and see the output.

Sample output:
                                                

This example demonstrates how to efficiently use data storage for extension properties. The data stored against an extension/app can be retrieved across multiple entities to perform logical functions. Additionally, in this example, we also witnessed code reusability across multiple entities. You may enhance this example by incorporating more than one feedback/review question.

In this way, you can use extension properties to store data across an extension/app. We hope you found this information useful. Follow this space for more insights!

Sign up for a Zoho Developer account and start developing extensions for Zoho Projects using Sigma.

SEE ALSO



    • Recent Topics

    • Important update in Zoho Forms: Enhancements for improved email deliverability

      Hello, form builders! We would like to inform you about some changes we're making in Zoho Forms to ensure the deliverability of your outbound emails. Changes to Gmail policies Gmail has updated its DMARC policy which quarantines emails sent with gmail.com
    • Error 403: Forbidden When Updating Email Signature via API

      Hi Zoho Desk team, First, congratulations again on the excellent Zoho API. But, I’m encountering an issue while attempting to update an email signature via the API. Whenever I make a request to update the signature, the response returns an HTTP 403 Forbidden
    • Why hasn't Zoho CRM For Everyone been rolled out?

      I don't understand the point of rolling out new features so slowly after a big fanfare launch 8 months ago. I've signed up for 'early access' and also contacted my point of contact, but nothing. Not even an auto reply. Would you say that this is good
    • Canva Integration

      Hello! As many marketing departments are streamlining their teams, many have begun utilizing Canva for all design mockups and approvals prior to its integration into Marketing automation software. While Zoho Social has this integration already accomplished,
    • Can I print a set of record templates as a single pdf?

      I have a record template formatted as a gift certificate. I can email a single gift certificate to each recipient, but I also need to print the whole batch for the organiser, and they won't want 40 separate files. The layout needs to be identical, so
    • Time Zone Sending in Marketing Automation

      Good day...can anyone share if they have been able to get sending via Time Zones to actually work? Our data is 99% perfect, with all the time zone criteria met, yet the results are completely off target when we try to use it. We've had varied results
    • Combine Small Pie Slices in Pie Chart

      Hello, I am trying to make a pie chart showing our sales in each of our product categories. The problem is that we have over 80 product categories, and not that much room from which to look at it. I am wondering if there is a way to combine the smallest
    • Which are the IP addresses to use for 'split delivery' with Office 365? (Zoho mail inbound gateway)

      Hi, I'm trying to set up 'split delivery' (email routing) with Office 365. I'm following the instructions to set up Office 365 as the primary server (https://www.zoho.com/mail/help/adminconsole/coexistence-with-office365.html) One of the prerequisites
    • Zoho Desk Onboarding Assistance - How to do bulk taging

      Hi How to apply a particular tag to multiple tickets in one go.
    • Round robin not processing backlog tickets

      We set up a round-robin for one of our departments which initially worked, but something seems to have broken during the 'tweaking' process as it will no longer assign backlogged tickets of any kind. (I've included images of the settings.) Based on the
    • Merge Tickets Directly from Contact Page in Zoho Desk

      Dear Zoho Desk Support Team, We are writing to request a new feature that would allow users to easily merge tickets directly from the contact page in Zoho Desk. Currently, the only option to merge tickets is from the Tickets list view page, which can
    • Text snippet

      There is a nice feature in Zoho Desk called Text Snippet. It allows you to insert a bit of text anywhere in a reply that you are typing. That would be nice to have that option in Zoho CRM as well when we compose an email.
    • when I open my sheet ,it always start at "A1" despite I left it at "N234"

      when I open my sheet ,it always start at "A1" despite I left it at "N234"  Is it possible to make the sheet open where I left it? 
    • Leistungsdatum in Rechnungen (Zoho Books)

      Hallo, ist es irgendwie möglich den Leistungszeitraum in der Rechnung aufzuführen? Beste Grüße Aleks
    • Why is this an Invalid Collection String Error?

      Here's the code snippet: Enddate = EventEnd.toDate("yyyy-MM-dd"); EventCollection = Collection(); EventCollection = zoho.crm.searchRecords("Events", "(End_DateTime:starts_with:"+Enddate+")"); for each eventday in EventCollection { //create a list of events
    • Not possible to remove mandatory system fields?

      Is there no way to make things like under Calls "Call Duration" or "Call Start Time" or under Potentials "Close Date" not mandatory? These fields are useless for my organization and waste time but the box is grayed out to not make them mandatory. It's
    • how to create a company without an assigned owner

      In my company we are reassigning accounts and we need to leave some companies without an owner to review their potential and then assign them, but the options that appear in owner require that they be assigned to a seller, how to leave them without an
    • ZDC Hackathon 2024 Category-wise Winners !

      Zoho CRM Client Script Hey everyone! After rigorous evaluation by our 14 expert judges, we’re beyond excited to announce that two incredible teams have won the Zoho CRM Client Script – Product Category award for their outstanding innovations! Team 1:
    • What does "Tickets for Review" do?

      What is the purpose of the va nilla view " Tickets for Review?"
    • Firebase Functions integration

      Hello Zoho Team, Please advise how I can configure SMTP in my account to facilitate Firebase-triggered email functions. Please note that I desire to send an email with a JSON object collected from Firebase Firestore and included in my mail to forward
    • How to provide recommended KB articles in the welcome message

      I'm new to Zoho and am looking to replicate something I did for a previous employer. I want all newly created tickets to receive an automated welcome message that includes a few recommended articles from our knowledge base. Ideally there would be a way
    • Zoho Desk View Open Tickets and Open Shared Tickets

      Hi, I would like to create a custom view so that an agent can view all the open tickets he has access to, including the shared tickets created by a different department. Currently my team has to swich between two views (Open Tickets and Shared Open Tickets).
    • No more IMAP/POP/SMTP on free plans even on referrals with NO NOTICE

      Outraged. Just referred a colleague to use her domain (not posting it publicly here) to Zoho, just as I have other colleagues, clients, friends. Expected the exact same free plan features as I have and as everyone else I ever referred got. I was helping
    • Join us at the Canada ZUG Meetup: What’s New in Zoho CRM

      Hello Zoho Community! Start your year with fresh insights into Zoho CRM’s latest updates and tools. Whether you're a CRM beginner or a experienced user, this meetup is crafted to help you optimise your processes and leverage new features. Explore practical
    • So many tools...

      As a low- to no-code user and no funds to budget, there are so many options to choose to get my work done and when I start thinking about workflows for people other than myself, I get confused about the most streamlined way to move forward if I can get
    • Pull Price Book and Product info in a single report

      i want to be able to produce price books for my engineers. If i could produce a report with the retail price as an option that would be great. This seems to be an old issue to please what are the plans. Moderation Update (16th Feb 2024): The option to
    • Custom TaskList and Tasks creation based on project custom field

      Hello, I'm trying to configure Zoho Project for a specific use. I have created a custom multiselection field in project template and I would like to create one tasklist with multiple tasks in it depending on the multiselection field on each project. For
    • Zoho Creator to Zoho Books

      Hi, I use Zoho Creator and Zoho Books. I use Creator to produce and send invoices (for specific reasons) but want to create a corresponding invoice in Books. Has anyone done this and if so, how? I have the following documentation but can't make sense
    • Subform Zoho Form to Creator

      Hi, I would like to be able to retrieve the values of a Zoho Form subform to create an entry for each in Zoho Creator. To send from Form to Creator, I use Zoho Flow. I have a custom function, which should normally retrieve each field value then create
    • Multi Select Between Modules

      Hi, I'm not sure if this is possible, but I want to "import" or "mirror" the multi select options from one module to another. For example... I have Module "Clients" with a Multi Select Field of "Enrolled Services" I also have a Module "Services" with
    • Doesn't Catch Duplicate Accounts

      Zoho is very bad at catching duplicate accounts. If we have an account in Zoho, and we import the same account but with "Inc." or "LLC", it doesn't catch it, it just duplicates it. When importing from another app (like ZoomInfo) I set it to catch duplicates
    • email Signature from Contact page not working

      Hey guys, I just set up my signature for the email i integrated with ZOHO. It works when I'm using the email client but when I send an email from the contact or lead page it doesn't add the signature. problem on my end or ZOHO's? thanks for the help!
    • Create Quote does not show the "Product Description" entered as part of the Product setup.

      The product description created as part of the product setup page, does not show in the Create Quote module; The module allows for an additional description to be added but without access to the original stored description. By selecting the product from the "Product Name Lookup" pop-up, the "Product Description" part should be populated from the product record where the user is allowed to further modify it.
    • 554 5.2.3 MailPolicy violation Error, help?

      This message was created automatically by mail delivery software. A message that you sent could not be delivered to one or more of its recipients. 554 5.2.3 MailPolicy violation Error delivering to mailboxes I am not sure why i am getting this, please
    • New Customization options in the module builder: Quick Create and Detail view

      Hello everyone, We have introduced two new components to the module builder: Quick create and Detail view. The Quick Create Component It is a mini form used to create a record and associate it to the parent record from a lookup field. For example, if you have a Deals lookup in the Contacts module, then you can associate existing deals or create a deal and associate it with the contact. You can customize this Quick Create form by adding standard as well as custom fields. There is no limit to the number
    • Créer un second centre d'aide dans Desk

      Bonjour, je souhaiterai pouvoir créer un second centre d'aide dans Desk afin d'avoir un service complètement indépendant du premier. Le premier fonctionne bien, il est pour notre service client. Mais j'aimerai maintenant pouvoir créer un nouveau service
    • Client Script | Update - Introducing Subform Events and Actions

      Are you making the most of your subforms in Zoho CRM? Do you wish you could automate subform interactions and enhance user experience effortlessly? What if you had Client APIs and events specifically designed for subforms? We are thrilled to introduce
    • User Tips: Auto-Create Opportunity/Deal upon Quote Save (PART 1)

      Problem: We use quotes which convert to sales order but Users / Sales Reps do not create opportunities / deals and go straight to creating a quote. This leads to poor reporting. Implementing this solution improves reporting and makes it easier for users.
    • Email Campaigns overview page is missing SENT DATE and # people sent to!

      I would like to see the date the email campaign was sent, so I can understand and track when each email campaign was sent. Right now, unless you go to a contact who received a campaign, you cannot see when the campaign was sent (!!!!!!). So, if my boss
    • Create an event from mail

      From mail I can create a task but I cannot create an event.  What am I missing?
    • Next Page