How to suppress/ignore default PARAMS prompt if using Context Handler Function

How to suppress/ignore default PARAMS prompt if using Context Handler Function

I am creating a Zobot script using Zia Skills for Lead Generation. This includes an Action that collects some user inputs to give user specific outputs through the Execution Function.

For example, the problem goes like this:
Once the action is triggered, the visitors are asked few questions. One of the questions is whether they have a appeared for a particular exam. If they select YES (single select input), then and only then are they prompted for that exam score, if they select NO the Context Handler Function should suppress the exam score Param. How do I go about solving this issue?
Please Refer the code below (Especially Line no. 49 to 62

PARAM NAMES:
programname
countryname
compexamname
compexamscore
engexamname
engexamscore

Context Handler Function:
  1. result = Map();
  2. if ( programname == null )
  3. {
  4. responseText = "Which Programs/Specializations do you wish to pursue?";
  5. response = Map();
  6. response.put("action","reply");
  7. response.put("replies",{{"text":responseText,"field_name":"siq_programname"}});
  8. prompt = Map();
  9. prompt.put("param_name","programname");
  10. prompt.put("data",response);
  11. result.put("prompt",prompt);
  12. }
  13. else if ( countryname == null )
  14. {
  15. responseText = "In which Country/Region do you wish to study? (select upto 3 options)";
  16. response = Map();
  17. response.put("action","reply");
  18. response.put("replies",{responseText});
  19. response.put("input",{"type":"multiple-select","options":{"United States","Canada","UK and Ireland","Europe","Australia and New Zealand","Other Countries"},"max_selection":"3"});
  20. prompt = Map();
  21. prompt.put("param_name","countryname");
  22. prompt.put("data",response);
  23. result.put("prompt",prompt);
  24. }
  25. else if ( countryname == "Other Countries" )
  26. {
  27. responseText = "Please enter the Country Name:";
  28. response = Map();
  29. response.put("action","reply");
  30. response.put("replies",{{"text":responseText,"field_name":"siq_countryname"}});
  31. prompt = Map();
  32. prompt.put("param_name","countryname");
  33. prompt.put("data",response);
  34. result.put("prompt",prompt);
  35. }
  36. else if ( compexamname == null )
  37. {
  38. responseText = "Which of these Competitive Exams have you given?";
  39. response = Map();
  40. response.put("action","reply");
  41. response.put("replies",{responseText});
  42. response.put("input",{"type":"select","options":{"GRE","GMAT","SAT","None of these"}});
  43. prompt = Map();
  44. prompt.put("param_name","compexamname");
  45. prompt.put("data",response);
  46. result.put("prompt",prompt);
  47. }
  48. else if ( compexamname != null && compexamscore == null )
  49. {
  50. if ( compexamname != "None of these" )
  51. {
  52. responseText = "What is your Total " + compexamname + " score?";
  53. response = Map();
  54. response.put("action","reply");
  55. response.put("replies",{{"text":responseText,"field_name":"siq_compexamscore"}});
  56. prompt = Map();
  57. prompt.put("param_name","compexamscore");
  58. prompt.put("data",response);
  59. result.put("prompt",prompt);
  60. }
  61. }
  62. result.put("todo","prompt");
  63. return result;
Thanks in advance.
    Zoho Desk Resources

    • Desk Community Learning Series


    • Digest


    • Functions


    • Meetups


    • Kbase


    • Resources


    • Glossary


    • Desk Marketplace


    • MVP Corner


    • Word of the Day


      Zoho CRM Plus Resources

        Zoho Books Resources


          Zoho Subscriptions Resources

            Zoho Projects Resources


              Zoho Sprints Resources


                Zoho Orchestly Resources


                  Zoho Creator Resources


                    Zoho WorkDrive Resources



                      Zoho Campaigns Resources

                        Zoho CRM Resources

                        • CRM Community Learning Series

                          CRM Community Learning Series


                        • Tips

                          Tips

                        • Functions

                          Functions

                        • Meetups

                          Meetups

                        • Kbase

                          Kbase

                        • Resources

                          Resources

                        • Digest

                          Digest

                        • CRM Marketplace

                          CRM Marketplace

                        • MVP Corner

                          MVP Corner




                          Zoho Writer Writer

                          Get Started. Write Away!

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

                            Zoho CRM コンテンツ




                              ご検討中の方