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
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!
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
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
Writer is a powerful online word processor, designed for collaborative work.