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

                                                                                                                • Zoho time tracking with automated screenshots

                                                                                                                  Time tracking option with automated screen shots would be an exeptuonally good feature, any plans to develop something like that?
                                                                                                                • Zoho Campaigns Forms not Responsive on Website

                                                                                                                  I have a mobile responsive Zoho Sites website and when I add a Zoho Campaigns form, it is not responsive. I have used the website code and ensured that the 'responsive' checkbox is selected. But, the form is not responsive to mobile. I have attached a
                                                                                                                • Oldest mail on top?

                                                                                                                  I am old, and probably missing something simple, but how do I flip my zoho mail so oldest mail is on top?  Thanks in advance, and a HUGE thank you to the entire ZOHO team.  You just keep getting better!
                                                                                                                • Desk API to add or change commenterId to a comment

                                                                                                                  Please let me know how to add comments on tickets for different agents using the API. When adding a comment it will take commenterId but then ignores that and used the API agentId. Did not see in API docs which values are readonly. I pleased to see commentedTime worked for past times. Regards, Glenn
                                                                                                                • How send a ticket attachment using the Sendreply API in Zoho Desk

                                                                                                                  API document references : you make use of the Upload file API and gather the attachment ID. This ID is be passed with the Send email Reply API to deliver responses with the attachment intact. Code template is as below: // ORGID ORGID = "XXXXXXX"; // Masked
                                                                                                                • First Insight - Find your Fields

                                                                                                                  The Wheels of Ticketing - Desk Stories Find your Fields What are fields? Fields are crucial in ticketing modules that capture information about Tickets, Customers, Organizations, Products, and more. Depending on the kind of data being stored, users can
                                                                                                                • Automation#30: Auto-Update Time Entry to the Nearest 5 Minutes

                                                                                                                  Hello Everyone, Time tracking is a feature in Zoho Desk to help businesses stay organized and efficient. For Zylker Techfix, this feature has helped to track the duration of gadget services to generate accurate bills. However, Zylker Techfix faced a unique
                                                                                                                • Email adding to existing ticket

                                                                                                                  hello Is there some syntax i can add e.g. to the subject line / body of my email that when it reaches the Zoho portal will add the request to an existing ticket. e.g {123} Currently if i have an open ticket and a customer emails me direct, i then forward
                                                                                                                • How to define different shift timings for each weekday in Zoho People?

                                                                                                                  Hi everyone, We’re using Zoho People for attendance tracking and need to configure a standard 39-hour workweek that is structured like this: Monday to Thursday: 8 hours per day Friday: 7 hours Currently, our service provider has set up the workweek as
                                                                                                                • add two date range

                                                                                                                  Hi, How can I add two date range selections to compare two different column values in a single pivot view? I have attached a snap for your reference.
                                                                                                                • Announcing new features in Trident for Windows (v.1.26.5.0)

                                                                                                                  Hello Community, Trident for Windows is here with exciting new features to elevate your email communication and enhance productivity. Let’s dive into what’s new! Open .eml files in Trident. You can now open .eml files directly using Trident. This makes
                                                                                                                • Adjust The max character in Specification Field

                                                                                                                  Is there another way to adjust the maximum character limit for the Specifications field in Zoho Commerce? I need to accept responses with fewer than 200 characters.
                                                                                                                • Customize the Sign In And Sign Up in Zoho Commerce

                                                                                                                  Is there another way to customize the Sign In and Sign Up in website Zoho Commerce like this i want to customize to edit it like change the "Sign In" word into "Login Zoho Commerce" it is possible or other way to do that?
                                                                                                                • Territories : Deluge and APIs

                                                                                                                  I am trying to work out how to filter a deluge query by territory eg "SELECT Total_Amount, Stage, Closing_Date, Created_Time, Deal_Name FROM Deals WHERE Stage in (" + varBaseCriteria + ") AND Territory = 'Territory1'" The problem being that Territory
                                                                                                                • Tidying up messes file system on Site

                                                                                                                  I'm been given access to a new site that's been managed by several different people over the years, each with different ways of managing images and files. If I move an image from one folder to another, it shows a missing image icon on the site's page.
                                                                                                                • Move Archive Button in Zoho Mail to Main Toolbar?

                                                                                                                  Is there a way to add the Archive Button to this tool bar so I don't have to click the three dots every time?
                                                                                                                • Introducing Bigin 360: Our new pricing edition with increased feature limits and pre-installed toppings

                                                                                                                  Dear Biginners Club, Today, we're pleased to launch a brand-new pricing edition called Bigin 360, our highest pricing edition that will sit on top of Express and Premier editions. It's been over four years since our launch, and we're receiving some great
                                                                                                                • URL field display value

                                                                                                                  Is it possible to give a URL stored in a project a display value, rather than showing the whole url? I have a lot of projects connected to issues filed on a separate site, each with a distinct URL. For example: https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=40000
                                                                                                                • need payment link excl. TDS Amount.

                                                                                                                  Dear Team Zoho, Kindly generate a payment link excluding TDS amount. So that TDS can be submitted through portal. Thanks & Regards, Arijit S.
                                                                                                                • CRM is very slow now

                                                                                                                  CRM is very slow now. Plz check ASAP
                                                                                                                • Access error when running invokeurl

                                                                                                                  Hi, I'm running the following code: string standalone.test_api() { LoroToken=zoho.crm.getOrgVariable("LoroToken"); info "LoroToken:"+ LoroToken; headersMap = Map(); headersMap.put("Authorization", "Bearer "+LoroToken ); headersMap.put("Content-Type",
                                                                                                                • Disable Column Freeze in PWA View but Keep It on Desktop — Zoho Creator Reports

                                                                                                                  Zoho Creator offers a useful feature to freeze up to two columns in a report view, which works well on desktops. However, our users access the app on both laptops and mobile devices, and freezing columns makes reports nearly unusable on smaller screens.
                                                                                                                • How do I add more space to a note in ‘draw’?

                                                                                                                  I’m taking handwritten notes using the draw note, but I don’t seem to be able to scroll down to get more room on the page. How do I make more room to take notes?
                                                                                                                • Overtime per week vs. per day

                                                                                                                  In the United States 90% of the states calculate overtime as working more than 40 hours per week. It appears that Zoho People can only calculate overtime per day.  How do we fix this? Here is an example: Mon      8 hours Tues      7 hours Wed      9 hours Thur      8 hours Fri            8 hours -----       Total      40 hours (no overtime) However, Zoho people says 1 hours of overtime because the employee worked 9 hours on Wednesday. Maybe I have something setup wrong in Zoho People?  
                                                                                                                • Add Hebrew Language Support in SalesIQ Idle Chat Handling and Reminders

                                                                                                                  Dear Zoho SalesIQ Team, Greetings. We would like to request the addition of Hebrew language support in the Idle Chat Handling and Reminders functionality within Zoho SalesIQ. 🗣️ Background & Use Case Currently, we have successfully configured our Zobot
                                                                                                                • notebook synchronization - problem

                                                                                                                  Good afternoon, Since yesterday when trying to create a new notebook, it does not let me and when creating the notes they are not synchronized with the cloud, I think the error may be with the encryption of images because in the pages appears the image
                                                                                                                • Notebook 3.5.0 -- Sort order Name A-Z not working

                                                                                                                  Just updated to Notebook 3.5.0 on Windows 10. Sort order by Name, A to Z is backwards, like Z to A. Selecting Z to A still works as expected.
                                                                                                                • Stay organized with chat-to-ticket timers

                                                                                                                  Hi there! Ever lost track of a customer’s message? Or found yourself scrolling through long chat threads trying to figure out what’s what? Setting up a chat-to-ticket timer can help. It decides when a reply should stay in the old ticket or create a new
                                                                                                                • New notecards not syncing across devices

                                                                                                                  Hi, I'm having the same problem where my notes are not syncing from my Android to my laptop. Please help
                                                                                                                • Please add custom sort in Windows ver. of Notebook!

                                                                                                                  Dear Zoho, I love the custom sort (drag and order notes) in the Android version of Notebook, but when I sync onto the Notebook on Windows, the note orders all get messed up because it doesn't support custom sorting yet. This makes it impossible to do
                                                                                                                • Formula to return string "WK 26 - 6.2.25 - 6.8.25

                                                                                                                  Here's what I've got but syntatic failure: if(not(isnull(${Deals.GS_Due})), "Week " + Tostring(ceil(dayofyear(${Deals.GS_Due}) / 7)) + " - " + Tostring(month(${Deals.GS_Due})) + "." + Tostring(day(${Deals.GS_Due})) + "." + Tostring(year(${Deals.GS_Due}))
                                                                                                                • Introducing LeadChain in Bigin to sync leads from Social Ads easily

                                                                                                                  We're excited to introduce a new topping in Bigin called LeadChain by Zoho Social. LeadChain instantly syncs lead information from social media lead ads to Bigin, making it easier to turn them into customers. It also helps you send conversion data back
                                                                                                                • Templates Access

                                                                                                                  There should be an option to grant users access to templates but not allow them to edit/delete templates. In setup there is only one tick option for templates. This will give any user access to view as well as delete/edit. This doesnt make sense as they
                                                                                                                • Power of Automation :: Autocomplete the Project upon Task closure.

                                                                                                                  Hello Everyone, A Custom function is a user-written set of code to achieve a specific requirement. Set the required conditions needed as when to trigger using the Workflow rules (be it Tasks / Project) and associate the custom function to it. Requirement:
                                                                                                                • Unable to send email through Gmail

                                                                                                                  So I had a custom domain email from Zoho and I was able to send emails from this account through my gmail. 2 days ago I added another user. This user is not able to receive any emails, that's the first issue, moreover, even though I haven't changed anything else other than adding this user, now I am unable to send email through my gmail account with the first user either! I have opened a case with priority "I am stuck, need assistance", haven't got a single reply in about 36 hours. I am unable to
                                                                                                                • "Invalid Credentials(Failure)" when configuring IMAP (Outlook)

                                                                                                                  Getting the below response when attempting to configure Zoho mail in Outlook 2016: Notes (what I've done so far): Zoho mail on web client is working with no issues. Though I was certain the username & PW were correct (was using same credentials on web client as I was attempting to utilize in Outlook 2016), just in case, I went ahead and changed my password on the web client and re-attempted Outlook configuration; same error response. IMAP for my email account was enabled on the web client (and POP
                                                                                                                • Custom service report or Zoho forms integration

                                                                                                                  Hello, So far the experience with Zoho FSM and the integration with Books has been good, however there are limitations with service reports. As with my business, many organisations send technicians to different types of jobs that call for a different
                                                                                                                • Pre-fill Email field on Zoho Forms

                                                                                                                  Hello there, How do we automatically pre-fill the email address field of a Zoho Form from the data that is in CRM? Thanks, Joel
                                                                                                                • Webhook Trigger for New Messages in Cliq Channels

                                                                                                                  Hello, I would like to request a feature to enable webhook triggers when a new message is added to a Cliq channel. This functionality would allow us to seamlessly send important information from Cliq to other relevant systems. This webhook trigger can
                                                                                                                • Unable to add subdomain email account under the main email account

                                                                                                                  Hi, Is it possible to add a subdomain email account, like sky@agent.rebrightrental.com from the Admin Console of admin@rebrightrental.com in Zoho Mail? Or is that not possible? I want to create at least 3, like oak@agent.rebrightrental.com, bliss@agent.rebrightrental.com,
                                                                                                                • Next Page