The Slash Command Series - Build a command to create polls!

The Slash Command Series - Build a command to create polls!

Your team has decided to go for lunch and you're in charge of the menu. But before you decide on the menu, it's important to know their preferences. For instance, what if somebody is vegan and you haven't taken that into account!

Now now, we know hard it is to arrange the menu for a small group of 4, let alone for 50.   How can Cliq help this situation you may ask? Ah, simple. Create a poll using Cliq's slash commands!

With /poll command you can just post a message in channel, ask everybody to vote and get the list. The /poll command  helps you collect data, interpret, analyze and make a decision. Let's take a look at the command workflow, it's pretty easy. :D  

Command Workflow  

The command syntax would be   /poll -topic" " - optn " " 

The user would have to just specify the question (topic) and options in the command syntax and execute the command in a chat window. A poll message card is posted with the question and the options as buttons. Now, to wait for everybody to take their pick! 

The poll question and the options are stored as records in Zoho Creator and when an option is chosen, the selection made is also stored as a record.

To put it in a nutshell, this command is a classic example of multiple workflows and integration with other Zoho Products ( i.e Zoho Creator) 

Now there are four parts to the command execution- three in Cliq and one in Creator. Breaking down the command creation and execution  

Store the questions and results - Creator Application 

  • Create an application in Zoho Creator - Refer this  How to create an application help page in Zoho Creator. 
  • Create two forms - for Poll Questions and one for the Poll Results with the necessary fields. 
  • Use the zoho.creator.createRecord task and zoho.creator.getRecord task in your command and function execution code to create and get records from Creator.  Refer this  help page  

Sample Syntax for the create record task :

 

zoho.creator.createRecord("ownerName","appLinkName","formLinkName",dataMap,"connectionLinkNam", userAccess )

 

Get the owner name, appLinkName and formLinkName from the creator application URL. 

 

URL Format:  https://app.zohocreator.com/ownerName/appLinkName#formLinkName

 

Sample URL:  https://app.zohocreator.com/scottfisher5/poll-command#Questions

 

Note: We've attached a sample Poll application file for you. Download and import this file in your creator account to get an idea of the Poll application. 

Connect to the storage - Cliq Connections (authenticated)

Connections are used to integrate your application with other Zoho Applications or Third Party Web Services in an authenticated manner. 

Create a connection to invoke operations on the Creator Application from Cliq, using Cliq Platform. Use the connectionLinkName and define the userAccess parameter in the creator deluge tasks. 

Share the poll with  a group - Cliq commands 

Create a poll command and specify the command parameters. Command parameters will help fetch the question and the options given by the user in the poll. 

The command execution code is attached here. Copy the code in your deluge editor and try executing the command!


  1. message = Map();
  2. card = Map();
  3. card.put("theme","poll");
  4. b = options.get("Topic");
  5. a = options.get("Optn");
  6. buttonnames = a.toList(",");
  7. info buttonnames.size();
  8. card.put("title","POLL");
  9. message.put("text",b);
  10. dataMap = {"Question":options.get("Topic"),"Answers":options.get("Optn"),"Creator":user.get("email")};
  11. respFromCreator = zoho.creator.createRecord("ownerName","appLinkName","formLinkName",dataMap," connectionLinkName ",  
  12. userAccess );
  13. creatorId = respFromCreator.get("values").get("ID");
  14. buttons = List();
  15. for each  name in buttonnames
  16. {
  17. button = {"label":name,"hint":"Choose an option.","type":"+","action":{"type":"invoke.function","data":{"name":"FunctionName","owner":"yourname@yourdomain.com"}},"key":creatorId};
  18. buttons.add(button);
  19. }
  20. info buttons;
  21. if(buttons.size() > 0)
  22. {
  23. button = {"label":"View Result","hint":"Select an option.","type":"+","action":{"type":"invoke.function","data":{"name":"FunctionName","owner":"yourname@yourdomain.com"}},"key":creatorId};
  24. buttons.add(button);
  25. }
  26. info creatorId;
  27. card.put("thumbnail","<insert_image_url>");
  28. message.put("card",card);
  29. message.put("buttons",buttons);
  30. message.put("card",card);
  31. //aa = zoho.cliq.postToChat(chat.get("id"),message);
  32. info message;
  33. return message;

