Action Execution function

Action Execution function


The Execution function is the endpoint to an action execution. It defines the fulfillment of an action. This does the actual execution of the action and gives a final success (or failure) message to the user, as a result of the completion of an action. The response to the user can be a text or a collection of cards (visual elements).

Invocation Point

The Execution function is invoked at the endpoint of an action. By default, the endpoint of an action comes after all the param values are prompted and filled with proper values. Alternatively, the endpoint can also be triggered from the context handler function (“todo” : “execute”)Once the execution function is invoked, the action is completed and any further conversation from the user will be considered as a new action.


Input arguments

Only the system defined input arguments, are available as the input arguments of the Execution function.

Return Value

The Execution function must return a map that should be in the following format.

{
        “message” : “The reply message.”,
        “card” : { },
        "broadcast" : { },
        "followup" : { }      
}
As shown above, the following are the keys that can be present in the map that would be returned from the Execution function.

message

To give a text message as a reply to the user. The text will be rendered through voice or as text, depending on the medium of communication. This key is mandatory

The following text formatting options are supported by Zia Skills. Any of these options can be used in the text message.
Item
Formatting option
Syntax
1.
Bold
*text*
2.
Italic
_text_
3.
Underline
__text__
4.
Strikethrough
~text~
5.
Link
[label](URL_link)
6.
Highlight
`text`
7.
Heading
  • h1 - #Heading

  • h2 - ##Heading

  • h3 - ###Heading

  • h4 - ####Heading

  • h5 - #####Heading

8.
Bullet list
* first_item \n * second_item \n * third_item
9.
Numbered list
1. first_item \n 1. second_item \n 1. third_item
10.
Image
![alternate_text](image_URL)
11.
Blockquote
!text
12.
Table | header1 | header2 | header3 | \n
|------------|------------|------------| \n 

| value1 | value2 | value3 | \n 
| value1 | value2 | value3 |


card 

To give a visually formatted message as a reply to the user. A card is a collection of visual elements such as table, image, etc. Card will be rendered on the screen for both call and chat media. The value of this key is a list of map objects. Each map object represents a UI element in the card. A single card may contain more than one element of the same type. Every element in the card will be displayed one below the other in the reply message. This key is optional.

All the inline formatting options mentioned in the above table (items 1 to 6) are applicable to the card elements as well. So, any of these six formatting options can be used in any of the text values in any of the below cards.

Below are the list of UI elements that are supported in Zia's reply message card.

No.
Element
Description
1.
Note

{
        “type” : “note”,
        “content” : “Text content that needs to be displayed as a note.”
}
2.
Title
{
        
“type” : “title”,
        
“content” : “Text content that needs to be displayed as a title”
}
3.
List - Bullet & Numbered

{
        “type" : "list",
        “format” : "bullet”, //"numbered" in case of numbered list
        “elements” :
        [
        
        {
                        “label" : "point no. 1"
                },
                {
                        “label" : “point no. 2"
                }
        ]
}

4.
Table


{
        “type" : "table",
        “heading" : "Table Heading",
        “columns” :
        [
                "column1 header",
                "column2 header",
                "column3 header"
        ],
        “rows” :
        [
                [
                        “value a1",
                        "value a2",
                        "value a3"
                ],
                [
                        "value b1",
                        "value b2",
                        "value b3"
                ]
        ]
}
5.
Image
{
        “type" : "image",
        “content" : "image_url"
}
6.
File
{
        “type" : "file",
        “name” : "file_name",
        “format" : "pdf", //file extension
        “content" : "file_url"
}
7.
Contact card

{
        “type" : "vcard",
        “info” :
        {
                “image" : "image_url",
                “fields" :
                [
                        {
                                "First Name” : “Smith”
                        },
                        {
                                ”Last Name” : “Gibbs”
                        },
                        {
                                “Company" : “ABC Corp”
                        },
                        {
                                “Website" : “https: //www.abccorp.com"
                        }
                ]
        }
}
8.
Link
 
{
        “type" : "label",
        “content" : "URL_link"
}

9.
Button
 

  1. For "theme" key, the value can be "positive" or "negative" or "neutral".
  2. For "execute" key, the value can be any one of the following:
    1. "function" - to execute the defined button_click_function.
    2. "clienthook" - to execute the hook implemented by the client app.
  3. If "clienthook" is set as the value to the "execute" key, then the "function" key is not required.
  4. For "data" key, set any value that needs to be passed to the appropriate button_click_function.
 

Note

  1. In the "button" card, if the value for the "execute" key is set as "clienthook", then the SDK will invoke the "handleZiaResponse( )" hook, which should have been implemented by the client app. If this hook was not implemented, then Zia would show "something went wrong" message as a response.
  2. A maximum of three buttons can be configured for an action using the "button" card.

broadcast

To pass any data that the bot would remember even after executing the current action. The value should be in a Map format and it would be available for all consecutive actions throughout the session. This key is optional. Learn More.

followup

To configure if the bot should display a list of suggestions or prompt the user to invoke any particular action as a followup, after completing the current action's execution. This key is optional. To know more about Action Followups and the structure of this key's value, refer this document.

    Access your files securely from anywhere

      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





                          Quick Links Workflow Automation Data Collection
                          Web Forms Enterprise Begin Data Collection
                          Interactive Forms Workplace Data Collection App
                          CRM Forms Customer Service Accessible Forms
                          Digital Forms Marketing Forms for Small Business
                          HTML Forms Education Forms for Enterprise
                          Contact Forms E-commerce Forms for any business
                          Lead Generation Forms Healthcare Forms for Startups
                          Wordpress Forms Customer onboarding Order Forms for Small Business
                          No Code Forms Construction RSVP tool for holidays
                          Free Forms Travel
                          Prefill Forms Non-Profit

                          Intake Forms Legal
                          Mobile App
                          Form Designer HR
                          Mobile Forms
                          Card Forms Food Offline Forms
                          Assign Forms Photography
                          Mobile Forms Features
                          Translate Forms Real Estate Kiosk in Mobile Forms
                          Electronic Forms

                          Notification Emails for Forms Alternatives Security & Compliance
                          Holiday Forms Google Forms alternative  GDPR
                          Form to PDF Jotform alternative HIPAA Forms
                          Email Forms
                          Encrypted Forms
                          Embeddable Forms
                          Secure Forms
                          Drag and Drop form builder
                          WCAG


                                            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









                                                                                                              • Related Articles

                                                                                                              • Defining an Action

                                                                                                                Adding a New Action To add a new Action to a Skill, follow the steps as given below. In the Skill's details page, under the ACTIONS tab, click the + ADD ACTION option. The Create New Action page appears. Give a meaningful name for the action. Based ...
                                                                                                              • Fallback Function

                                                                                                                When a bot receives an input message that it couldn't understand, it would reply with a "Sorry, I can't understand" message. If you wish to customize this default response message to give a reply of your own, you can customize that with Fallback ...
                                                                                                              • Action Followups

                                                                                                                Action Followups defines what the bot should recommend the user after executing an action, in order to engage the user further in conversation. The bot can display a list of suggestions or ask if it can invoke another action, that might be ...
                                                                                                              • Context handler function

                                                                                                                Context handler function is used to control the conversational flow of an action. You can change the order in which the params are prompted to the users in the runtime. You can also skip some params, do custom validations of the param values and ask ...
                                                                                                              • Testing an Action

                                                                                                                To ensure that your action doesn't have any functional issues, you may have to test your action before deploying it to production. In addition to that, you can also verify the user experience and ensure that it works as you have configured. To test ...
                                                                                                                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