Context handler does not work on iPhone app. Crashes!

Context handler does not work on iPhone app. Crashes!

I've used the sample code from your help pages regarding the context handler and it consistently crashed the app.

It consistently crashes upon the second context input

code sample on the Context Handler page causes the iPhone app to crash.

I'm using iOS 11.2

When I iterate through the Room Service context it crashes after I choose "House Keeping" or "Maintenance"

https://www.zoho.com/cliq/help/platform/bot-contexthandler.html

==

Sample Message Handler Code
response = Map();
if(message.containsIgnoreCase("ROOM SERVICE"))
{
context = '{"id":"Room Service","timeout":"300","params":[{"name":"room service","question":"Great! Here is a list of options for you to choose from.","suggestions": {"list":[{"text":"House Keeping"},{"text":"Maintenance"}]}},{"name":"time","question":"Okay cool. When can I send them over?","suggestions":{"list":[{"text":"Now"},{"text":"In half hour"}]}}]}'.toMap();
response.put("context",context);
}
else if(message.containsIgnoreCase("WIFI"))
{
context = '{"id": "Wifi", "timeout":"300","params":[{"name":"Wi-fi","question":"Confirm if you are in Room 307!", "suggestions":{"list":[{"text":"Yes"},{"text":"No"}]}}]}'.toMap();
response.put("context",context);
}
else if(message.containsIgnoreCase("CAB"))
{
context = '{"id": "Cab","timeout":"300","params":[{"name":"Cab","question": "When can I book the cab for you?","suggestions":{"list":[{"text":"Now"},{ "text": "After 1 hour"}]}}]}'.toMap();
response.put("context",context);
}
else
{
response = '{"text": "Hi! I am Lyte, the Room Service Bot. Heres what I can help you with! :happy!:", "suggestions":{"list":[{"text":"Room Service"},{"text":"Wifi"},{"text":"Cab"}]}}'.toMap();
}
return response;