Variables used in the code

Line no 12: You'll find these in your creator application URL

Line no 18 & 24: Give your function name and email ID.

Poll Votes and Results - Cliq Buttons and Functions

  Functions work in association with buttons. Our aim for the function here should be  

  • To allow users to select an answer and store the selection in Creator.
  • To get the list of all answers for the poll when a user clicks the 'View Result' button.
  • To restrict users from answering a poll more than once. 

When a user clicks the 'View Result' option, the function will get records from Creator to display the total number of responses received for the poll. (u se the button name as the criteria for this)

Likewise, when a user tries responding to the poll twice, use the parameter 'Key' to identify if the user has already responded. If yes, then go ahead and show an error message. If no, take the user's response to the poll. 

That sure was a lengthy read. Well, have a look at this video for better understanding! 

So what are you waiting for? Go on and create a poll! Let us know how this command helps you and your team. 

If you're new here, welcome! Take a look at our slash command guide . You can also learn how to connect to accuweather.com and get weather forecast right inside your chat window. Cool right? Then, check this out !

Questions and discussions are welcome!

Until next time,

Manasa

Cliq


 

 

    Access your files securely from anywhere







                            Zoho Developer Community





                                                  Use cases

                                                  Make the most of Zoho Desk with the use cases.

                                                   
                                                    

                                                  eBooks

                                                  Download free eBooks and access a range of topics to get deeper insight on successfully using Zoho Desk.

                                                   
                                                    

                                                  Videos

                                                  Watch comprehensive videos on features and other important topics that will help you master Zoho Desk.

                                                   
                                                    

                                                  Webinar

                                                  Sign up for our webinars and learn the Zoho Desk basics, from customization to automation and more

                                                   
                                                    
                                                  • Desk Community Learning Series


                                                  • Meetups


                                                  • Ask the Experts


                                                  • Kbase


                                                  • Resources


                                                  • Glossary


                                                  • Desk Marketplace


                                                  • MVP Corner




                                                            • 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
                                                            • Accelerate Github code reviews with Zoho Cliq Platform's link handlers

                                                              Code reviews are critical, and they can get buried in conversations or lost when using multiple tools. With the Cliq Platform's link handlers, let's transform shared Github pull request links into interactive, real-time code reviews on channels. Share
                                                            • App Spotlight : PagerDuty for Zoho Cliq

                                                              App Spotlight brings you hand-picked apps to enhance the power of your Zoho apps and tools. Visit the Zoho Marketplace to explore all of our apps, integrations, and extensions. In today's fast-paced world, seizing every moment is essential for operational
                                                            • Automate your status with Cliq Schedulers

                                                              Imagine enjoying your favorite homemade meal during a peaceful lunch break, when suddenly there's a PING! A notification pops up and ruins your moment of zen. Even worse, you might be in a vital product development sprint, only to be derailed by a "quick
                                                            • Bulk user onboarding for Cliq Channels in a jiffy

                                                              As developers, we frequently switch between coding, debugging, and optimizing tasks. The last thing we want is to be burdened by manual user management. Adding users one by one to a channel is tedious and prone to errors, taking up more time than we could


                                                            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

                                                                                                            • Add Zoho Forms to Zoho CRM Plus bundle

                                                                                                              Great Zoho apps like CRM and Desk have very limited form builders when it comes to form and field rules, design, integration and deployment options. Many of my clients who use Zoho CRM Plus often hit limitations with the built in forms in CRM or Desk and are then disappointed to hear that they have to additionally pay for Zoho Forms to get all these great forms functionalities. Please consider adding Zoho Forms in the Zoho CRM Plus bundle. Best regards, Mladen Svraka Zoho Certified Consultant and
                                                                                                            • In the Zoho Creator Customer Payment form i Have customer field on select of the field Data want to fetch from the invoice from based on the customer name In the Customer Payment form i Have subf

                                                                                                              In the Zoho Creator Customer Payment form i Have customer field on select of the field Data want to fetch from the invoice from based on the customer name In the Customer Payment form i Have subform update Invoice , there i have date field,Invoice number
                                                                                                            • Signup forms behaviour : Same email & multiple submissions

                                                                                                              My use case is that I have a signup form (FormA) that I use in several places on my website, with a hidden field so I can see where the contact has been made from. I also have a couple of other signup forms (FormB and FormC) that slight differences. All
                                                                                                            • Sync CRM inventory data with Zoho Books

                                                                                                              I just switched everything over to ZoHo books, but I am trying to find out why the CRM Estimates, Invoices, and Sales Orders created in ZoHo CRM are not then duplicated in ZoHo Books? I had Quickbooks before, and had to do everything twice, I thought
                                                                                                            • mask Customer phone number and agents cant see customer phone number

                                                                                                              Is there any way we can integrate Zoom Phone with Zoho CRM while ensuring that customer phone numbers remain masked? We need a solution where agents can make outbound calls but cannot see customer phone numbers. Please let us know if there is any solution
                                                                                                            • Bigin: filter Contacts by Company fields

                                                                                                              Hello, I was wondering if there's a way to filter the contacts based on a field belonging to their company. I.e.: - filter contacts by Company Annual Revenue field - filter contacts by Company Employee No. field In case this is not possibile, what workaround
                                                                                                            • Has Zoho changed the way it searches Items?

                                                                                                              Right now all of our searches have broken and we can no longer search using the SKU or alias. It was fine last night and we came in this morning to broken.....this is impacting our operations now.
                                                                                                            • Refunds do not export from Shopify, Amazon and Esty to Zoho. And then do not go from Zoho inventory to Quickbooks.

                                                                                                              I have a huge hole in my accounts from refunds and the lack of synchronisation between shopify , Amazon and Etsy to Zoho ( i.e when I process a refund on shopify/ Amazon or Etsy it does not come through to Zoho) and then if I process a manual credit note/
                                                                                                            • CRM->INVENTORY, sync products as composite items

                                                                                                              We have a product team working in the CRM, as it’s more convenient than using Books or Inventory—especially with features like Blueprints being available. Once a product reaches a certain stage, it needs to become visible in Inventory. To achieve this,
                                                                                                            • Is there a way to set Document Owner/Sender via the API

                                                                                                              When sending requests for zoho sign, it would seem zoho uses the id of the person that created the zoho api cred to determine the owner_id, is there a way to set a default for this?
                                                                                                            • Monthly timesheet, consolidation of time by project

                                                                                                              I have time logs for various jobs for project. Is it possible to consolidate the time spent for each job, when I am generating a timesheet for a month? I am getting the entries of jobs done on each day when I generate a timesheet for a month For example
                                                                                                            • Sending emails from an outlook account

                                                                                                              Hi, I need to know if it's possible to send automatic emails from an Outlook account configured in Zoho CRM and, if so, how I can accomplish that. To give you some context, I set up a domain and created a function that generates PDF files to be sent later
                                                                                                            • Is there a way to associate an email in ZOHO Main to a Vendor record in ZOHO CRM

                                                                                                              My situation is as below, I have a vendor in ZOHO CRM lets say "Vend A" and an associated contact, "Cont A" If Cont A sends me an email using the email I've registered in the contact record the standard OOTB email sync will work. But the vendor has some
                                                                                                            • Struggling with stock management in Zoho CRM – is Zoho Inventory the solution?

                                                                                                              My biggest pain point today with Zoho is inventory management. I run a retail business and reliable stock management is absolutely critical. Obviously, I need this inventory to be visible inside the CRM. At first, I tried handling it through custom modules
                                                                                                            • How can I track which zoho users are actively using Zoho CRM

                                                                                                              I have several licenses of Zoho CRM. We now need to add a new user. I could purchase a new license, but before I do, I would like to see if any of our existing users are not actively using the license assigned to them. How can I determine the activity
                                                                                                            • Automating CRM backup storage?

                                                                                                              Hi there, We've recently set up automatic backups for our Zoho CRM account. We were hoping that the backup functionality would not require any manual work on our end, but it seems that we are always required to download the backups ourselves, store them,
                                                                                                            • Nimble enhancements to WhatsApp for Business integration in Zoho CRM: Enjoy context and clarity in business messaging

                                                                                                              Dear Customers, We hope you're well! WhatsApp for business is a renowned business messaging platform that takes your business closer to your customers; it gives your business the power of personalized outreach. Using the WhatsApp for Business integration
                                                                                                            • can't login Kiosk URGENT

                                                                                                              already try, can't login pls help to support. thanks.
                                                                                                            • Zoho Calendar not working since a few days

                                                                                                              Hey there, first off a minor thing, since I just tried to enable the Calendar after reading this in another topic (there was no setting for this though) : For some reason my current session is showing me based in New York - I'm in Germany, not using a
                                                                                                            • Introducing Connected Records to bring business context to every aspect of your work in Zoho CRM for Everyone

                                                                                                              Hello Everyone, We are excited to unveil phase one of a powerful enhancement to CRM for Everyone - Connected Records, available only in CRM's Nextgen UI. With CRM for Everyone, businesses can onboard all customer-facing teams onto the CRM platform to
                                                                                                            • Granular Email Forwarding Controls in Zoho Mail (Admin Console and Zoho One)

                                                                                                              Hello Zoho Mail Team, How are you? At present, the Zoho Mail Admin Console allows administrators to configure email forwarding for an entire mailbox, forwarding all incoming emails to another address. This is helpful for delegation or backup purposes,
                                                                                                            • 【Zoho CRM】CRM for Everyoneに関するアップデート:関連データ機能

                                                                                                              ユーザーの皆さま、こんにちは。コミュニティチームの中野です。 今回は「Zoho CRM アップデート情報」の中から、CRM for Everyoneの新機能「関連データ機能」をご紹介します。 関連データ機能は、あるタブのデータを別のタブに柔軟に関連付け、異なるタブで管理されている情報を1か所にまとめて表示できます。 たとえば、組織タブとチームタブのデータを関連付けることで、必要な情報に効率よくアクセスでき、顧客理解を深めながら他チームとの連携もスムーズに行えます。 目次 1. 関連データの設定方法
                                                                                                            • Email Reminders on Shared Calendars

                                                                                                              How do we turn off the setting that emails reminders to everyone who has accepted or declined a calendar invite? If 8 of us have been invited to the same meeting, we receive 8 notifications for every step of the process, from invitation to decision.
                                                                                                            • Inventory to Xero Invocie Sync Issues

                                                                                                              Has anyone had an issue with Invoices not syncing to Xero. It seems to be an issue when there is VAT on a shipping cost, but I cannot be 100% as the error is vague: "Unable to export Invoice 'INV-000053' as the account mapped with some items does not
                                                                                                            • How to activate RFQ? What if a price list has ladder price for items?

                                                                                                              Where can I find the option to activate request for quotation? How does it work? If the item has ladder price, does it gets calculated depending on how many items are in the cart?
                                                                                                            • Usar o Inventory ou módulo customizado no CRM para Gestão de Estoque ?

                                                                                                              Minha maior dor hoje em usar o zoho é a gestão do meu estoque. Sou uma empresa de varejo e essa gestão é fundamental pra mim. Obviamente preciso que esse estoque seja visível no CRM, Inicialmente fiz através de módulos personalizados no próprio Zoho CRM,
                                                                                                            • How to refresh a ticket view ?

                                                                                                              I am doing a widget where I send a rest api call to make a new draft to the ticket I am viewing. The issue is sometimes it refresh a ticket view and I can see inserted draft right away, but sometimes I do not see it even if it is inserted correctly and
                                                                                                            • Cannot access KB within Help Center

                                                                                                              Im working with my boss to customize our knowledge base, but for some reason I can see the KB tab, and see the KB categories, but I cannot access the articles within the KB. We have been troubleshooting for weeks, and we have all permissions set up, customers
                                                                                                            • Automation #15: Automatically Adding Static Secondary Contacts

                                                                                                              Rockel is a top-tier client of Zylker traders. Marcus handles communications with Rockel and would like to add Terence, the CTO of Zylker traders to the email conversations. In this case, the emails coming from user address rockel.com should have Terence
                                                                                                            • Track Zoho Campaign and Workflow sales impact

                                                                                                              I am attempting to measure the performance of our marketing workflows and campaigns by comparing the date each campaign was sent to a contact with the purchase date of the contact. For example, if Contact A was sent Email A on 9/1 and made a purchase
                                                                                                            • Can't join canal Developers Zoho User

                                                                                                              Hello, I received an invitation to join this channel, but I get an error when I try to join it, and I get the same error when I go to the Zoho Cliq interface > Search for a channel. Is this because I don't have a license linked to this email address?
                                                                                                            • Desk Email reply - set default font / use custom font

                                                                                                              Hello, in our e-mails, which we send to our customers, a certain font must be used (Corporate Design): Segoe UI https://en.wikipedia.org/wiki/Segoe#Segoe_UI How can this be included? How can this be set as the default font to ensure that this font is
                                                                                                            • Zoho CRM's custom views are now deployable from sandboxes

                                                                                                              This feature is now available for users in the AU, JP, and CN DCs. New update: This feature is now available for users in CA and SA DCs. Hello everyone, We're excited to announce that you can now deploy custom views from sandboxes to your production environment
                                                                                                            • Zoho Devops

                                                                                                              We have a Zoho one account which we have integrated with an SAS educational product, sold on a subscription model, using webhooks and API calls. We make some use of custom fields and cross module lookups and relationships. We utilize CRM, Books and billing
                                                                                                            • Generate a link for Zoho Sign we can copy and use in a separate email

                                                                                                              Please consider adding functionality that would all a user to copy a reminder link so that we can include it in a personalized email instead of sending a Zoho reminder. Or, allow us to customize the reminder email. Use Case: We have clients we need to
                                                                                                            • Settings Icon No Longer in ZOHO Desk?

                                                                                                              In ZOHO desk, there has been a gear icon for settings. as of yesterday, it is no longer there. I showed up briefly this morning but is gone again. Anybody else experiecing this?
                                                                                                            • How to display historical ticket information of the total time spent in each status

                                                                                                              Hi All, Hoping someone can help me, as I am new to Zoho Analytics, and I am a little stuck. I am looking to create a bar chart that looks back over tickets raised in the previous month and displays how much time was spent in each status (With Customer,
                                                                                                            • Introducing the all-new email parser!

                                                                                                              Greetings, We are pleased to introduce to you, a brand-new, upgraded version of the Zoho CRM Email Parser, which is packed with fresh features and has been completely redesigned to meet latest customers needs and their business requirements. On that note,
                                                                                                            • Tables for Europe Datacenter customers?

                                                                                                              It's been over a year now for the launch of Zoho Tables - and still not available für EU DC customers. When will it be available?
                                                                                                            • Tip #43 - Track, Review, and Analyze Your Assist Sessions with Reports-'Insider Insights'

                                                                                                              Did you know you can generate detailed reports for both remote support sessions and unattended access sessions in Zoho Assist? This makes it easy to monitor technician activity, measure efficiency, and review customer interactions. Let us now take a closer
                                                                                                            • Next Page