Zoho SalesIQ: A sample Zobot powered by Zia Skills

Zoho SalesIQ: A sample Zobot powered by Zia Skills


Zobot is Zoho SalesIQ's virtual chat agent that is designed to interact with website visitors conversationally. Zobot automates the process of interacting with website visitors and helps to maintain the presence of a helping hand, even when all the live agents are not available. The following sample use case demonstrates a real-time bot built on Zobot powered by Zia Skills Platform.

Example scenario - Service appointment booking

Consider an imaginary company, Zylker Inc. which is a burgeoning local services marketplace. Zylker helps customers to hire professionals for various field services like housekeeping, vehicle maintenance, appliance repairs and so on. Once a customer schedules an appointment, Zylker assigns a field professional to complete the requested service.

In the current process of Zylker, to schedule a service appointment, customers have to chat with a live agent through the live chat option in Zylker's website (powered by Zoho SalesIQ).

Zylker's website with their live chat option.

 A typical conversation between an agent and a user trying to schedule an appointment would be like below.
However, the demand for Zylker's services have increased and it is challenging for them to manage the appointment requests through live chats, since it would require a lot of manpower, which would be expensive. Hence they plan to automate the appointment booking process using a bot using Zobot (powered by SalesIQ).

As inferred from the aforementioned conversation (between the agent and the user) the following details are required by Zylker from the user, to schedule a service appointment.
  1. Name of the customer
  2. Mobile number of the customer
  3. Address of the service location
  4. Category of service (Car wash, Painting, Cleaning etc.)
  5. Preferred date of service
Thus, in order to create a service appointment, the bot has to prompt these details to the user, just like how an agent did in the live chat.

