The Slash Command Series - Command suggestions - The power of choosing!

The Slash Command Series - Command suggestions - The power of choosing!

Command suggestions are a cluster of simple inputs given by the system to the user. Simply put, a suggestion list displays options for the command input. The idea behind using command suggestions is to make it easy for the end user, by showing the inputs while executing a command. 

Most often we find ourselves in a quintessential position where we're looking for a file or a folder packed away in a corner! Think about situations where your Manager and your Mentor ask you to share two different files?  Oh! how easy will it be when you get the list of files you've stored in your online cloud storage.  Now, think of a way where you can get and share these files directly from your chat window. Oh yes! You read that right. 

The /zdocs command gives you the list of folders you've created in your Zoho Docs Account. Select the folder you need and done! The files which are not saved in any folder will be added in the default folder. The command is executed to give you a list of files in that folder, with a share button. Select the file you wish and share and click share. 

/zdocs Command Workflow

Invoke URL : Invoke operations from Cliq to Zoho Docs by using the Invoke URL task. Plays an integral part throughout the command  list suggestion and execution. ( Learn More )

Command Suggestion Handler : The handler is triggered to show a list of folders from your  Zoho Docs account as and when you type the folder name

Click to Execute : Enabling the click to execute option triggers the command execution when you choose a folder from the list.

Command Execution : Click to Execute option, prompts this handler to post the list of files in that particular folder.

Button Function : Clicking on the 'Share' button next to a file, shares the file with the users in a chat! 

Now that we're familiar with the workflow, let's have a look at each fragment. Our slide deck conveys briefs the whole post to you in just 2 minutes!

Invoke URL 

A connection with Zoho Docs is necessary to invoke operations from Cliq. We use the invoke URL function code generated by creating a connection. For step by step details on creating a connection and the invoke URL task, refer our help guide on  Connections

Sample Invoke URL task

  1. response = invokeUrl
  2. [
  3. url : <url>
  4. type: <GET/PUT/POST/DELETE>  
  5. parameters: <parameters>        
  6. headers: <headers>             
  7. connection: <connection name>  
  8. files: <file object>            
  9.  ]; 
  10. * The url and type parameters are mandatory here.

Substitute the Get Folders API from Zoho Docs, mention the HTTP Method, and connection name to use it in the command suggestion handler.

  1. Invoke URL Task in Command Suggestion Handler
  2.  url = " https://apidocs.zoho.com/files/v1/folders/files";
  3.  folders = invokeurl
  4. [
  5.       url: url
  6.       type:GET
  7.       connection:zdocs
  8. ];

Similarly, this invoke URL task is used in the command execution handler and the function execution code. 

Command Suggestion Handler  

This handler is responsible for listing out the folders as suggestions. Take a look at the code snippet below!

  1. list = List();
  2. if(selections.size() == 0)
  3. {
  4. folders = invokeurl
  5. [
  6. url :" https://apidocs.zoho.com/files/v1/folders"
  7. type :GET
  8. connection:"zdocs"
  9. ];
  10. folders.remove(0);
  11. //info folders;
  12. for each  folder in folders
  13. {
  14. entry = {"title":folder.get(0).toMap().get("FOLDER_NAME"),"id":folder.get(0).toMap().get("FOLDER_ID")};
  15. //info entry;
  16. foldername = entry.get("title");
  17. info foldername;
  18. if(foldername.contains(arguments))
  19. {
  20. list.add(entry);
  21. }
  22. }
  23. entry1 = Map();
  24. entry1.put("title","Default Folder");
  25. list.add(entry1);
  26. }
  27. return list;


Command Execution Handler

The command is executed to display a list of files present under the selected folder. Enabling the Click to Execute option directly triggers command execution. 

Function Execution Code

Our aim for the button function here is to share the file when the user clicks the 'Share' button! 

The command execution and function execution codes are attached below. Download them and let us know how this command helped you.

Oh and also, check this post  on how Zoho Creator and Cliq come together to make the /poll command work! 

Links to Refer: 

Help guide: Commands Suggestions

Zoho Docs APIs: Zoho Docs API List

Suggestions and discussions are welcome! 

