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




                                                  • Desk Community Learning Series


                                                  • Digest


                                                  • Functions


                                                  • Meetups


                                                  • Kbase


                                                  • Resources


                                                  • Glossary


                                                  • Desk Marketplace


                                                  • MVP Corner


                                                  • Word of the Day


                                                  • Ask the Experts



                                                            • Sticky Posts

                                                            • 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
                                                            • Unfurling Unlimited Possibilities in Zoho Cliq 🔗

                                                              Are you tired of your app links looking plain? Imagine if the shared links came to life with custom previews, organized data, and one-click actions, making chats more interactive. With the Cliq platform's unfurl handlers, let's see how developers can
                                                            • Let's build a dashboard with Cliq Widgets!

                                                              While juggling multiple tasks and tracking real-time data, you face a strict deadline for delivering a quarterly analysis report on a blank canvas while switching between different apps. Sounds exhausting, right? What if you could streamline everything
                                                            • 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
                                                            • Automate a CRM workflow with Zoho Cliq

                                                              Imagine having a virtual assistant that provides rapid updates to your team through Zoho Cliq, helping you stay on top of your sales processes. After returning from a client meeting filled with updates and action items, managing this information together


                                                            Manage your brands on social media



                                                                  Zoho TeamInbox 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

                                                                                                            • Hide Admin Only settings

                                                                                                              It would be nice if the setup menu items and settings weren't visible to non-admins. Seems like there is some confusion with users going through setup pages but not having permissions and getting an invalid permission error.
                                                                                                            • Native SMS Integration in Zoho Desk

                                                                                                              I’d like to request the addition of native SMS integration within Zoho Desk. While email and chat are still widely used, SMS has become a critical channel for fast, effective customer support, especially for urgent or time-sensitive issues. At the moment,
                                                                                                            • Zoho Desk - Feature Request - Add more social channels on Community user profile

                                                                                                              Hi Team, While updating my profile here I noticed that it is only possible to add Facebook and Twitter social links. 1. Please consider adding at least LinkedIn and if possible, other popular channels. 2. Please consider renaming Twitter field name to
                                                                                                            • Share Projects with Vendor Zoho Projects Portal

                                                                                                              I have a vendor/reseller of my services. They private label my services. My portal is branded. Can an individual project be "shared" or the data sync with another portal? I believe that this can be done with CRM.
                                                                                                            • Email template for customer notification on ticket reply is not being used

                                                                                                              I've set up an email template for notify contact up upon receiving a reply in ticket. When I send a reply to the ticket, it is not using that email template. It just sends a normal looking email. How do I make it so that the email template is being used?
                                                                                                            • Zoho Books - Sales Person Information

                                                                                                              Hi Team, On Invoices, Quotes, etc... I can include the Sales Person, but it only shows their name and not their email or phone number. It would be great to have place on invoice templates where we can manage what sales person information should be shows
                                                                                                            • Feature Request – Support for Stripe Direct Debit for Canadian Customers in Zoho Books

                                                                                                              I’d like to request support for Stripe Direct Debit as a payment option for Canadian customers within Zoho Books. Currently, while Stripe credit card payments are supported for Canadian businesses, there is no option to enable Direct Debit (ACH/EFT) through
                                                                                                            • Recurring Events Not Appearing in "My Events" and therefore not syncing with Google Apps

                                                                                                              We use the Google Sync functionality for our events, and it appears to have been working fine except: I've created a set of recurring events that I noticed were missing from my Google Apps calendar. Upon further research, it appears this is occurring
                                                                                                            • Zoho Desk blank page

                                                                                                              1. Click Access zoho desk on https://www.zoho.com/desk/ 2. It redirects to https://desk.zoho.com/agent?action=CreatePortal and the page is blank. Edge browser Version 131.0.2903.112 (Official build) (arm64) on MacOS
                                                                                                            • Timentry and Support Plan Relationship

                                                                                                              Timentry and Support Plan Relationship A customer can buy multiple products and request different SLAs and support plans for each product. We can enter different support plans and define the credit. The scenario I want to happen; - To reduce the credits
                                                                                                            • Issue with ticket replies via Slack: '+' symbols replacing spaces in emails

                                                                                                              Hello, support team! We're experiencing an issue when replying to tickets directly through Slack. When the reply is sent to the email, spaces are being replaced by '+' symbols. This makes the message harder to read and understand. Is there any solution
                                                                                                            • Allow 2 logos for Branding, one for Light Mode and one for Dark Mode?

                                                                                                              Our logo has a lot of black text on it. If we leave the background transparent, per recommendation of Zoho, when a user is viewing a file and turns on dark mode, our logo is not really visible and looks really weird. It would be really great if we could
                                                                                                            • Zoho Creator Populate radio field with values with all the created rows subfor

                                                                                                              I have Main Form where i have a lookup field where i get brewery names and the number of tanks as a multiline text field with a list of beer names Based Brewery selected and bbt_tanks number i create rows in the subform and now i want to populate list
                                                                                                            • Currency column showing $ symbol

                                                                                                              Hello, I'm importing data from Zoho Projects to Zoho Analytics and I was wondering why "Budget amount" column is set in dollars even if the "Currency" column = EUR: Is there a way to get the budget amount as "EUR" + nnnnnn? Thank you
                                                                                                            • Android notifications not working

                                                                                                              I've set push notifications to 'on' in ZohoMail for android settings but nothing doing. Can anyone help? I do use a VPN.
                                                                                                            • my clients are not receiving mails

                                                                                                              Hi, My clients are not receiving my mails sent . may we know the reason My dns server and imap settings are perfect
                                                                                                            • Múltiple Deals when converting a Lead

                                                                                                              Hello!!! I hope someone can help me figure out the best way to handle this scenario. I have a multi-select field named “Service” in the Leads module that captures either Service A, Service B, or both. When converting a lead, Zoho CRM currently creates
                                                                                                            • zoho mail and crm is very slow

                                                                                                              I have recently employed Zoho in our organisation. Even after taking high speed internet, mail and CRM takes many minutes to even load. Its really slow and faces lot of downtime.
                                                                                                            • How to use if_case with expressions other than equals

                                                                                                              I'm trying to define a formula column that implements logic like this case statement would: case when numfld1 is null then null when numfld2 > 0 then 100*numfld2 when numfld2 < 0 then numfld2 else 0.0 end In formula columns, the docs say you need to use
                                                                                                            • Zoho CRM's V8 APIs are here!

                                                                                                              Hello everyone!!! We hope you are all doing well. Announcing Zoho CRM's V8 APIs! Packed with powerful new features to supercharge your developer experience. Let us take a look at what's new in V8 APIs: Get Related Records Count of a Record API: Ever wondered
                                                                                                            • Create global project dashboard for all users

                                                                                                              Would like to be able to create a custom dashboard for projects with certain widgets that are default for all new projects.  right now, I have to modify each project dashboard per project per user.  This is not practical.  
                                                                                                            • Zoho Error: This Operation has been restricted. Please contact support-as@zohocorp.com for further details

                                                                                                              Hello There, l tried to verify my domain (florindagoreti.com.br) and its shows this error: This Operation has been restricted. Please contact support-as@zohocorp.com for further details. Screenshot Given Below -  please check what went wrong. Thanks
                                                                                                            • What's New in Zoho Inventory | January - March 2025

                                                                                                              Hello users, We are back with exciting new enhancements in Zoho Inventory to make managing your inventory smoother than ever! Check out the latest features for the first quarter of 2025. Watch out for this space for even more updates. Email Insights for
                                                                                                            • Inline images are not shown on iPhone

                                                                                                              When I add an image inline it gets displayed on a Zoho's computer software or web browser, but not on Zoho's iPhone app - the image appears to be broken and cannot be copied neither saved. What's the problem with displaying images inline when reading
                                                                                                            • Kaizen #186 : Client Script Support for Subforms

                                                                                                              Hello everyone! Welcome back to another exciting Kaizen post on Client Script! In this edition, we’re taking a closer look at Client Script Support for Subforms with the help of the following scenario. " Zylker, a manufacturing company, uses the "Orders"
                                                                                                            • Viewing Live data

                                                                                                              Where can I see the live data that is sent from the device?
                                                                                                            • "In Zoho CRM, during the Blueprint transition to the QC stage, I want to make the 'Packing Proof' image field mandatory."

                                                                                                              @Dr Saurabh Joshi @Haiku Technical Support @Ishwarya SG @Sparrow Hill President @Hugh Marshall "In Zoho CRM, during the Blueprint transition to the QC stage, I want to make the 'Packing Proof' image field mandatory."
                                                                                                            • Canvas templates can now be shared with different CRM organizations

                                                                                                              ----------------------------------------Moderated on 14th February, 2023------------------------------------------- Dear all, This feature is now open for all users in all DCs. To learn more about importing and exporting canvas templates, read our help
                                                                                                            • Formatting Mailing Labels

                                                                                                              I want to use the "Print Mailing Labels" function on the drop down list, but I am not seeing a way to change the formatting on the mailing labels. At the moment, the information that appears on the mailing labels ARE NOT mailing addresses, but random information.  I would also like to change be able to change the size of the labels.  At the very least I would like to know what type of labels I can get that would be the correct size.  
                                                                                                            • CRM to Writer Mail Merge Preview not working

                                                                                                              When performing a mail merge from CRM to writer the preview function does not work. I get the following error. I am a Zoho one user on a ChromeOS. I have been successfully using mail merge from CRM to Writer about 4 years. This error seemed to coincide
                                                                                                            • Best practice : when to convert lead to Deal

                                                                                                              Hello, I'm new to Zoho and run my own business. To make sure I'm using Zoho correctly, when do I press convert, from Lead to Deal, at what stage in the conversion funnel/conversation. I want to make sure I can a) monitor status of all pending lead or
                                                                                                            • Show Call History During a Blueprint Transition in Leads Module

                                                                                                              Hi all, I have a Blueprint set up in the Leads module with a transition to Reattempt Call, which updates the lead status to Attempted Contact. I’d like to know if there’s a way to show the call history or at least a summary of how many call attempts have
                                                                                                            • How do I filter contacts by account parameters?

                                                                                                              Need to filter a contact view according to account parameter, eg account type. Without this filter users are overwhelmed with irrelevant contacts. Workaround is to create a custom 'Contact Type' field but this unbearable duplicity as the information already
                                                                                                            • How to delete more than 100 leads at a time.

                                                                                                              We are a call center and we need to upload fresh leads daily.  Is there any way to delete all leads only at once.  Currently we are deleting 100 at a time. Please anyone who can help. Thank you.
                                                                                                            • The Next Chapter for CRM for Everyone: Moving from Early Access to Phased Rollout for Customers

                                                                                                              #CRM25Q1 Hello Everyone, Until now, CRM for Everyone has been available in early access mode exclusively for users who opted to try the new version. We are now transitioning to a phased release, starting with the basic edition. We are thrilled to announce
                                                                                                            • Canvas for related lists

                                                                                                              Hey, we would like to customize our related lists. For us, it would make more sense to present the data from an assigned record vertical instead of horizontal. Can we get a related list Canvas view?
                                                                                                            • Standalone custom function not generating logs

                                                                                                              Why dont't standalone custom functions generate logs when the're called from another function? I have some functions (workflow, buttons and blueprint) that have common parts, so I put that part in a standalone function which is called from the others.
                                                                                                            • Show Zoho Books Retainer Invoice in Zoho CRM

                                                                                                              Hi Support, How can I get Retainer Invoices created in Zoho Books to show in Zoho CRM? If a sales person needs to collect an upfront deposit, they should be able to see that the retainer invoice has been created and paid. Thanks, Ashley
                                                                                                            • Feature Request - Zoho Books - Add Retainer Invoices to CRM/Books integration

                                                                                                              Hi Books Team, My feature request is to include Retainer Invoices in the finance suite integration with Zoho CRM. This way we will be able to see if retainer invoices have been issued and paid. I have also noticed that when the generate retainer invoice
                                                                                                            • ACR Phone mobile app for logging phone calls into Zoho CRM

                                                                                                              ACR Phone is an Android app recording voice calls with additional features such as blacklist, cloud upload, call log and more. Use the ACR Phone extension for Zoho CRM to generate Leads and Contacts with the voice recording attached right after your phone
                                                                                                            • Next Page