Creating a Zobot backed by Zia Skills

  1. Create a bot in SalesIQ ( under Settings -> Zobot ) for Zylker's website.
  2. Choose Zia Skills for the option 'Which platform would you like to use to develop your bot?'.
  3. In the integration page, 'Skill name' and 'Skill description ' would have been auto populated. You can change them if needed.
  4. Enter a valid 'Trigger Response' (bot's welcome message to the user) in JSON format and click CREATE. In this case, 
    1. {
    2.   "replies": [
    3.                       {
    4.                         "text" : "Welcome to Zylker services"
    5.                      }
    6.                  ]

The Zobot would have been created now. Conversational abilities can be added as actions to this bot from Zia skills console.

Modelling service appointment booking as an action

  1. Click Access Zia Skills Console on the top right corner of the integration page to access the developer console of Zia Skills. It will redirect you to the mapped bot in Zia Skills.
  2. In the bot's details page, under the ACTIONS tab, click + ADD ACTION. The Create New Action page appears.
  3. Enter a meaningful 'Action Name', that reflects the purpose of this action - in this case, "Service appointment booking ".
  4. For 'What should this action do? ', choose Perform an operation, since this action carries out something on behalf of the user.
  5. Under 'How will this operation be invoked? ', define the sample invoking sentences that users would say to invoke this action. For instance,
    I would like to schedule a service appointment
    Use the plus icon + besides the last entered text box to add further sentences. 
  6. Practically, people would include data as part of invoking instruction and hence sample sentences may also include certain param values. For instance, in this case, we can have a sample sentence as
  7. Book an appointment for painting 
    1. Here the user mentions the type of service needed (painting). It has to be marked as a param. Select the word "painting" and the NEW PARAM pop-up appears.
      1. Mention a meaningful 'Param Name'. In this case, 'servicename', since this param defines the type of service.
      2. Choose the appropriate 'Param Type'. In this case, String.
      3. Enter a relevant 'Prompt message', which would be displayed to the user to prompt this param, if the param value is not given in the invocation sentence. In this case, "Which service are you looking for? (Painting/ Cleaning/ Car wash/ Electrical works)".
      4. Click ADD. The param appears in the PARAMS list.
  8. Similarly we shall add more meaningful sample sentences.
  9. I want to schedule a car wash on Monday.
    In this sentence mark car wash as 'servicename' param and mark Monday as a new param 'visitdate' of 'Param Type' Date with 'Prompt message' "What's your preferred date for the service?"
  10. Define the remaining params as follows using +NEW option in the PARAMS list.
    Remaining details required
    Param name
    Param type
    Prompt message
    Name of the customer
    name
    String
    May I have your full name, please?
    Mobile number of the customer
    mobile
    Number
    May I have your mobile number, please? 
    Address of the service location
    location
    String
    What is the address of the service location? 

    Note that the params will be prompted to the user in the order mentioned under PARAMS list. We shall reorder the added params now to have a better contextual conversation. To reorder the param, click the param and place in the appropriate position.

    The appropriate order of params for this action are,

         i. name
        ii. mobile
       iii. location
       iv. servicename
        v. visitdate
  11. Click DONE. It displays the Configure Functions page as below.

    Functions are custom hooks written by action developers that are invoked by Zia Skills during action execution at various points. The fulfilment or the actual business logic of the action is defined in the Execution functionIt is executed after all params are prompted and got from the user. It gives the final success (or failure) message to the user indicating the action completion.

  12. Click EDIT EXECUTION FUNCTION, that would fulfill the core business logic of the action. 
    The core business logic of this action is to store the appointment details in Zoho CRM and 
    give an appropriate reply message to the user.

    To store the prospect's information in Zoho CRM, this function should hit an authenticated API of Zoho CRM. To handle the authentication between Zia Skills and Zoho CRM, we are using Deluge Connections. The API authentication scope to be used in the connection in
    ZohoCRM.modules.ALL.

    The function to be used as follows.
    1. result = Map();
    2. vdate = visitdate.toString("YYYY-MM-dd");//Zoho CRM's one of the supported date format is YYYY-MM-dd
    3. fields = Map();
    4.    fields.put("Name",name);
    5.    fields.put("Contact",mobile);
    6.    fields.put("City",location);
    7.    fields.put("Service_Type",servicename);
    8.    fields.put("Service_Date",vdate);
    9. response = zoho.crm.createRecord("Forms",fields); //Making API call to create a record in Zoho CRM
      info response;
    10. //Returning the appointment from Zylker service center
    11. displayCard = list();
    12. imageMap = Map();
    13.    imageMap.put("type","image");
    14.    imageURL = "https://i.ibb.co/1XgLJ4G/car-care-service-image.jpg%22;
    15.    imageMap.put("content",imageURL);
    16.    imageMap.put("text","The approximate cost for this service would be around $15.");
    17. noteMap = Map();
    18.    noteMap.put("type","note");
    19.    noteMap.put("content",name + "," + " I've scheduled an appointment for your " + servicename + " on " + visitdate);
    20. displayCard.add(noteMap);
    21. displayCard.add(imageMap);
    22. result.put("card",displayCard);
    23. result.put("message","I've schedule an appointment successfully");
    24. return result;

  13. Click Save Script to save the code and click DONE on the top right corner to complete the new action creation, it will navigate you to the action's details page.
  14. Go to the bot's details page, and click DEPLOY TO PRODUCTION to move the action to production.
    The created action can be tested in the bot preview window in Zoho SalesIQ.


Thus this bot now can attend live chat from visitors and could schedule actual appointments without agent intervention. Embedding this bot into your website would take this bot to production.

Additional Scenario - Validating user input

Furthermore, it arises that Zylker doesn't operate on weekends.  Hence this bot should be made not to accept appointment requests to service on these days. i.e. technically the Zobot has to validate the user's input for the param 'visitdate' and make sure that it dosen't fall on weekends. This is achieved through the Context handler function.

Context handler function is used to control the conversational flow of an action. It can be used to do custom validations of the param values and change the order in which the params are prompted in runtime.

User input validation with Context Handler Function

  1. To enable the Context handler function, in the Configure Functions page, click the Enable option under Context Handler Function. It displays a pop-up window for confirmation, click OK
  2. It will be redirected to the function's page. The below logic will go as the Context Handler function for Zylker's requirement. 
    1. result = Map();
    2. // To enter after getting input for servicename param
    3. if(servicename != null)
    4. {
    5.      if(visitdate != null)
    6.      {
    7.        getdate = visitdate.getDayOfWeek();
    8.        if(getdate == 7 || getdate == 1) //Checking if the day of visitdate is a weekend
    9.        {
    10.          promptMap = Map();
    11.          promptMap.put("param_name","visitdate");
    12.          promptMap.put("prompt_msg","Sorry for the inconvenience !!! The service is not available on weekends. Please select an alternative date");
    13. result.put("prompt",promptMap);
    14. result.put("todo","prompt");
    15. return result;
    16.            }
    17.       }
    18. }
    19. result.put("todo","prompt");
    20. return result;

  3. Click Save Script to save the code and click DONE on the top right corner, it will navigate you to the action's details page.
  4. Go to the bot's details page and click DEPLOY TO PRODUCTION to move the code changes to production.
    The created action can be tested in the bot preview window in Zoho SalesIQ.







    Zoho CRM Training Programs

    Learn how to use the best tools for sales force automation and better customer engagement from Zoho's implementation specialists.

    Zoho CRM Training
      Redefine the way you work
      with Zoho Workplace

        Zoho DataPrep Personalized Demo

        If you'd like a personalized walk-through of our data preparation tool, please request a demo and we'll be happy to show you how to get the best out of Zoho DataPrep.

        Zoho CRM Training

          Create, share, and deliver

          beautiful slides from anywhere.

          Get Started Now


            Zoho Sign now offers specialized one-on-one training for both administrators and developers.

            BOOK A SESSION








                                You are currently viewing the help pages of Qntrl’s earlier version. Click here to view our latest version—Qntrl 3.0's help articles.




                                    Manage your brands on social media

                                      Zoho Desk Resources

                                      • Desk Community Learning Series


                                      • Digest


                                      • Functions


                                      • Meetups


                                      • Kbase


                                      • Resources


                                      • Glossary


                                      • Desk Marketplace


                                      • MVP Corner


                                      • Word of the Day


                                        Zoho Marketing Automation

                                          Zoho Sheet Resources

                                           

                                              Zoho Forms Resources


                                                Secure your business
                                                communication with Zoho Mail


                                                Mail on the move with
                                                Zoho Mail mobile application

                                                  Stay on top of your schedule
                                                  at all times


                                                  Carry your calendar with you
                                                  Anytime, anywhere




                                                        Zoho Sign Resources

                                                          Sign, Paperless!

                                                          Sign and send business documents on the go!

                                                          Get Started Now




                                                                  Zoho TeamInbox Resources



                                                                          Zoho DataPrep Resources



                                                                            Zoho DataPrep Demo

                                                                            Get a personalized demo or POC

                                                                            REGISTER NOW


                                                                              Design. Discuss. Deliver.

                                                                              Create visually engaging stories with Zoho Show.

                                                                              Get Started Now







                                                                                            You are currently viewing the help articles of Sprints 1.0. If you are a user of 2.0, please refer here.

                                                                                            You are currently viewing the help articles of Sprints 2.0. If you are a user of 1.0, please refer here.



                                                                                                  • Related Articles

                                                                                                  • Demo video : Zobot with Zia Skills

                                                                                                    Below is a demo video of building a sample Zoho SalesIQ Zobot powered by Zia Skills.
                                                                                                  • Zoho SalesIQ: Building a Zobot with Zia Skills

                                                                                                    Zia Skills can be used as a bot building platform for a Zobot in Zoho SalesIQ. A bot-building platform is a layer where you define the abilities and business logic of your chatbots. A bot-building platform has the following roles. Handling Natural ...
                                                                                                  • Defining Sample Sentences

                                                                                                    Defining sample sentences is the key in defining your action, because this is what the user is likely to tell Zia in order to trigger your action.  If you have chosen the action intention as "Perform an Operation", then sample sentences must be ...
                                                                                                  • FAQ - Basics

                                                                                                    What is Zia Skills? Zia Skills is an AI driven platform that offers Natural Language Understanding (NLU) as a service, to build and train conversational AI assistants for your business applications, that can converse through voice or text. What is ...
                                                                                                  • Overview

                                                                                                    What is Zia Skills? Zia Skills is an AI driven platform to build a conversational assistant for your business applications that converse through voice or text. You can interact with any bots built on Zia Skills in conversational English - just like ...
                                                                                                    Wherever you are is as good as
                                                                                                    your workplace

                                                                                                      Resources

                                                                                                      Videos

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



                                                                                                      eBooks

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



                                                                                                      Webinars

                                                                                                      Sign up for our webinars and learn the Zoho CRM basics, from customization to sales force automation and more.



                                                                                                      CRM Tips

                                                                                                      Make the most of Zoho CRM with these useful tips.



                                                                                                        Zoho Show Resources