Sample Context Handler Code
response = Map();
id = context.get("id");
params = context.get("params");
if(id.matches("Room Service"))
{
confirm = "Please check our other options then!";
if(params.get("confirmation").containsIgnoreCase("YES"))
{
// make api calls for the room service options
confirm = "Great! I've arranged for the " + params.get("room service").get("text") + "to be there " + params.get("time").get("text") + ". :thumbsup:";
}
response.put("text",confirm);
}
else if(id.matches("Wifi"))
{
txt = 'Please try again or call 0000 for more information!';
if(params.get("Wi-fi").containsIgnoreCase("YES"))
{
txt = 'Here is your wifi ID and password. \n ID - Room_307 \n Password - Hotel123';
}
response.put("text",txt);
}
else if(id.matches("Cab"))
{
txt = 'Your cab has been booked exactly one hour from now. Please meet the driver at the hotel lobby.';
if(params.get("Cab").containsIgnoreCase("NOW"))
{
txt = 'You Cab has been booked. Please meet the driver at the hotel lobby. :thumbsup:';
}
response.put("text",txt);
}
else
{
response.put("text","Context: " + context);
}
return response;

    Access your files securely from anywhere

        All-in-one knowledge management and training platform for your employees and customers.







                              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

                                                              • 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
                                                              • Automate attendance tracking with Zoho Cliq Developer Platform

                                                                I wish remote work were permanently mandated so we could join work calls from a movie theatre or even while skydiving! But wait, it's time to wake up! The alarm has snoozed twice, and your team has already logged on for the day. Keeping tabs on attendance
                                                              • Customer payment alerts in Zoho Cliq

                                                                For businesses that depend on cash flow, payment updates are essential for operational decision-making and go beyond simple accounting entries. The sales team needs to be notified when invoices are cleared so that upcoming orders can be released. In contrast,
                                                              • 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


                                                              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

                                                                                                Get Started. Write Away!

                                                                                                Writer is a powerful online word processor, designed for collaborative work.

                                                                                                  Zoho CRM コンテンツ




                                                                                                    Nederlandse Hulpbronnen


                                                                                                        ご検討中の方




                                                                                                                • Recent Topics

                                                                                                                • How To Change Open Activities View in Canvas?

                                                                                                                  Hi all, I want to have my open activities have this view, but I cannot see how to make it look this way in Canvas. Not only that, but there isn't a way to rearrange the Standard view in Canvas, either. What I want (this is in the Standard layout): What
                                                                                                                • Queries in Custom Related Lists

                                                                                                                  Hello everyone, We hope you’re having a great day! A while ago, we introduced Queries in Zoho CRM to help you dynamically fetch data from CRM modules or even external sources—right within your CRM interface. Many of you have already used Queries with
                                                                                                                • Mass emails - Allow preview of which emails will receive the email based on the criteria

                                                                                                                  Feature request. Please allow us to view and confirm the exact recipients of the mass emails based on the criteria we've chosen before sending. It can be quite sensitive if you send the mass email to some wrong accounts accidently, so it would be great
                                                                                                                • Customers not receiving emails

                                                                                                                  So, a little backstory, we have been using Zoho Forms for the past eight years. And when we initially started, we would have email notifications be sent from inside Zoho Forms after a submission. We recently started using Zoho CRM as we wanted a better
                                                                                                                • Sum Total of various fields in child module and add value to parent module field

                                                                                                                  Hi! Having trouble with a custom function, im trying to calculate the total of all the rent and sqm fields of our offices in Products module and have them transfer to the parent module Location. The API names are as below: Child module Products = "Products"
                                                                                                                • 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
                                                                                                                • Mails to Deals

                                                                                                                  Hi everybody. We are using ZOHO CRM connected to ZOHO Mail and we have a big trouble, which our ZOHO partner is not able to solve. Zoho CRM automatically connects received emails to last edited live Deal of the same Contact. For us this logic is very
                                                                                                                • ICICI Bank integration

                                                                                                                  Why the ICICI bank integration has been disabled? We opened the ICICI bank account only for integraton with Zoho. It is taking lot of time to do manual payments using file upload method. When will be the new ICICI bank integration enabled in India?
                                                                                                                • Google Drive

                                                                                                                  How to add more modules in google drive as I don't want Zoho space? TIA
                                                                                                                • Ajust quantities in another form based on subform, on form submission

                                                                                                                  Hello, I have an Order form with a LineItems subform. The LineItems subform has many lookups that import data from various other forms. I want to deduct the quantity offered in one of those other form, called Offer. In another application I used the following
                                                                                                                • Workdrive connection in Zoho CRM not working

                                                                                                                  Hi, in https://crm.zoho.com.au/crm/orgXXXXXX/settings/connections i have set up the connection for WorkDrive which is pretty much setting up the name and the scopes. But I get "WorkDrive API test response: {"errors":[{"id":"F7003","title":"Invalid OAuth
                                                                                                                • Best Way to Update Subscriber Preferences for an Existing List?

                                                                                                                  We currently have a mailing list of over 43,000 contacts in Zoho Campaigns, and we’re looking to segment our list based on subscriber content preferences—things like Free Webinars, Local Training, Store Specials, and New Product Announcements. We’d like
                                                                                                                • You are forced to store/manage custom functions redundantly | Any solutions?

                                                                                                                  Hello there, you are forced to store code (custom functions) redundantly if you want to use the same functionality in multiple departments. I don't understand that you can't define global functions. When I make a change to a function I may have to do
                                                                                                                • Integrating Zoho CRM with Quickbooks Enterprise?

                                                                                                                  Does anyone have any experience of integrating Zoho CRM with Quickbooks Enterprise?  The Zoho pages refer to the Quickbooks Premier edition, and I wanted to know if the same works with the Quickbooks Enterprise version.
                                                                                                                • in Desk - Why can't I find where to enable multi-branding?

                                                                                                                  I'm looking at the knowledge base article & it says to go to settings / general / rebranding / multi-branding. But there's no multi-branding there!
                                                                                                                • How to undo a reconciliation?

                                                                                                                  I need to update the "Expense Account" field on a bunch of expenses that I've already reconciled.  However, the system will not allow this field the be changed since it is reconciled.  I haven't found a way to remove the reconciliation status for the
                                                                                                                • Zoho support Can not send invitation email to portal user

                                                                                                                  I try to use Zoho support but have a problem. I don't know why. - When a customer sign up at the portal user they don't receive the invitation email. - When I go to contact manu, choose 1 user and click invite --> they don't receive the invitation email.
                                                                                                                • remove()function to remove characters

                                                                                                                  Hi there, I'm trying to use the remove function to remove characters from a variable. I have a Lead source that comes in as [Google] or [Facebook] etc. in Flow I need te to remove the square bracket. Tried a function that looks something like this: string
                                                                                                                • Sharing files without download option

                                                                                                                  Hi Team     We want to share folders and subfolder which has files(doc, .PPT , excel and PDF) in zoho Docs. When we share the directory to a member in the organization or external to the organization There are able to download. How do we prevent users from download. Regards Krishna V.K
                                                                                                                • Basic Lookup Field Update Function

                                                                                                                  Hi! So I have no idea what I'm doing in Deluge but I need to get a custom function to run On Create or Edit that sets the value of a Lookup Field based on the contents of another field. Seems simple enough, but I have looked through dozens of other similar
                                                                                                                • Weekly Tips: Schedule Your Emails with Zoho Mail

                                                                                                                  As a business, it is recommended to consider the best time to send an email, taking into account the recipient's time-zone or their work hours to have your email on top of their inbox. Sending an email when your recipient is most likely to check their
                                                                                                                • Data Source Request : More Zoho Marketing Automation and Zoho Pagesense

                                                                                                                  I'm currently trying to replicate the reports shown in ZMA for stats over time for individual forms. The reports exist only in ZMA, but I want to use in wider company presentations and can't find the relevant data in Analytics : Example I also note that
                                                                                                                • Zoho Mail - support email

                                                                                                                  Hi I sent an email to support more than 48 hours ago and still have not heard back! What's up? How long am I supposed to wait for a replay? Thanks
                                                                                                                • Syntax for <criteria> field in zoho.crm.searchRecords() function when the value to check against is a variable?

                                                                                                                  I want to search for records in the Tasks module whereby the value of a field (called field1) matches the value stored in a variable in the Deluge script (called variable1). From the sample code in https://www.zoho.com/deluge/help/crm/search-records.html,
                                                                                                                • Page - Gauge - Target Values

                                                                                                                  Is there a way to make the Target and Maximum values say a formula or query?  For example, total sales for the month = 109 and I want to make my gauge today's percentage.
                                                                                                                • Multiple Organizations w/Books

                                                                                                                  Does Zoho One allow for more than 1 organization in Zoho Books? I see my default company says "Zoho One Enterprise"next to it but another company says "Trial". We have one company, but multiple lines of business that we keep separate for various financial
                                                                                                                • LOST ALL NOTES AFTER SIGNING IN AGAIN

                                                                                                                  I lost all my notes which I prepared from long time after sigingout and signing in again
                                                                                                                • Outgoing Email Being Blocked

                                                                                                                  Hi, I have an email ID wherein the outgoing mail are being blocked the user get an email which is as follows: ----------------- Dear User, Mail Outgoing blocked. Reason :Mail rate exceeded limit However, we realize that this might have been unintentional.
                                                                                                                • Sending Email With SMTP python

                                                                                                                  Hi, I am trying to send email with stmplib python lib.  Code... server = smtplib.SMTP_SSL('smtp.zoho.com', 465) server.login('username','password') server.sendmail('from_mail','to_mail', 'message') server.quit() Log  send: 'ehlo [127.0.1.1]\r\n' reply:
                                                                                                                • Duplicating Forms doesn't duplicate Forms attachment path to workdrive

                                                                                                                  Hi, I have this user, who uses one forms and duplicates it when needed and update the content. For him, it's important to have the submission forms saved in a specific folder inside Workdrive (as this PDF is transmitted later to another team). However,
                                                                                                                • Company with ZohoOne, notebook ask to upgrade to collaborate in notecards.

                                                                                                                  Hello, we as a company have ZohoOne as our Zoho choice, but Zoho Notebook asks us to upgrade in order to collaborate in notecards, is this correct? Acording to what I've read in Zoho Notebook help, it should be included in ZohoOne, can you please clarify
                                                                                                                • How to reach the official Zoho Support channels and avoid fake ones.

                                                                                                                  Dear Customers, Thanks a lot for choosing Zoho! Our applications are built to help achieve your day-to-day business goals. We are committed to engaging with you, to understand and develop solutions that enhance your productivity.  We are happy and ready to help you use our services effectively. Understanding and avoiding fake support Just like using popular bank names and financial applications for phishing purposes, using Zoho and claiming to be providing Zoho Support or services with false numbers
                                                                                                                • Lost my notes

                                                                                                                  Hi while re installing the notebook app, I have lost 2 most important notes and I am not able to find them anywhere. Can you help. Those were very important for my businesses, it had all the important transaction info, and the other were my log ins. I
                                                                                                                • Unable to connect to smt servers.

                                                                                                                  Unable to connect to smtp.zoho.eu servers. Therefore, I cannot send emails via smtp.
                                                                                                                • Problem Pasting Into Notes

                                                                                                                  Occasionally I want to create a note by copying and pasting a few paragraphs from an article on line. When I create a new note and paste in the section the newly created note winds up with each paragraph in white text on a dark background rather than
                                                                                                                • Not receive mail

                                                                                                                  I just made my Zoho mail but I cannot receive any mail at all. What happen
                                                                                                                • Possible to reorder Pipelines position?

                                                                                                                  I have multiple Pipelines and want to reorder their positions, so that in the Deals module record for the Pipeline field, I have them ordered in a certain way. Is there a way to reorder the position of the Pipelines without deleting existing Pipelines
                                                                                                                • How do you pre-fill Form fields using URL parameters, for embedded forms?

                                                                                                                  Is this possible? This is something that can be done on most major Form platforms (JotForm, TypeForm etc). Currently if pre-filled fields are a necessity for your business, you cannot use embedded forms.
                                                                                                                • Unable to delete Attachment on Modules/Record

                                                                                                                  Hi Team, Could you please check the backend. Looks like today, CRM decided not to allow deletion of Attachment on Modules or Records. No error message but when you click Delete > Move to recycle bin, nothing happens. Please fix ASAP.
                                                                                                                • Filter Multi-Line Properties with Plain Large Text

                                                                                                                  To be able to filter fields that feature Plain large text, I am only able to filter on plain small text when you offer 3 separate options.
                                                                                                                • Next Page