Best, 
Manasa 
Cliq  


    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
                                                • Sticky Posts

                                                • Automating Employee Birthday Notifications in Zoho Cliq

                                                  Have you ever missed a birthday and felt like the office Grinch? Fear not, the Cliq Developer Platform has got your back! With Zoho Cliq's Schedulers, you can be the office party-cipant who never forgets a single cake, balloon, or awkward rendition of
                                                • Convert a message on Cliq into a task on Zoho Connect

                                                  Message actions in Cliq are a great way to transform messages in a conversation into actionable work items. In this post, we'll see how to build a custom message action that'll let you add a message as a task to board on Zoho Connect. If you haven't created
                                                • Cliq Bots - Post message to a bot using the command line!

                                                  If you had read our post on how to post a message to a channel in a simple one-line command, then this sure is a piece of cake for you guys! For those of you, who are reading this for the first time, don't worry! Just read on. This post is all about how
                                                • Cliq Bots - How to make a bot respond to your messages?

                                                  Bots are just like your buddies with whom you can interact. They carry out your tasks, keep you notified about your to-dos and come in handy when you need constant updates from a third party application.  So, how can you make your bot respond to a message? The bot message handler is a piece of code triggered when a message is sent to the bot. Message handlers help you customise your bot responses to make it look conversational. The message input from the user can be either a string or an option selected
                                                • Cliq Bots - Get notifications about any action on an application with the incoming webhook handler!

                                                  Webhooks can be used to get notified about events happening in other applications inside Cliq. All bots in Cliq have their own incoming webhook endpoint. This makes it simple to post messages to the bot from external applications. Unlike the send message


                                                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 Campaigns 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

                                                                                                  • Noto Sans numericals appearance changed?

                                                                                                    Before the update on Christmas the numbers looked a little skinnier and in my opinion it looked really nice. Why did it change?
                                                                                                  • Allow Multiple Scheduled Appointments with Zoho Support

                                                                                                    Dear Zoho Team, I hope you're doing well. First, thank you for introducing the option to schedule support calls via the Zoho CRM booking link. This has been a fantastic enhancement, eliminating the need for back-and-forth coordination when scheduling
                                                                                                  • Power of Automation :: Automatically close the associated tasks once the Issues are closed

                                                                                                    Hello Everyone, A Custom Function is a user-written set of code to achieve a specific requirement. Set the required conditions needed as to when to trigger using the Workflow rules (be it Tasks / Project) and associate the custom function to it. We have
                                                                                                  • Meeting vs Zoom and why we are moving

                                                                                                    Dear Meeting team,                                   I want to share my thoughts on Meeting vs Zoom and explain why we are moving back to Zoom for all our video conferencing, even though it is part of our Zoho One Subscription. 1). Video & Audio quality - We see a significant downgrade in video quality when using Meeting vs Zoom, even when using the same internet connections.  Meeting video is blurry and not sharp compared to Zoom.  Audio is also hit and miss on Meeting with frequent drop outs and
                                                                                                  • Functions - How to pass Dynamic Parameters / Arguments?

                                                                                                    I am trying to create a generic function that I can use to update a given field with the name of the user and a given field with a datetime. The purpose of this is to have a history of major actions within the CRM record itself so it is easier to query
                                                                                                  • Import from GoHighLevel to Zoho CRM

                                                                                                    Has anyone been successful with this? I don't want to integrate with GoHighLevel just import/migrate everything over to Zoho
                                                                                                  • booking link that expires

                                                                                                    I have a suggestion that is  crucial. When i send booking URL to clients they keep the link and they book appointment whenever they want multiple times. You should give us the Booking URL feature. We should be able to send it and the user can use it only
                                                                                                  • Locking Certain Feilds

                                                                                                    Hello! I was wondering if there was a way to lock certain fields from being changed until another field had been filled in. For example, my origination has a chain of blueprints that have to be filled in for someone to properly convert from the "Leads"
                                                                                                  • Webform & spam

                                                                                                    Hi, We set up 2 webform on our website, fowarding the content to Zoho CRM. Since it has been opened up, we are getting lot of spam message (for now about 20 a day). To lower the  amount of false new leads we added the captcha field and new enquieries are send to the Approval Leads list. However we still get some spam. Is there any "anti spam" mechanism built in Zoho CRM, or how is the best way to avoid these kind of spam ? Thanks
                                                                                                  • US to EU Data Migration done / Workflows and Custom Functions stopped working

                                                                                                    Hello, I need help to restore my workflow rules and custom functions to work. My data was transferred from the US to the EU (Data center migration). Now all Workflow Rules and Custom Functions not working. I have no idea how to restore them to work again.
                                                                                                  • Accessing Subform Data using getRecordByID

                                                                                                    I am getting data from Zoho Creator using deluge zoho.creator.getRecordByID task, from another application. The report contains a subform, and that subform is in the detail view of the report. I do not appear to have any subform data in the JSON response,
                                                                                                  • Track Contact's Employment/Account History

                                                                                                    Thank you in advance for all of your help! Is there a way, within Zoho, to keep track of a contact's employment history? For example, if John Doe is my contact at Account 1, but leaves the company and is hired by Account 2, can I... ...maintain John Doe as a former employee under Account 1, while simultaneously listing him as a current employee of Account 2? ...view John Doe's employment history on his contact page in addition to the account he is currently associated with? I'm sure there is a way
                                                                                                  • Pre-fill TO and CC fields for Email Templates

                                                                                                    This would be a game changer to be able to set either specific email addresses or merge fields based on deal role titles into email templates. Please pass this along to *hopefully* add to future features of Zoho CRM.
                                                                                                  • Leads and Deals Issue

                                                                                                    Hi! Is Zoho having trouble today? I've been experiencing issues today. When I move a deal to closed/won, it previously would require a closing date but today the screen just went blur and the closing date did not pop up. And then under leads, I was trying
                                                                                                  • 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.
                                                                                                  • How do I hide all leads from Standard users in my CRM ZOHO

                                                                                                    I want to configure my crm zoho in such a way that standard users will only see leads owned or assigned to them. How do I go about doing this? I have tried all i could, but nothing...can anyone help me?
                                                                                                  • Custom view for Milestones

                                                                                                    Hi, Just an idea for the future... would it be possible to create custom views for the Milestones view under Work Overview ? I usually need to look at this view filtered by project group but the filter doesn't remain when navigating away. A custom view
                                                                                                  • attributed automatically database section

                                                                                                    Hello everyone and happy holidays... here in zoho CRM, I created 3 bases: - Properties (House, apartment ...) - Transactions (Notaries, ...) - Real estate ads I want when the address is identical on these three bases, that in "Properties" the transactions
                                                                                                  • How to Implement Time-Based Filters in Zoho Workflows?

                                                                                                    Hi everyone, I’m looking for a workaround to implement time-based filters in Zoho workflows. Specifically, I need a workflow to trigger only within certain hours (e.g., between 10:00 AM and 8:00 PM, Sunday to Friday). Currently, Zoho workflows execute
                                                                                                  • is there a better way to routinely export my project timesheets?

                                                                                                    Hi there, I am somewhat happy with how Zoho books handles time.  One thing that is missing is more user driven control over my data.  I have a workflow where I constantly need to give customers feeds of work done.  So I pick a project, and would ideally
                                                                                                  • Portal Default View

                                                                                                    Hello! My company is about roll out portals for some users, but we were wondering if it was possible to set the Record Detail Page View to default to a custom view that we made. That way the information they need would be streamlined and easier to see.
                                                                                                  • Zoho Books API Limit Is RIDICULOUS!!!!!!!!!!!!!

                                                                                                    The 2,500 API call limit in Zoho Books is about as useful as AOL dialup.  Seriously Zoho, not only can I use up 2,500 API calls in no time with my own app but YOUR OWN STUPID IPAD APP blows through them super fast too, so if any one of my clients wants
                                                                                                  • Unlocking New Horizons: A Year in Review

                                                                                                    As we bid farewell to 2024, let's celebrate and revisit the key highlights of the year. From adding a new edition to cross-platform enhancements, here’s a roundup of all the feature updates designed to simplify accounting, optimize financial management,
                                                                                                  • Does zoho rest api support token exchange from microsoft entra id token

                                                                                                    i want to get access token from the Microsoft user token in rest api. so it is possible to exchange microsoft user access token to zoho's access token or auth token ( token should be user specific not super admin).
                                                                                                  • Important: DKIM verification needed for unauthenticated email domains

                                                                                                    Hi all, This post is to inform users who are currently using unauthenticated email domains as their sender email for their notifications. We have mandated DKIM verification for all domains used as sender email addresses for the outgoing emails by 01-Jan-2025.
                                                                                                  • How do I define a weekend

                                                                                                    I noticed the default for weekends does not seem to include Saturdays. How can i define weekends to include both Saturdays and Sundays? Thank you.
                                                                                                  • Assistance Required: Custom Model Record Not Visible in Zoho CRM Sandbox

                                                                                                    Dear Team, I hope this message finds you well. I have created a custom model in the Zoho CRM Sandbox account and am currently adding records to it using Python. While I am able to fetch the module data programmatically through Python, I am unable to see
                                                                                                  • Custom Status for Purchase Orders

                                                                                                    Currently Zoho books has functionality to create custom statuses for Sales Orders. Can this be extended to include custom status for purchase orders as well? It was a great decision to add this functionality to sales orders. Our use case is for tracking
                                                                                                  • Remove Address from credit card payment

                                                                                                    I would like to remove the need to add address when paying by credit card. I only want the customer to have to add their credit card details.
                                                                                                  • Top Menu Disappeared from Blog Page

                                                                                                    Hi, Our top menu disappeared at Blog Posts page. However, it's still visible any other page on the website. I attached two screenshots, so it can be understood clearly. How can we bring back top menu? Thanks, K.
                                                                                                  • Subforms and automation

                                                                                                    If a user updates a field how do we create an automation etc. We have a field for returned parts and i want to get an email when that field is ticked. How please as Zoho tells me no automation on subforms. The Reason- Why having waited for ever for FSM
                                                                                                  • My Zoho mail has been blocked for suspicious activity. cannot unblock it! need urgent help!

                                                                                                    Hi, I was accessing my email on an airplane which for some reason resulted in my mail being blocked. I have managed to unblock my incoming however outgoing is still blocked. I have contacted all your support emails but it still says contact support when I try to unblock outgoing emails. Its now been over 8 days with the same issue which is really serious as I'm not able to send several business emails during this period. I have followed all your steps to unblock this and contacted your support 5
                                                                                                  • Copy Widget to another Dashboard

                                                                                                    I can see the option to clone a widget to the same dashboard but is it possible to copy it to another dashboard?
                                                                                                  • Error while importing products Purchase Price: Value in the field does not match with the data type supported by us.

                                                                                                    I am trying to import items into zoho inventory using an excel spreadsheet. I keep getting this error Purchase Price: Value in the field does not match with the data type supported by us. no matter how i format the cells this comes up and will not import
                                                                                                  • Quotes Module - import data

                                                                                                    Hello Zoho, is it possible to import Quotes records? I was trying and i have no results. Raport shows no data imported. Could you help me please how to do it?
                                                                                                  • Year-End Wrap: Disconnect now; Reconnect later with Offline Mode

                                                                                                    🎄Happy Holidays🎄 Let's say you are travelling home to spend the holiday season with your loved ones. Before you even board the train, you check your phone only to find your inbox rapidly filling with urgent emails that need your attention. There’s no
                                                                                                  • Exploring SalesIQ's Top Features of 2024: An Insider's Look 🔍

                                                                                                    As we wrap up another year at Zoho SalesIQ, it's time to reflect on how far we've come. This year has been incredible for us in our journey to build a more powerful, flexible, and customer-centric engagement platform. We've introduced several features
                                                                                                  • Resource booking functionality questions

                                                                                                    I'm exploring the resource booking functionality in Zoho Bookings for my organisation's needs. I have a few questions about the available Zoho Bookings functionalities. Is it possible to force all users to sign up for an account before they book a resource?
                                                                                                  • How to create a Field with answers as Yes, No> Further if no is selected a new field to be visible to give details

                                                                                                    Dear All, I am creating a feedback form in HR Letter. The question is were you satisfied with the work allotted. Expected answer to this is Yes, No. Further if the response is no, then a field to be give to fill more details as to why no was selected.
                                                                                                  • Modify the way a phone number is shown in footer on ZOHO Booking Page

                                                                                                    The default display of the phone number field in the footer is not customer friendly - See image below. We would like it to use the accepted standards of phone number display: +61 (0)2 88545440, or allow us to choose. At the moment ZOHO Booking sets how
                                                                                                  • Next Page